text:
Error happening while adding new properties in class and state

From @nikoloza on June 30, 2016 17:20
This error
/Users/nikoloza/experimental/brisky-core/lib/render/state.js:23
  return target.render.state(target, state, type, stamp, subs, tree, id, pid, order)
                      ^

TypeError: Cannot read property 'state' of undefined
    at renderState (/Users/nikoloza/experimental/brisky-core/lib/render/state.js:23:23)

is caused by this code (when we get on 3rd level of nesting):
  var node
  const state = s({
    testing: 'testclass'
  })
  const elem = {
    class: {
      default: 'thing',
      $: 'testing'
    }
  }

  // test 1
  node = render(elem, state)
  t.equals(node.className, 'testclass thing', 'initial with class with subscription')

  // test 2
  state.set({testing: { again: 'again' }})
  elem.class.again = { $: 'again' }
  node = render(elem, state)
  t.equals(node.className, 'testclass thing again', 'add one more level')

  // going well until third
  // test 3
  state.set({testing: { again: { more: 'more' } }})
  elem.class.again.more = { $: 'more' }
  node = render(elem, state)
  t.equals(node.className, 'testclass thing again more', 'add one more level')

  t.end()

Copied from original issue: vigour-io/brisky-core#46

This is real example where it fails: https://github.com/vigour-io/brisky-class/blob/27e98d622d7fc6a9d0853e1e4721f37479737113/test/context.js#L132-L139
But my case for modal should work (can't test it yet).

can only nest once

authors: jimdebeer nikoloza

repo: vigour-io/brisky-class

license: ISC


text:
:emenu behaves differently when called from a user command defined in a script

Steps to reproduce

Run vim --clean
Source the following file:

let g:log = []
nnoremenu Foo.Bar <Cmd>let g:log += ['n']<CR>
inoremenu Foo.Bar <Cmd>let g:log += ['i']<CR>
command -nargs=* Emenu emenu <args>
call feedkeys("i\<C-O>:emenu Foo.Bar\<CR>\<C-O>:Emenu Foo.Bar\<CR>\<Esc>", 't')

Running :echo g:log print ['i', 'n']

Expected behaviour
I guess ['i', 'i'] may be the expected behavior, but maybe the current behavior isn't worth changing?
Version of Vim
9.0.1337
Environment
Operating system: Arch Linux
Terminal: kitty
Value of $TERM: xterm-kitty
Shell: fish
Logs and stack traces
No response

Steps to reproduce

Run vim --clean
Source the following file:

let g:log = []
nnoremenu Foo.Bar <Cmd>let g:log += ['n']<CR>
inoremenu Foo.Bar <Cmd>let g:log += ['i']<CR>
command -nargs=* Emenu emenu <args>
call feedkeys("i\<C-O>:emenu Foo.Bar\<CR>\<C-O>:Emenu Foo.Bar\<CR>\<Esc>", 't')

Running :echo g:log print ['i', 'n']

Expected behaviour
I guess ['i', 'i'] may be the expected behavior, but maybe the
current behavior isn't worth changing?

This happens because near the start of execute_menu() the value of
"restart_edit" is not used when the script context is set.  And
executing a user command sets the script context to where the command
was defined.
I do not recall when this condition was added, but in this specific
situation it doesn't make sense.  The condition has been there for a
long time (at least 5 years), very likely before executing a user
command caused the script context to be set.
--
hundred-and-one symptoms of being an internet addict:
267. You get an extra phone line so you can get phone calls.
/// Bram Moolenaar -- @.*** -- http://www.Moolenaar.net   \
///                                                                      \
\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

source: gharchive/issue

authors: brammool zeertzjq

repo: vim/vim

license: Vim

license_type: permissive

license_source: github-api


text:
Using --not-a-term should not send terminal escape sequences

% vim --not-a-term -Nu NONE -cq | cat -A
^[[?2004h^[[?1049h^[[?1h^[=^[[?2004h^[[1;51r^[[?12h^[[?12l^[[27m^[[23m^[[29m^[[m^[[H^[[2J^[[51;1H^[[?2004l^[[?2004l^[[?1l^[>^[[r^[[?1049l

The output should be empty here.

I am not sure this is true. The --not-a-term was introduced to prevent the 2 second warning that comes when running vim tests in the CI testsuite not more and not less. Try running with a dumb terminal (or an empty environment. (It still might be, that Vim switches screens, asks the terminal for some questions or otherwise).
BTW: I'd really appreciate it, if questions regarding a certain behaviour would be first asked on vim-dev before opening random tickets. Thanks.

As Christian mentions, the argument is not to stop sending escape sequences.

the argument is not to stop sending escape sequences

But it would fit naturally, wouldn't it?
Why are terminal escape sequences sent if you say --not-a-term?
@chrisbra

The --not-a-term was introduced to prevent the 2 second warning that comes when running vim tests in the CI testsuite not more and not less.

I see that this might have been the initial intention (but -s /dev/null would also have worked already).
It wasn't named --dont-wait-two-seconds-after-not-a-term-warning however, and therefore it sounds like a good fit to suppress terminal escape sequences also.

Try running with a dumb terminal (or an empty environment. (It still might be, that Vim switches screens, asks the terminal for some questions or otherwise).

I do not get what you mean.

Try running with a dumb terminal (or an empty environment. (It still
might be, that Vim switches screens, asks the terminal for some
questions or otherwise).

I do not get what you mean.

vi +"set term=dumb"
Only uses "clear screen" and move cursor.  Amazing that most things
still work....
--
Why is "abbreviation" such a long word?
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \
\\  an exciting new programming language -- http://www.Zimbu.org        ///
\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

authors: blueyed brammool chrisbra


text:
Test_swap_prompt_splitwin failure in v8.2.0397

The two flavors of the failure I've seen are:
	Found errors in Test_swap_prompt_splitwin():
	function RunTheTest[40]..Test_swap_prompt_splitwin[15]..WaitForAssert[2]..<SNR>6_WaitForCommon[11]..<lambda>3 line 1: Pattern '^:$' does not match '[O]K, (L)oad File: '
	function RunTheTest[40]..Test_swap_prompt_splitwin[18]..WaitForAssert[2]..<SNR>6_WaitForCommon[11]..<lambda>4 line 1: Pattern '^1$' does not match '"" [New file] --No lines in buffer--'

and
	Found errors in Test_swap_prompt_splitwin():
	function RunTheTest[40]..Test_swap_prompt_splitwin[15]..WaitForAssert[2]..<SNR>6_WaitForCommon[11]..<lambda>3 line 1: Pattern '^:$' does not match '[O]K, (L)oad File: '
	function RunTheTest[40]..Test_swap_prompt_splitwin[18]..WaitForAssert[2]..<SNR>6_WaitForCommon[11]..<lambda>4 line 1: Pattern '^1$' does not match '[O]K, (L)oad File: '
	function RunTheTest[40]..Test_swap_prompt_splitwin[19]..StopVimInTerminal[7]..WaitForAssert[2]..<SNR>6_WaitForCommon[11]..<lambda>5 line 1: Expected 'finished' but got 'running'

James McCoy wrote:

The two flavors of the failure I've seen are:
	Found errors in Test_swap_prompt_splitwin():
	function RunTheTest[40]..Test_swap_prompt_splitwin[15]..WaitForAssert[2]..<SNR>6_WaitForCommon[11]..<lambda>3 line 1: Pattern '^:$' does not match '[O]K, (L)oad File: '
	function RunTheTest[40]..Test_swap_prompt_splitwin[18]..WaitForAssert[2]..<SNR>6_WaitForCommon[11]..<lambda>4 line 1: Pattern '^1$' does not match '"" [New file] --No lines in buffer--'

and
	Found errors in Test_swap_prompt_splitwin():
	function RunTheTest[40]..Test_swap_prompt_splitwin[15]..WaitForAssert[2]..<SNR>6_WaitForCommon[11]..<lambda>3 line 1: Pattern '^:$' does not match '[O]K, (L)oad File: '
	function RunTheTest[40]..Test_swap_prompt_splitwin[18]..WaitForAssert[2]..<SNR>6_WaitForCommon[11]..<lambda>4 line 1: Pattern '^1$' does not match '[O]K, (L)oad File: '
	function RunTheTest[40]..Test_swap_prompt_splitwin[19]..StopVimInTerminal[7]..WaitForAssert[2]..<SNR>6_WaitForCommon[11]..<lambda>5 line 1: Expected 'finished' but got 'running'

I cannot reproduce and can't guess why this would result in the "OK /
Load File" prompt.  That would only happen if the file changed outside
of Vim, but it's a buffer without a name.
Just guessing: Maybe it helps to edit a non-existing file?  Add an
argument to RunVimInTerminal():
let buf = RunVimInTerminal('XNoFile', {'rows': 20})
Otherwise it might help to add some sleep commands, but can't guess
where.
--
They now pass three KNIGHTS impaled to a tree.  With their feet off the
ground,  with one lance through the lot of them, they are skewered up
like a barbecue.
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \
\\  an exciting new programming language -- http://www.Zimbu.org        ///
\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

I cannot reproduce and can't guess why this would result in the "OK / Load File" prompt. That would only happen if the file changed outside of Vim, but it's a buffer without a name.
Just guessing: Maybe it helps to edit a non-existing file? Add an argument to RunVimInTerminal():
let buf = RunVimInTerminal('XNoFile', {'rows': 20})

Unfortunately, I haven't been able to reproduce this on the porter systems, but it reliably happens on the buildds themselves.  I'll see about doing some test uploads to try some of these suggestions.

let buf = RunVimInTerminal('XNoFile', {'rows': 20})

After adding this, I'm not getting failures that look like:
function RunTheTest[40]..Test_swap_prompt_splitwin[15]..WaitForAssert[2]..<SNR>6_WaitForCommon[11]..<lambda>23 line 1: Pattern '^:$' does not match '"XNofile" [New file] --No lines in buffer--'
function RunTheTest[40]..Test_swap_prompt_splitwin[18]..WaitForAssert[2]..<SNR>6_WaitForCommon[11]..<lambda>24 line 1: Pattern '^1$' does not match '-- INSERT --'

I tried adding a longer sleep to the term_wait() call just before the ^:$ assert, but that didn't help.

"not getting failures" or "now getting failures" ??

I'll make another attempt in making the test more robust.  Please reopen if it didn't fix the problem.

That is with patch 8.2.0444

authors: brammool jamessan


text:
Syntax highlighting with text property does not work well when setting cusorline.

Describe the bug
Syntax highlighting with text property does not work well when setting cursorline.
To Reproduce
$ cat > text-prop-and-set-cul.vim <<EOF
" www xxx yyy zzz

" Source this script with:
"   $ vim --clean -c 'so %' text-prop-and-set-cul.vim
" Then press j k and to move the cursor on line 2 and line 1 and
" notice that:
" - yyy which uses matchdd() is highlighted in red background
"   in line 1 as expected.
" - xxx which uses text property is not highlighted in red background
"   in line1 when current line is line 1 (BUG).
"
" Is there a way to make text property highlighted in the current line
" just like with matchadd()?

set termguicolors cursorline
hi CursorLine guifg=NONE guibg=#303030 gui=none term=none
\             cterm=none ctermfg=darkgrey ctermbg=grey

" Highlight xxx using a text property.
call prop_type_add('my_prop', {'highlight': 'Error'})
call prop_add(1, 7, {'type': 'my_prop', 'length': 3})

" Highlight yyy using matchadd().
call matchadd('Error', 'yyy\%1l')
EOF

$ vim --clean -c 'so %' text-prop-and-set-cul.vim

Then in normal mode, press j and k  to move the cursor outside and on of the first line.
Notice that:

yyy which uses matchadd() is highlighted in red background in line 1 as expected.
xxx which uses a text property is not highlighted in red background in line 1 when current line is line 1 (BUG).

Expected behavior
The text xxx should be highlighted in red background whether the cursor is on the first line or not (as what happens with matchadd()).
Screenshots

Environment

Vim-8.2.2867
OS: xubuntu-18.04.5

Dominique wrote:

Describe the bug
Syntax highlighting with text property does not work well when setting currentline.
To Reproduce
$ cat > text-prop-and-set-cul.vim <<EOF
" www xxx yyy zzz

" Source this script with:
"   $ vim --clean -c 'so %' text-prop-and-set-cul.vim
" Then press j k and to move the cursor on line 2 and line 1 and
" notice that:
" - yyy which uses matchdd() is highlighted in red background
"   in line 1 as expected.
" - xxx which uses text property is not highlighted in red background
"   in line1 when current line is line 1 (BUG).
"
" Is there a way to make text property highlighted in the current line
" just like with matchadd()?

set termguicolors cursorline
hi CursorLine guifg=NONE guibg=#303030 gui=none term=none
\             cterm=none ctermfg=darkgrey ctermbg=grey

" Highlight xxx using a text property.
call prop_type_add('my_prop', {'highlight': 'Error'})
call prop_add(1, 7, {'type': 'my_prop', 'length': 3})

" Highlight yyy using matchadd().
call matchadd('Error', 'yyy\%1l')
EOF

$ vim --clean -c 'so %' text-prop-and-set-cul.vim

Then in normal mode, press j and k  to move the cursor outside and on of the first line.
Notice that:

yyy which uses matchadd() is highlighted in red background in line 1 as expected.
xxx which uses a text property is not highlighted in red background in line 1 when current line is line 1 (BUG).

Expected behavior
The text xxx should be highlighted in red background whether the cursor is on the first line or not (as what happens with matchadd()).
Screenshots

I think we need more control over how text properties are displayed when
other highlighting is present.  Fist thing to do is to document the
current priorities (which isn't that simple) and define a way for text
properties to go somewhere in between.
--
This is the polymorph virus!  Follow these instructions carefully:

Send this message to everybody you know.
Format your harddisk.
Thank you for your cooperation in spreading the most powerful virus ever!

/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \
///                                                                      \
\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

authors: brammool dpelle


text:
Redraw statusline and tabline later for empty 'showcmd'

Problem:    Statusline and tabline may be redrawn unnecessarily for
'showcmdloc' if already marked for redraw.
Solution:   Mark for redraw later when showcmd buffer is empty.

The same pattern could be applied with clear_cmdline for 'showcmdloc' == "last" but that will be less impactful as opposed to statusline/tabline which may run user scripts. But it could avoid redundantly clearing the showcmd area if clear_cmdline was already set.

source: gharchive/pull-request


text:
Fix emoji_list script to use updated Vim 9 syntax

Vim 9 deprecated "let" in favor of "var" for variable declaration. Fix script to match.

I'll include it, thanks.

authors: brammool ychin


text:
Add SF Symbols to double-wide emoji list for macOS

Only do this for macOS because they would not render correctly outside of Apple ecosystem anyway as these are private symbols and not standardized under Unicode.

Just for context, Apple introduced a list of symbols called SF Symbols. It was previously for iOS only and then added to macOS 11 (Big Sur) (see documentation).
The symbols are primarily designed to be loaded through APIs by doing something like this in code:[NSImage imageWithSystemSymbolName:@"paintbrush" accessibilityDescription:nil]], which will load the "paintbrush" symbol. However, the symbols are also available to be used in-place with other text as Unicode, but Apple is using a private symbol range for them, kind of similar to say how https://fontawesome.com/ works.
This change adds support for those list of symbols and show them as double-wide as otherwise they would look a little weird. Only do this on Apple platforms as they won't render anyway in other OSes. I also couldn't find an official list of unicode range, and I just copied all the symbols out from the builtin SF Symbols app in macOS and inspected the values.

This is what it looks like before/after the change:
Before (using macOS Terminal):

After (using macOS Terminal):

The text I used for this (you can only see them if you are using latest macOS or iOS devices):
􀈂􀈃􀈄􀈅􀈆􀈇􀈈􀈉􀈊􀈋􀈌􀈍􀈎􀈏􀓨􀤑􀦇􀈐􀒋􀉥􀉦􀉧􀧚􀓩􀣳􀈑􀈒􀈓􀈔􀜧􀜨􀈕􀈖􀈗􀈘􀈙􀈚􀈛􀈜􀧆􀧇􀈝􀈞􀣕􀣖􀣍􀣎􀤰􀤱􀬔
􀬕􀈟􀈠􀈡􀈢􀈣􀈤􀒌􀒍􀈥􀈦􀈧􀈨􀈩􀈪􀈫􀈬􀤂􀤃􀩎􀩒􀩏􀩓􀩐􀩔􀩑􀩕􀩬􀩭􀪹􀪺􀩮􀩯􀤜􀤝􀥾􀨪􀤄􀤅􀨤􀨥􀈭􀈮􀈯􀈰􀈱􀈲􀈳􀈴􀈵
􀈶􀈷􀈸􀈹􀈺􀣗􀣘􀩚􀩛􀩴􀩵􀢍􀢎􀈻􀈼􀈽􀈾􀈿􀉀􀤧􀉁􀉂􀉃􀫵􀫶􀫷􀉄􀉅􀦊􀉆􀥨􀉇􀦋􀳼􀳽􀥜􀦌􀩳􀩼􀪏􀕹􀧵􀓕􀣙􀉉􀒎􀒏􀉊􀉋􀧞
􀮝􀉌􀉍􀉎􀉏􀰚􀰛􀰜􀰝􀉐􀉑􀉒􀉓􀰞􀰟􀰠􀰡􀉔􀉕􀉖􀉗􀰢􀰣􀰤􀰥􀉘􀒐􀰦􀰧􀉙􀒑􀰨􀰩􀉚􀉛􀉜􀉝􀤦􀥅􀬒􀬓􀤞􀤟􀫕􀫖􀫗􀫘􀤠􀤡􀉞
􀉟􀉠􀉡􀟍􀟎􀛯􀫓􀫔􀪃􀪄􀉢􀒔􀒕􀢏􀒖􀥪􀉣􀒠􀒡􀥕􀉤􀉨􀉩􀉪􀯑􀯒􀯓􀯧􀯨􀯩􀓣􀓤􀜕􀜖􀜗􀜘􀪼􀪽􀉫􀉬􀠃􀠄􀝊􀝋􀉭􀉮􀉯􀉰􀉱􀉲
􀉳􀉴􀉵􀉶􀭽􀭾􀉷􀉸􀉹􀉺􀏻􀏼􀓥􀓦􀦎􀦏􀆔􀩿􀪀􀪁􀪂􀆕􀆖􀆗􀆘􀆙􀆚􀆛􀆜􀆝􀆞􀆡􀆢􀆧􀯆􀣨􀜚􀪒􀆨􀥣􀥤􀥥􀥦􀯝􀝯􀆪􀤆􀆫􀆬􀆭
􀆮􀆱􀆲􀆳􀆴􀆵􀆶􀆷􀆸􀆹􀆺􀆻􀆼􀖃􀆽􀆾􀫸􀆿􀇀􀇁􀇂􀇃􀇄􀇅􀇆􀇇􀇈􀇉􀇊􀇋􀇌􀇍􀇎􀇏􀇐􀇑􀇒􀇓􀇞􀇟􀇔􀇕􀇖􀇗􀇘􀇙􀇚􀇛􀇜􀇝
􀇠􀇡􀇢􀇣􀇤􀇦􀇥􀇧􀇨􀇩􀇪􀦜􀇫􀇬􀴾􀴿􀵀􀙕􀙖􀙬􀙭􀇭􀇮􀇯􀇱􀇲􀇰􀫌􀭅􀮐􀭆􀭇􀭈􀯪􀱢􀫍􀣠􀣡􀮴􀇳􀫒􀓖􀣭􀞹􀞺􀇴􀚅􀇵􀚇􀇶
􀚸􀛝􀛞􀚹􀚺􀛟􀛠􀚻􀚼􀛡􀛢􀣺

This is mostly ported from MacVim. I'm not sure how Vim would want to support private system-native symbols like this but  I doubt this range will be used for other purposes now that Apple claimed it, so thought I would see if there is interest to merge.

I do not see a disadvantage in including this, so let's just include it.


text:
viewer blocks default key behavior

the viewer seem to consume all keydown events. So f12 to open the devtools doesn't work as well as f5 to refresh the page. Thats kinda annoying. Better only catch the cases you want to react on and let the other cases fall through

I think this is related to: https://github.com/vimaec/vim-webgl-viewer/issues/66.
Also blocks F11 (Full-Screen mode).

authors: Fuzzyma cdiggins

repo: vimaec/vim-webgl-viewer

license: MIT


text:
Cannot pass 'omitDimension' to VkFFTApp

I have a real np.array z of size (h, w, 2), and I want to batch two FFTs on z[...,0] and z[...,1] (innermost batch in VkFFT vocabulary ???), getting the results in a complex array of size (h, (w/2)+1, 2). It seems to be feasible with VkFFT, playing with the omitDimension parameter. It does not seems possible to pass this parameter to VkFFTApp.
In the current state of pyVkFFT, is my operation possible in some way?

I don't think this is possible with VkFFT - for an R2C transform, the fastest axis (last dimension in a python array with C-ordering) must be transformed.
As stated in the documentation (page 31):
pfUINT omitDimension[VKFFT_MAX_FFT_DIMENSIONS];: Disable FFT for this dimension (0 - FFT enabled, 1 - FFT disabled). Default 0. Doesn't work for R2C first axis for now. Doesn't work with convolutions.
So the only way to do this would be to change the axis order, but maybe you don't have that choice if the order in memory matters. It may also be possible to change the array strides while keeping the shape..

Thx. I guess playing with the strides would possibly enable one FFT on z[..., 0] that would be a good start. For a 1024 x 2048 x 2 float32 numpy array, what would be the right parameters to pass to VkFFTApp (shape, dim, strides, maybe axes...)?

It seems pyopencl does not like non-contiguous arrays, so using strides may not be possible in this case - only C or F arrays, not what you would need.. Maybe there's a way by manipulating the contents of the array, but not sure how.
As for the complex array approach, that's easy, just do a first transform with axes=-2 and then axes=-1 - no need for strides.

authors: vincefn yves-surrel

repo: vincefn/pyvkfft


text:
test2

Signed-off-by: vincentgoat linguohui1@huawei.com

What type of PR is this?

What this PR does / why we need it:
Which issue(s) this PR fixes:

Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?:

/lgtm

repo: vincentgoat/ke-dashboard


text:
Suggestion: Context for state instead of mutating a prop

At the moment because the svelte component that calls this library "owns" the TableHandler instance, and it's supplied as a prop to the various table components, when updating sort or filter etc., the props are mutated in the children and there's a warning (in dev) that you "shouldn't mutate what you don't own" (link to docs).
Could the state of sort, filter etc be in the context on the top level datatable component using the getContext and setContext api? I really  like way it's done in this reddit post: https://www.reddit.com/r/sveltejs/comments/1gzyv2h/comment/lz08wnm/.

Thanks for the link, interesting.
I need to create a repro then dig into this issue
#128

authors: bn-l vincjo

repo: vincjo/datatables


text:
Add contributing guidelines

This is required for community standards used during Hacktoberfest!

This has been already added

repo: vinitshahdeo/topmate-readme-badge


text:
Wrong namespaces

I think your project was created using mongodb samples.

I think so yes, as litedb and mongo api are much the same

license_source: bigquery


text:
Material question

[x] Review the documentation: https://virocore.viromedia.com/
[x] Search for existing issues: https://github.com/viromedia/virocore/issues
[x] Use the latest ViroCore release: https://virocore.viromedia.com/docs/releases
[x] Turn off Instant Run in Android Studio

Environment
Please provide the following information about your environment:

OS: android
Version: viro_1_0_13
Device(s): google pixel

Description
The fire animation on Maya is a gradient color. And transparent. And how can a virocore infuse a gradient with such a transparent color

I added the light code is also pure color. There is no gradient transparency

repo: viromedia/virocore


text:
Include test for edge-ami image type

Now that nightly repo has osbuild-composer-85-1.el9.x86_64.rpm included, osbuild-composer is able to generate an edge AMI that can be uploaded and deployed on AWS. It would be useful to include a dedicated test script for automation in downstream.
ostree-ami-image.sh uses osbuild-composer to build edge-ami image type, upload it to a S3 bucket and deploy an EC2 instance using that image.

Closing this PR and opening another one with aarch64 support and cleaner environment.


text:
Player object not instantiated on client scene when using Multiplex Transport

Describe the bug
Hello, I've tried an old version of Mirror (39.x) and things seemed to be ok until I upgraded to newer versions and started noticing a problem with the player game object.
I want my game to be playable on mobile and web GL and share the same server running on Linux VM. For this I use a Multiplex Transport that has 2 sub-transports : KCP & Simple Web Socket.
I launch a server only on the server, and client only on the client, the StartClient() always succeeds to establish a connection to the server, the player game object is created normally on the server side, but sometimes (like 30% of the times) the player game object is not created on the client side. When using a KCP only or Web Socket only transport, this problem doesn't seem to occur.
I tested using ParrelSync on 2 unity windows, and also using a built version (Mac OS build as client and Linux build as server), and the problem happens on both cases.
[IMPORTANT] How can we reproduce the issue, step by step:
You can reproduce the issue this way :

Create a new scene
Add an empty game object, let's call it "manager"
Add the following components to "manager" game object : NetworkManager, NetworkManagerHUD, KCP Transport, Simple Web Socket Transport, Multiplex Transport
Add another empty game object, let's call it "player"
Add a NetworkIdentity component to the "player"
Create a prefab for "player"
Delete "player" from the scene
On "manager" game object, add the KCP & Simple Web Socket transports to the Multiplex transports list
On "manager" game object, set the transport of "NetworkManager" to the Multiplex transport component
On "manager" game object, attach the "player" prefab to the "Player prefab" field of NetworkManager component
Now you need 2 windows to test, either do a build and launch it or use ParrelSync. You need to use Unity Editor window as a client to see the bug.
Launch the game on the 2 windows
Launch the server in "Server Only" mode in one window, using the NetworkManagerHUD GUI buttons.
Launch the client in the other window, using the NetworkManagerHUD GUI buttons and see if in the scene hierarchy there is the player game object.
Stop the client using the NetworkManagerHUD GUI buttons (or even relaunch the game), then reconnect again, do this several times.

Expected behavior
Sometimes the "player" instance is created on the client scene (and all client callbacks are called normally if there is a NetworkBehaviour attached to it), and sometimes the instance is not created at all (and no NetworkBehaviour callback is called)
However, the "player" instance is always created on the server scene
Desktop (please complete the following information):

OS: tested on MacOS and Linux
Build target: tested on Unity Editor and MacOS build
Unity version: 2019.4.23f1
Mirror version: the bug appears on Mirror 66.0.9, 67.0.1 and 67.1.0 too, but doesn't seem to appear on very old version (39.x ...)

See also #3083

sorry for the late reply :)
this is most certainly related to the int connectionId overflow: https://github.com/vis2k/Mirror/issues/3280
working on it.

should be fixed now: https://github.com/vis2k/Mirror/commit/6d60471868a83591ae8634898d40b17be832e525
if not, please reopen.


text:
Zero Allocation Networking

I'm currently working on adding a Mirror+Ignorance network backend to Dissonance Voice Chat. Dissonance itself has been written to write into preallocated and recycled byte[] buffers to ensure that it doesn't allocate anything per packet (voice packets happen at a fairly high rate, so this is important).
However I'm having some difficulty actually sending these byte buffers through Mirror without allocating something somewhere!

NetworkClient:Send(short msgType, MessageBase msg) requires me to allocate a MessageBase object.
Using NetworkConnection:TransportSend(int channelId, byte[] bytes, out byte error) is also no good, I can't specify the length without copying my packet into another array of the exact size.

I also tried to pack my data into a byte[] array formatted correctly for TransportSend and this requires more allocations:

byte[] PackMessage(ushort msgType, byte[] content) requires me to pass in a byte array of precisely the right size (one allocation+copy) and then it internally allocates a NetworkWriter containing a BinaryWriter around a MemoryStream!

would you be interested in a PR which added the following:
NetworkClient:Send(short msgType, ArraySegment<byte> data) & NetworkConnection:Send(int channelId, ArraySegment<byte> data, out byte error)
This will insert the protocol bytes into the segment if there is space available. May involve a copy to shift the offset a sufficient amount, or an allocation if there is insufficient space.
NetworkConnection:TransportSend(int channelId, ArraySegment<byte> data, out byte error)
This will call the new ServerSend or ClientSend with these arguments. Exactly the same logic as the current TransportSend, just with new types.
Transport:ServerSend(int connectionId, int channelId, ArraySegment<byte>) & Transport:ClientSend(int connectionId, int channelId, ArraySegment<byte>)
These would be implemented as virtual methods which call the normal ServerSend/ClientSend, this involves a single allocation and a copy. Implementing them as virtual ensures this does not break everything which extends Transport. Network transports can override these new send methods to do the sending with zero copies if they support it - I've already submitted a PR to ignorance which shows what this would look like: https://github.com/SoftwareGuy/Ignorance/pull/16/files

are you running into serious bottlenecks because of those allocations?
original UNET tried very hard to be allocation free, which was one of their internal requirements when writing code. original UNET was able to handle around 20-50 CCU on a good day.
with Mirror we focused on simple code (we have half the LOC than UNET had), and high level / big O optimizations instead. Mirror isn't allocation free. Mirror can handle 500+ CCU.

I must admit haven't profiled it as causing problems - I'm writing this for release to all Dissonance customers, so I can't profile it on all possible devices and I'd like to make sure I don't cause any problems in the first place! The whole of Dissonance is written with zero allocations as a main design goal so it's just kind of my default way of doing things.
If you'd rather keep Mirror simple that's fair enough, that's why I asked ahead instead of submitting a PR out of the blue. If you don't want me to make the PR for these changes go ahead and close this issue :)

Hey @vis2k, we're making a product using Mirror for Android and we'd like to avoid allocations where possible.  If we can overload the API to avoid allocations and keep simplicity, that would make this far more useful on Android.  Right now it allocates too much for our particular app since we're very very frame rate sensitive in VR.

We dont have a goal of being allocations free.  We gave a goal of simplicity and performance.
When I say performance, I mean profile it and show a problem. If something does not show in the profiler it is not worth optimizing.
The way to go about this is to open a pull request, and show the profiler with a before and after for a realistic scenario.

It should be fairly trivial to show what a GC spike looks like when these allocations add up. Someone invested in this with a real implementation should do so, as opposed to a more contrived example I would create. I know what GC does at a low level (your entire app will be basically paused during collection) but I am interested to see the effects in real world apps.
Buuuut ... I'm not a big fan of slapping an ArraySegment over this as proposed. It's been discussed before, and it's not the worst idea, but in the end it's just trading one concrete implementation for another. And I'm not just dreaming of abstract perfection, I mean that neither Array nor ArraySegment will work with my transport without forcing copies (and thus allocations) between the native and managed heap.
IMHO the right long term move is an interface, so we are no longer limited to a specific implementation and also do not break the API down the road with implementation switches. A default implementation could be provided using whatever is felt to be the general case, and could support Array and ArraySegment.
Also, I know this is asking a lot from a potential PR, but it would be very helpful to have tests in place before switching something as core as this. There is a lot of code pinned on these read/write ops and it would be nice, especially for long term maintainers, to have some level of certainly it's not getting blown up. There are already some tests, and more wouldn't hurt. Especially nice would be a test that network message binary compat hasn't been broken with older Mirror versions (unsure if that exists yet)
Also also ... I think the referenced PR is glossing over a huge part of the problem, which doesn't exist at all at the transport layer. For example when reading messages (unless I'm mistaken) the NetworkReader gets the incoming messages as byte[] and constructs a new BinaryReader and MemoryStream. In fact, entire NetworkReader/Writers are allocated and left to GC. Serious love and collaboration with existing maintainers will have to go into any potential solution which aims for zero allocation.
Just my 2 cents

@GabeBigBoxVR did you try unity's new incremental garbage collector yet? that might solve your problem.

I'm not a big fan of slapping an ArraySegment over this as proposed. It's been discussed before

Interesting, could you link to any previous discussion on it? I couldn't find any with a quick search in this repo.

neither Array nor ArraySegment will work with my transport without forcing copies (and thus allocations) between the native and managed heap.

I don't agree. If a transport wants to implement sending by directly copying the contents of an ArraySegment into a socket without any allocations that's perfectly possible. Even if the transport does copy onto the native heap I don't think it's much of a problem - a single native heap allocation is often slower than a managed allocation, but you never incur the huge GC collection delay down the line. That's all besides the point though - the point of this PR is reducing allocations before it gets into the transport layer.
For a concrete example of this I already have this very simple PR open with Ignorance which directly used the data inside the array segment and passes a pointer to it down into ENet - I tracked the execution of that all the way down to the ENet FFI call and as far as I can see there isn't a single GC allocation.

I'm not just dreaming of abstract perfection

Span<byte> 🤤

IMHO the right long term move is an interface ... switching something as core as this

That's possible I guess but it vastly expands the scope of the changes. My proposal here is to add 3 new methods which would be very simple to implement (basically s/byte[].Length/ArraySegment.Count), it wouldn't involve a breaking change the public API for users of Mirror or implementors of transport layers.

glossing over a huge part of the problem

I can only fix one thing at a time in a single PR ;)
If this gets merged in and I still have time to work on the problem I will probably move on to trying to clean up receiving allocations where possible.

I've submitted #404 to clarify exactly what API changes I'm proposing here :)

Span<byte> 🤤
Not to get too sidetracked, but I only recently started with C#. To be clear you are referring to the ref struct implementation that only exists in .NET Framework as a port from .Net Core 2.1 where it was introduced. The portable version is not the same as the one in System.Private.CoreLib, and if you look into it you will find its performance characteristics considerably poorer. I find it about 4-5x slower than an array once you need to index into it.  Even if in some miracle world Unity was using .NET Core it still doesn't get me anywhere to use Span<>. There's an assumption here somewhere about where and why my memcpys are being forced, and that all network messages will always arrive and be sent through the transport in contiguous memory. But these are not everyone's or even most people's problems, I suppose. I see them only as hurdles to more tightly integrating with lower level networking libraries.

That's possible I guess but it vastly expands the scope of the changes
Totally, I get it. Hard work is hard and there are more exciting things to do. So say we all. I don't wanna make an interface in there either, man. It's way easier to just expose more API surface to handle more apt concrete implementations. And it's better than nothing.

I'm actually not opposed to your changes, though my opinion on this means very little anyway. Something is always better than nothing, and if they reduce allocation and they are helpful for others then that is great.

I don't think we should reject this PR as from what I'm reading it's more so a case of both sides of the table have equal pros and cons, is there any killer feature or reason that would satisfy both parties?.
I do agree we need some benchmarks and/or test results, even if we use the Pong example from Mirror.

The only real con is that it increases the API surface. That's not bad, and I admit that I knee jerk reacted to this because I want a nice, neat interface and utterly minimal API surface. A good plan today is better than a great plan tomorrow, and I agree this is a good plan today

I do agree we need some benchmarks and/or test results, even if we use the Pong example from Mirror.

I'll be happy to put together a benchmark, but what exactly do you want it to demonstrate? Would you be happy with a benchmark which shows a reduction in total allocations-per-second, or perhaps an increased time-between-collections?
Demonstrating an actual speedup in the collection pass itself will be quite difficult because there are two factors at play here - collections take a certain amount of time (based on heap complexity) and happen at a certain frequency (based on allocation rate). The point of these changes is to reduce frequency of collections, not duration of collections when they do eventually happen.

I guess in case anyone isn't entirely sure of my motivations for worrying about GC, here's an overview: every allocation pushes you closer to an inevitable GC collection which will happen eventually (unless your entire game is truly zero GC alloc, basically impossible in Unity), when it does happen there are two possibilities:

Your game is quite simple, it does not need anything close to the frame time budget (15ms for 60FPS, 11ms for 90FPS). The GC collection causes no problem because the extra time it adds to the frame isn't a problem. This is going to be any simple benchmark game.
The game is quite complex, it needs close to the frame time budget. The GC collections pushes you just over that edge and you drop one or more frames.

The reason this makes me worry (and it's hard to profile) is that I could profile the demo scene (e.g. ping pong) all day as it made heavy allocations and not see any problems, the collection passes would take under a millisecond and the game itself doesn't need even close to the remaining 15ms to render the frame. However once you move into a real game scenario the heap is much more complex (collections take longer), there are many more allocations happening in the game itself (collections happen more frequently) and the game needs more time to render a frame (spare time budget per frame is smaller). So a library such as Dissonance or Mirror allocating lots could push GC over the edge of causing problems even though it's never caused an issue in a simple benchmark scene. Even worse the problems would not be easy to track down to the library in the profiler because the large obvious delay (GC.Alloc) happens on whichever random allocation triggered the collection pass.
Hopefully this answers a few questions people have alluded to in various comments:

Why am I not worried about stack allocations (e.g. new ArraySegment)? It doesn't involve the GC.
Why am I not worried about unmanaged/native heap allocations? A single one is slower to allocate, but it never triggers a GC so amortised cost is similar (but more predictable).
What about extra copying? Copying is crazy fast, I would gladly trade in ~10 extra copies of every packet for a single reduced GC allocation.
What problem does excessive GC allocation cause? No problem at all until you get close to the frame time limit, and then it causes random frame skips (possibly multiple frames dropped at once).

Span<byte> ... to be clear you are referring to the ref struct implementation that only exists in .NET Framework as a port from .Net Core 2.1

Getting wildly off track here, but yes I'm referring to the new memory primitives introduced in dotnet Core mostly for aspcore perf (Span<> and Memory<>). Read about them here and here if you're unfamiliar with the details. I've no idea about the details of how it was ported into System.Private.CoreLib for Unity or the performance characteristics of that.

TL;DR If I put together a PR including a benchmark showing increased time between allocations will that (likely) be accepted?

Is it possible to get a new demo game for testing that can have configurable scale? 1 non player AI that is walking/turning/syncing at a known rate. then at the press of a button that can be increased to 10/100/200. That could be used as the standard for stress testing?
If done correctly that might also fit in the CI pipeline?

Read about them here and here if you're unfamiliar with the details

I am familiar with it, and the links are welcome as everyone should know about the awesome stuff in Core. AFAIK it's only available at this time by using portable assemblies dropped into Unity (System.Memory package), even though I know they have an older Corelib assembly hiding inside the Editor. But I suspect that before long we will see Unity shift off the Mono track over to Core (which other major projects are also doing). JB Evain is even working at MS right now on Unity tools. And even with performance characteristics outside Core such as they are it's quite often a win to use Span/Memory to eliminate memory copying. Also a generic buffer pool is available in MemoryPool, which is very handy in avoiding allocations.
Sadly, none of these solve my issues, but that's another story. The library should cater to broader needs and let people like me fend for themselves :D
Personally re: performance metrics I feel this is a simple, non-theoretical issue. Regardless of system specs, the GC is inevitable. The question is merely how often and how long will it run. I'd still love to see a profile of someone getting murdered by a GC spike, but it's not necessary to prove to me the issue is real. I handle IO outside managed, but for everyone who doesn't (and who is considering high concurrency or even just high throughput) this should be of particular concern. Even for myself it's not much good to send/receive IO at high speeds, but pay a latency penalty waiting for managed to read/respond.

@martindevans about GC: at the moment we are more worried about the stuff on the issue tracker, dealing with source based weaver, and so on so that we can actually release our indie games without bugs.
paul's game won't fail because of a few GC spikes here and there, neither will uMMORPG. but they both might fail if there are critical bugs that users encounter that makes the game unplayable / or the server hackable.
there is a hierarchy. for example, if you teleport back 10k years and ask a cavement if he'd like a faster computer, he'd probably ask you if you were nuts and shove you out of his way so he can find some food and not starve to death tonight.
GC matters, but stability comes first. if we transition everything to arraysegments and buffer caching again then odds are we introduce new bugs. that would a huge problem right now.

they also might fail if Paul and I have to track down strange buffer sharing bugs for the next month.

I guess you didn't actually look at the changes in the related PR? 😕
It's very simple and doesn't introduce any new buffer recycling mechanics or anything complicated/buggy like that. It's just a new public method for sending a packet that doesn't force allocations (by leaving it up to the user to supply a correctly sized buffer in the first place).

@martindevans in the very least, transport maintainers can implement this PR code directly inside their own classes that inherit from Mirror.Transport. The irony of the fact that at first I didn't want this, and then ended up arguing for it is not lost on me. You especially couldn't have known that Mirror.Transport was functioning as an interface disguised as an abstract base because of Unity weirdness (which honestly I'm still puzzling over myself). This was a good fix that addressed a real issue, and I hope its exclusion doesn't sour you on the project. This code will still be just as good a fix inside the individual transports, who would have needed to implement these API calls anyway.

in the very least, transport maintainers can implement this PR code directly inside their own classes

Yep, I've actually already submitted (and merged) a PR that does exactly this for Ignorance. Once that releases I will just have to cast the underlying transport into an instance of Ignorance and use it directly in Dissonance.

I hope its exclusion doesn't sour you on the project

It's a simple difference of opinion over priorities and I can totally understand a position of keeping things as simple as possible :)

@martindevans   I did see the PR,   I agree it is not earth shattering,  but it seems pointless without any sort of benchmark

Responding to the comment by @paulpach on related PR in Ignorance repo.

it is easy to reopen a PR, but we need to see numbers.

As I said a few comments up what kind of numbers do you want to see? I guess I can demonstrate longer times between GC collections relatively easily, but demonstrating a quicker GC collection will be quite hard (for the reasons outlined in the same comment). Are you happy with a demonstration of less frequent collections?

@martindevans  set up a server where you synchronize 1000 objects with a few network components each,  connect a few clients to it.  Connect the profiler to your server and show how long it takes to synchronize them.
See for example this: https://github.com/vis2k/Mirror/pull/299#issuecomment-459745122
Obviously your PR is not going to help per se, as by itself it does not get rid of any allocation,  but you can make a POC branch where you do the changes you have in mind and profile it.

Here's the scene/setup I used for those if you want it aswell: StressTest.zip
Can just be dropped into the Mirror/Examples folder, object visibility is only updated when you touch the slider/spawn objects
It's not 100% optimal (you probably want something more regular, less spiky for fine tuning), but it should work fine for showing significant differences

authors: GabeBigBoxVR SoftwareGuy c6burns imerr martindevans paulpach uweenukr vis2k


text:
Failed to spawn scene object when connecting from editor.

This error seems to occur when loading a scene with prefabs that have network identities. The objects do not spawn on the network if connecting from an editor to a build and vis versa. The fix for this was to remove the disable scenes in front of the online/offline scenes with in the editor.

This issue doesn't seem to bad now that I've found a work around but it might be worth looking into, if you need any help reproducing it hmu on the discord (BlipBloop#2139).

This was with mirror 2186. The conversation of troubleshooting was yesterday afternoon in #help

thanks for letting me know. will test sceneIDs with disabled scenes again.

From what I can tell unet just ignored the unselected scenes.

For the sake of completeness, I suspect this issue is a sequel to #571.
I am experiencing quite the same behavior using current master branch (latest commit) in Pong example with Ball scene GameObject right now. So I am trying to fill in the blanks in these issues.
Note that it is implied that two builds are working together correctly and its true for me.
In order to reproduce it:

Import mirrors Assets to an empty project
Open Assets\Mirror\Examples\Pong\Scenes\Scene.unity
Build it and run.
Create Host in standalone program
Hit Play in the Editor and connect as client. Expected behavior: Ball is present in both host and client scenes. Experienced behavior: Ball works correctly in the host but It is absent in the client. Client logs error message.

When I try it in reverse (editor is host and development build is client) the behavior is the same.

Appendix: Balls` Network information for my case.

looking into this now..

@OMOH98 pong bug fixed: https://github.com/vis2k/Mirror/commit/62fc7386739f7f6390b4941f73474303862a177c . this happened when the scene was not in build settings. sorry about that.

looking into the mismatch when using disabled scenes now. will probably hash the scene name after all. unity's build index behaviour is way too strange.

See also #573 in case that's also a Scene ID issue.

@vis2k thats fine, thanks! I would happily try it when I can.
Right now though I cant get rid of a dozen of compiler errors inside weaver in current master (latest commit) right out of the box. It looks like this.

In order to reproduce, create new project and drag Mirror\Assets\Mirror folder inside project assets directory.

Update: I got rid of these by brute force: I commented out the entire Extentions class in Mirror\Editor\Weaver\Extentions.cs
Will try now.

@vis2k  I`m sorry. Scene object behavior is quite the same to what I described earlier here. It seems not to be related to presence of the scene in build settings (tested both cases).
Also It seems that latest commits introduced NetworkTransform falilure: server does no sync with localPlayerAuthority objects (client rocket in Pong case). Here is a demo.

Can you try a fresh project? Those weaver errors are strange

Yep. With a fresh project and contemporary master there are same errors about ambiguous calls to extension methods.
As I rule out all content of Extentions class in Mirror\Editor\Weaver\Extentions.cs, compile errors disappear, but error log messages appear on compilation as follows:

They were here earlier, I just didnt notice them as they didnt prevent neither entering play mode nor building.
By the way, weird Ball`s behavior persists.

I am not exactly versed with using assemblies, though it may be helpful.
On my machine, VisualStudio's Show definition thing indicates that there are two instances of Extensions class. One is in in PROJECT_NAME\Assets\Mirror\Editor\Weaver\Extentions.cs and another is in PROJECT_NAME\Assets\Mirror\Plugins\Mirror.Weaver.dll.
Is that OK?

@OMOH98 please delete Mirror.Weaver.dll - that file isn't needed anymore, we deleted it in the latest Mirror version.
the disabled scene bug is fixed in latest Mirror version now. thanks for reporting!

@vis2k Thank you for operative response!
It is likely that its my bad with Mirror.Weaver.dll: I has overwritten old files in intermediary folder. Sorry about that.
Pong example works well. Thanks again.

thanks for reporting

any time


text:
R4: The background work provided in Section 2 is appropriate, however the work by Merouane et al. on TIMING seems related. Some of the steps align heavily with this work. I don't think this will require any sort of formal comparison, but I suspect their lab will find this work particularly useful - it may even work out of the box for many of the metrics they're using.

https://doi.org/10.1093/bioinformatics/btv355

I didn't look at the paper very closely. This seems more related to Zangle/Judson-Torres than our publication. More focused on analysis, with some custom visualizations, but not so much a visualization system. It could still fit in somewhere though potentially.

repo: visdesignlab/Loon


text:
Add a way to filter by any variable

For example filter by drg weight with brushing. Might use lineup and might require us extracting the lineup filtering component into something we can mount

**Stuff that we already have charts/queries on:
Categorical:**
Year
surgeon ID
anesthesiologists ID
Mortality
Numerical:
APR_DRG_WEIGHT
Transfused units
Ventilator minutes
Some other filters that Ryan mentioned would be useful ( and we currently don’t have):
of tubes of blood drawn during the admission (In the lab values table, unique container IDs should each indicate one tube of blood.)
Temperature (if <36C, it’s harder for blood to clot)
pH (if below normal, it’s harder for blood to clot)
Creatinine level (this is a lab value that indicates kidney dysfunction if elevated)
A drug called dideoxyarginine vasopressin (or DDAVP): this relates to creatinine above. When creatinine is high, platelets do not work to stop bleeding. DDAVP helps the platelets work in this situation.
Other important drugs: prothrombin complex concentrate (trade name is Kcentra), recombinant factor VIIa, vitamin K.
preexisting comorbidities (diabetes, hypertension, renal failure, endocarditis, smoker, liver disease), body mass index (BMI),
received Amicar or tranexamic acid before or during surgery.

authors: JackWilb angelicalin

repo: visdesignlab/bloodvis


text:
[Feat] Security Proxy

Target Use Case
Currently, this project's APIProvider only supports direct a API connection using an API key. However, if I am to make a public web app which uses this package, I do not want to expose my API key on the frontend.
Proposal
Allow the APIProvider component to support proxying all API requests to the backend server where the API key can be appended and then forwarded to the requested target.

I'm not sure this would actually work for the Maps JavaScript API.
First off, exposing the maps api-key publicly is the only officially supported way of using the Google Maps JavaScript API. I have never seen any application redirecting the requests via a proxy like you suggest and I would be curious to hear more about the need for this.
As far as I know, the validation of the key has to happen on the client (and possibly only on the client). The API will, after initially bootstrapping (and before actually rendering the map), send a validation-request containing the API-key and the current URL to an API server. If this request doesn't contain the API-key, an error-message will be shown, the map will not show or both (I'm not sure what exactly would happen in this case).

Well this is certainly curious. What is to prevent someone from stealing my API key and using it for his own purposes? The key is linked to my billing profile, so having it used by an unauthorized party could incur charges on my Google account. That is my current understanding, anyway. Am I misunderstanding the purpose and usage of the key?

I'm not sure this would actually work for the Maps JavaScript API.
First off, exposing the maps api-key publicly is the only officially supported way of using the Google Maps JavaScript API. I have never seen any application redirecting the requests via a proxy like you suggest and I would be curious to hear more about the need for this.
As far as I know, the validation of the key has to happen on the client (and possibly only on the client). The API will, after initially bootstrapping (and before actually rendering the map), send a validation-request containing the API-key and the current URL to an API server. If this request doesn't contain the API-key, an error-message will be shown, the map will not show or both (I'm not sure what exactly would happen in this case).

Well this is certainly curious. What is to prevent someone from stealing my API key and using it for his own purposes? The key is linked to my billing profile, so having it used by an unauthorized party could incur charges on my Google account. That is my current understanding, anyway. Am I misunderstanding the purpose and usage of the key?

Understood.
The way we've been handling this in almost all cases was by restricting the keys to a limited set of URLs and
limiting the APIs enabled for that key to a minimal set of required APIs.
Additionally, you can you can create quotas for API usage and set up alerts and project-wide limits with regards to the money spent.
Also see the official security best-practices.

I'm closing this since there doesn't seem to be anything to be done here. Please reopen if you want to discuss this further.

This would be great a feature, since URL restriction can be bypassed or even a simple bug on the client side could cause huge bill.
Other than that, there's more advantages that comes with proxying like user authentication, audience restriction, throttling and caching.
From my end, I've successfully implemented all these features thanks to proxying. I'm using pnpm patch as of now, but it would be nicer to have a native way to set hostname.

[...] URL restriction can be bypassed or even a simple bug on the client side could cause a huge bill.

That is true, but in practice I rarely saw stolen API keys being used maliciously. What I've seen far more often is careless use of APIs, bugs etc. racking up cost – a proxy isn't going to help with that.
Also, you can (and probably should) set up alerts, spending limits and quotas for the maps API to prevent that from ever being a problem.
This whole topic of configuring the API keys and security considerations is something I would like to add to our documentation when I find the time.

Other than that, there's more advantages that comes with proxying like user authentication, audience restriction, throttling and caching.

I agree with all of these points. Just wanted to add that the ToS explicitly forbids caching.

From my end, I've successfully implemented all these features thanks to proxying. I'm using pnpm patch as of now, but it would be nicer to have a native way to set hostname.

Can you share a bit more about how this works with the Maps JavaScript API? Can you actually render a map while loading the entire JS through a proxy?

Proxying is also 1 of the recommended ways to protect API keys in apps using web services.

This is referring to the Data-APIs and not the Maps JavaScript API.

repo: visgl/react-google-maps


text:
FAQ enhanced -additional home button removal and scroll effect update

Title of the Pull Request

[X] Have you renamed the PR Title in a meaningful way?

Related Issue

Closes: #678
Description

Additional home button in front of canvas title removed
while opening faq question, an unwanted scroll-bar can be seen which is disturbing the user effect -> it was changed.

How Has This Been Tested? ⚙
By running on live server
Screenshots 📷

Before:
https://github.com/user-attachments/assets/2e559a83-96b2-42d5-b3b2-00553290facc
After:
https://github.com/user-attachments/assets/1a33d18e-472f-482b-9e11-48139afbb27b
Type of change
What sort of changes have you made:

[X] Bug fix (non-breaking change which fixes an issue)
[X] New feature (non-breaking change which adds functionality)
[X] Code style update (formatting, local variables)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] This change requires a documentation update

Checklist

[X] My code follows the code style of this project.
[X] I have followed the contribution guidelines
[X] I have performed a self-review of my own code.
[X] I have ensured my changes don't generate any new warnings or errors.
[X] I have updated the documentation (if necessary).
[X] I have resolved all merge conflicts.

@somyadipghosh kindly review this PR.

repo: vishanurag/Canvas-Editor


text:
Add a Table of Contents

@visheshrwl
The Readme file will get enhanced with a Table of Contents.
Please assign me this issue.

@visheshrwl please respond, Sir.

Hey @ManaGit7 ! 👋
First off, I want to extend a huge thank you to all of you for your amazing contributions to this project! Your support and hard work mean a lot, and I truly appreciate everything you do. 🙏
I have a small favor to ask: if you think I’ve been helpful and supportive throughout your contributions, I would be honored if you could nominate me by filling out this form: Nominate me.
Your nomination would mean the world to me, and it’s a great way to help me continue supporting our awesome community. Thanks again for all the amazing work, and let's keep making great things happen! 🚀
Best,
Vishesh

repo: visheshrwl/Uber-like


text:
Install triggert jeden Run apt update

Sollte angepasst werden, sodass nicht jeden run ein unnoetiges update getriggert wird.
Source
Fix?
 onlyif => "/bin/bash -c 'exit $(( $(( $(date +%s) - $(stat -c %Y /var/lib/apt/lists/$( ls /var/lib/apt/lists/ -tr1|tail -1 )) )) <= 604800 ))'"

Sollte update nur ausfuehren wenn die repos aelter als eine Woche sind.

Dürfte ja gefixt sein:
https://github.com/vision-it/vision-icinga2/blob/production/manifests/common/install.pp#L38

authors: jacksgt nce


text:
smart file opener

Is your feature request related to a problem?
When opening a file, if you click "Guess from file name/extension" to select a file type VisIt should use to open, if you type a letter on the keyboard, VisIt will highlight the first filetype that starts with that letter, but if you type another letter, VisIt will highlight the first filetype that starts with that second letter, rather than highlighting the first filetype that starts with the first letter and the second letter.
i.e. it would be nice if, to use the plaintext reader, a user could simply type "pl" and visit would highlight the plaintext reader, rather than highlighting first PARTRAN and then lata.
Is this worth our time?

I wonder if this is all handled in Qt somewhere and we just need to set the right flags/options for the text-entry menu.

repo: visit-dav/visit


text:
feat(net): add support for .netstandard2.0

Description
Implements support for netstandard2.0 to expand the wide range of use for this library.

Hi @prosser
I would very much appreciate your input and testing of this. I am attempting to multi-target this library for both .net8.0 and .netstandard2.0. It will be a slow painful process but I believe I can make it work.


text:
edit-config error

HI!
When trying to edit any postgresql parameter, patroni throws the following error at the stage of saving changes
With sincere respect,
Damir
root@pgvdooh03:/home/dchibilyaev#` patronictl edit-config
Traceback (most recent call last):
  File "/usr/local/bin/patronictl", line 8, in <module>
    sys.exit(ctl())
             ^^^^^
  File "/usr/lib/python3/dist-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/patroni/ctl.py", line 2135, in edit_config
    show_diff(before_editing, after_editing)
  File "/usr/local/lib/python3.11/dist-packages/patroni/ctl.py", line 1930, in show_diff
    markup_to_pager(PatchStream(buf), opts)
  File "/usr/local/lib/python3.11/dist-packages/ydiff.py", line 639, in markup_to_pager
    theme=opts.theme)
          ^^^^^^^^^^
AttributeError: type object 'opts' has no attribute 'theme'
root@pgvdooh03:/home/dchibilyaev# patronictl edit-config
Traceback (most recent call last):
  File "/usr/local/bin/patronictl", line 8, in <module>
    sys.exit(ctl())
             ^^^^^
  File "/usr/lib/python3/dist-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/patroni/ctl.py", line 2135, in edit_config
    show_diff(before_editing, after_editing)
  File "/usr/local/lib/python3.11/dist-packages/patroni/ctl.py", line 1930, in show_diff
    markup_to_pager(PatchStream(buf), opts)
  File "/usr/local/lib/python3.11/dist-packages/ydiff.py", line 639, in markup_to_pager
    theme=opts.theme)
          ^^^^^^^^^^
AttributeError: type object 'opts' has no attribute 'theme'
root@pgvdooh03:/home/dchibilyaev# patronictl edit-config
Not changed

The error seems to occur due to the incompatibility of Patroni and the ydiff dependency, where the theme attribute is missing in the opt object.
which version of autobase are you using?

You can also change the parameters using automation - https://autobase.tech/docs/management/configuration

HI! When trying to edit any postgresql parameter, patroni throws the following error at the stage of saving changes With sincere respect, Damir
root@pgvdooh03:/home/dchibilyaev#` patronictl edit-config
Traceback (most recent call last):
  File "/usr/local/bin/patronictl", line 8, in <module>
    sys.exit(ctl())
             ^^^^^
  File "/usr/lib/python3/dist-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/patroni/ctl.py", line 2135, in edit_config
    show_diff(before_editing, after_editing)
  File "/usr/local/lib/python3.11/dist-packages/patroni/ctl.py", line 1930, in show_diff
    markup_to_pager(PatchStream(buf), opts)
  File "/usr/local/lib/python3.11/dist-packages/ydiff.py", line 639, in markup_to_pager
    theme=opts.theme)
          ^^^^^^^^^^
AttributeError: type object 'opts' has no attribute 'theme'
root@pgvdooh03:/home/dchibilyaev# patronictl edit-config
Traceback (most recent call last):
  File "/usr/local/bin/patronictl", line 8, in <module>
    sys.exit(ctl())
             ^^^^^
  File "/usr/lib/python3/dist-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/patroni/ctl.py", line 2135, in edit_config
    show_diff(before_editing, after_editing)
  File "/usr/local/lib/python3.11/dist-packages/patroni/ctl.py", line 1930, in show_diff
    markup_to_pager(PatchStream(buf), opts)
  File "/usr/local/lib/python3.11/dist-packages/ydiff.py", line 639, in markup_to_pager
    theme=opts.theme)
          ^^^^^^^^^^
AttributeError: type object 'opts' has no attribute 'theme'
root@pgvdooh03:/home/dchibilyaev# patronictl edit-config
Not changed

downgrade version ydiff:
pip3 install --force-reinstall -v "ydiff==1.3"

Try ydiff==1.4.2 and patroni==4.0.4
Related: https://github.com/patroni/patroni/pull/3216

Thanks for the help!
There was an incompatibility with version 3.3.2 and we updated it to 4.0.4
Made remove_cluster:
ansible-playbook remove_cluster.yml -e "remove_postgres=true remove_etcd=true" -i inventory"
We went to VS code from where we opened cluster and in /vars/main.yml
We changed the parameter and specified the version
patroni_install_version: 4.0.4
And re-deployed the cluster
ansible-playbook deploy_pgcluster.yml -i inventory
Everything worked, thanks!

Thanks for the help!
There was an incompatibility with version 3.3.2 and we updated it to 4.0.4
Made remove_cluster:
ansible-playbook remove_cluster.yml -e "remove_postgres=true remove_etcd=true" -i inventory"
We went to VS code from where we opened cluster and in pgpro/vars/main.yml
We changed the parameter and specified the version
patroni_install_version: 4.0.4
And re-deployed the cluster
Everything worked, thanks!

authors: DamirChib ivan777git vitabaks

repo: vitabaks/autobase


text:
Array order not respected in checklist.

@vitalets , thanks for this great package. I have no issues with it other than this:
When an array is sent to x-editable sorted alphabetically. x-editable rearranges the order based on key value.
http://jsfiddle.net/wmc0ck6h/
I'm guessing it's an easy one to fix?

Having the same issue as well, I need to display a list of user id's but they are getting sorted by their actual id's and not alphabetically.

Just found something in the docs https://vitalets.github.io/x-editable/docs.html
It seems the array has to follow the {value:1, text:foo} format otherwise sorting is not guaranteed. Made changes to my code and the listing is showing alphabetically now.

Shoot, I'm not seeing this in the doc's..

authors: CaMer0n Trimakas hbalagtas

repo: vitalets/x-editable

license: mit


text:
Change completed status on WC

https://trello.com/c/jaLFTRSP/33-change-completed-status-on-wc

Note: found a filemaker extension that provides syntax higlighting for VScode.
https://marketplace.visualstudio.com/items?itemName=jwillinghalpern.filemaker-vscode
Scripts are almost unreadable for me in filemaker, partly due to white background, and partly due to lack of folding, search etc that are available in text editors.
Copy and paste from FM script editor unfortunately does not preserve indents, but at least now can read the actions more easily.

Orders table (renamed to orders) includes a Select field (renamed to select).
Input: All orders marked select

Initially could not connect to development WC rest API because not served https
https://stackoverflow.com/questions/42593704/cannot-list-resources-error-from-woocommerce-rest-api

Done - can now update status to any value across all selected orders.

repo: vitalseeds/vs-data-api


text:
Failed to resolve entry for package "crypto"

Describe the bug
I'm using Vite as a scaffold for my project when out of nowhere it encountered an issue. I noticed when the live preview in browser stopped working.
The error is:
✘ [ERROR] Failed to resolve entry for package "crypto". The package may have incorrect main/module/exports specified in its package.json. [plugin vite:dep-pre-bundle]

    node_modules/esbuild/lib/main.js:1360:21:
      1360 │         let result = await callback({

  This error came from the "onResolve" callback registered here:

    node_modules/esbuild/lib/main.js:1279:20:
      1279 │       let promise = setup({
           ╵                     ^
  The plugin "vite:dep-pre-bundle" was triggered by this import

    ../../../../../../../node_modules/@appium/support/build/lib/fs.js:12:45:
      12 │ var _crypto = _interopRequireDefault(require("crypto"));

✘ [ERROR] Failed to resolve entry for package "crypto". The package may have incorrect main/module/exports specified in its package.json. [plugin vite:dep-pre-bundle]

    node_modules/esbuild/lib/main.js:1360:21:
      1360 │         let result = await callback({
           ╵                      ^
  This error came from the "onResolve" callback registered here:

    node_modules/esbuild/lib/main.js:1279:20:
      1279 │       let promise = setup({
           ╵                     ^

  The plugin "vite:dep-pre-bundle" was triggered by this import

    ../../../../../../../node_modules/package-changed/lib/get-package-hash.js:7:39:
      7 │ var crypto_1 = __importDefault(require("crypto"));
        ╵                                        ~~~~~~~~
✘ [ERROR] Failed to resolve entry for package "crypto". The package may have incorrect main/module/exports specified in its package.json. [plugin vite:dep-pre-bundle]

    node_modules/esbuild/lib/main.js:1360:21:
      1360 │         let result = await callback({
           ╵                      ^
20:18:10 [vite] error while updating dependencies:
Error: Build failed with 5 errors:
node_modules/esbuild/lib/main.js:1360:21: ERROR: [plugin: vite:dep-pre-bundle] Failed to resolve entry for package "crypto". The package may have incorrect main/module/exports specified in its package.json.

I've deleted the node module file as well as package-lock.json and clean installed, but encounter the issue straight away.
In the console:

"vite": "^4.2.0"
node v: 16.18.0

Steps to repro:
I just randomly encountered it.. was working fine before, I naturally started my project with: npm create vite@latest
Reproduction
Steps above
Steps to reproduce
No response
System Info
MacOS 12.5.1
Versions above

Used Package Manager
npm
Logs

 Click to expand
```
npm run dev                                                      1 ↵  1988  20:35:27

multi-step-form@0.0.0 dev
vite

Port 5173 is in use, trying another one...
VITE v4.2.1  ready in 308 ms
➜  Local:   http://127.0.0.1:5174/
➜  Network: use --host to expose
➜  press h to show help
✘ [ERROR] Failed to resolve entry for package "crypto". The package may have incorrect main/module/exports specified in its package.json. [plugin vite:dep-pre-bundle]
node_modules/esbuild/lib/main.js:1360:21:
  1360 │         let result = await callback({
       ╵                      ^

at packageEntryFailure (file:///Users/chaffe/Documents/Code/JavaScript/personal/frontend-mentor-react/multi-step-form-main/multi-step-form/node_modules/vite/dist/node/chunks/dep-79892de8.js:23266:11)
at resolvePackageEntry (file:///Users/chaffe/Documents/Code/JavaScript/personal/frontend-mentor-react/multi-step-form-main/multi-step-form/node_modules/vite/dist/node/chunks/dep-79892de8.js:23263:5)
at tryNodeResolve (file:///Users/chaffe/Documents/Code/JavaScript/personal/frontend-mentor-react/multi-step-form-main/multi-step-form/node_modules/vite/dist/node/chunks/dep-79892de8.js:23000:20)
at Context.resolveId (file:///Users/chaffe/Documents/Code/JavaScript/personal/frontend-mentor-react/multi-step-form-main/multi-step-form/node_modules/vite/dist/node/chunks/dep-79892de8.js:22762:28)
at Object.resolveId (file:///Users/chaffe/Documents/Code/JavaScript/personal/frontend-mentor-react/multi-step-form-main/multi-step-form/node_modules/vite/dist/node/chunks/dep-79892de8.js:43314:46)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async file:///Users/chaffe/Documents/Code/JavaScript/personal/frontend-mentor-react/multi-step-form-main/multi-step-form/node_modules/vite/dist/node/chunks/dep-79892de8.js:63611:21
at async file:///Users/chaffe/Documents/Code/JavaScript/personal/frontend-mentor-react/multi-step-form-main/multi-step-form/node_modules/vite/dist/node/chunks/dep-79892de8.js:23589:34
at async requestCallbacks.on-resolve (/Users/chaffe/Documents/Code/JavaScript/personal/frontend-mentor-react/multi-step-form-main/multi-step-form/node_modules/esbuild/lib/main.js:1360:22)
at async handleRequest (/Users/chaffe/Documents/Code/JavaScript/personal/frontend-mentor-react/multi-step-form-main/multi-step-form/node_modules/esbuild/lib/main.js:723:13)

This error came from the "onResolve" callback registered here:
node_modules/esbuild/lib/main.js:1279:20:
  1279 │       let promise = setup({
       ╵                     ^

at setup (file:///Users/chaffe/Documents/Code/JavaScript/personal/frontend-mentor-react/multi-step-form-main/multi-step-form/node_modules/vite/dist/node/chunks/dep-79892de8.js:23569:19)
at handlePlugins (/Users/chaffe/Documents/Code/JavaScript/personal/frontend-mentor-react/multi-step-form-main/multi-step-form/node_modules/esbuild/lib/main.js:1279:21)
at buildOrContextImpl (/Users/chaffe/Documents/Code/JavaScript/personal/frontend-mentor-react/multi-step-form-main/multi-step-form/node_modules/esbuild/lib/main.js:968:5)
at Object.buildOrContext (/Users/chaffe/Documents/Code/JavaScript/personal/frontend-mentor-react/multi-step-form-main/multi-step-form/node_modules/esbuild/lib/main.js:776:5)
at /Users/chaffe/Documents/Code/JavaScript/personal/frontend-mentor-react/multi-step-form-main/multi-step-form/node_modules/esbuild/lib/main.js:2172:68
at new Promise (<anonymous>)
at Object.context (/Users/chaffe/Documents/Code/JavaScript/personal/frontend-mentor-react/multi-step-form-main/multi-step-form/node_modules/esbuild/lib/main.js:2172:27)
at Object.context (/Users/chaffe/Documents/Code/JavaScript/personal/frontend-mentor-react/multi-step-form-main/multi-step-form/node_modules/esbuild/lib/main.js:2012:58)
at prepareEsbuildOptimizerRun (file:///Users/chaffe/Documents/Code/JavaScript/personal/frontend-mentor-react/multi-step-form-main/multi-step-form/node_modules/vite/dist/node/chunks/dep-79892de8.js:44840:35)

The plugin "vite:dep-pre-bundle" was triggered by this import
../../../../../../../node_modules/@appium/support/build/lib/fs.js:12:45:
  12 │ var _crypto = _interopRequireDefault(require("crypto"));
     ╵                                              ~~~~~~~~

✘ [ERROR] Failed to resolve entry for package "crypto". The package may have incorrect main/module/exports specified in its package.json. [plugin vite:dep-pre-bundle]
node_modules/esbuild/lib/main.js:1360:21:
  1360 │         let result = await callback({
       ╵                      ^

at packageEntryFailure (file:///Users/chaffe/Documents/Code/JavaScript/personal/frontend-mentor-react/multi-step-form-main/multi-step-form/node_modules/vite/dist/node/chunks/dep-79892de8.js:23266:11)
at resolvePackageEntry (file:///Users/chaffe/Documents/Code/JavaScript/personal/frontend-mentor-react/multi-step-form-main/multi-step-form/node_modules/vite/dist/node/chunks/dep-79892de8.js:23263:5)
at tryNodeResolve (file:///Users/chaffe/Documents/Code/JavaScript/personal/frontend-mentor-react/multi-step-form-main/multi-step-form/node_modules/vite/dist/node/chunks/dep-79892de8.js:23000:20)
at Context.resolveId (file:///Users/chaffe/Documents/Code/JavaScript/personal/frontend-mentor-react/multi-step-form-main/multi-step-form/node_modules/vite/dist/node/chunks/dep-79892de8.js:22762:28)
at Object.resolveId (file:///Users/chaffe/Documents/Code/JavaScript/personal/frontend-mentor-react/multi-step-form-main/multi-step-form/node_modules/vite/dist/node/chunks/dep-79892de8.js:43314:46)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async file:///Users/chaffe/Documents/Code/JavaScript/personal/frontend-mentor-react/multi-step-form-main/multi-step-form/node_modules/vite/dist/node/chunks/dep-79892de8.js:63611:21
at async file:///Users/chaffe/Documents/Code/JavaScript/personal/frontend-mentor-react/multi-step-form-main/multi-step-form/node_modules/vite/dist/node/chunks/dep-79892de8.js:23589:34
at async requestCallbacks.on-resolve (/Users/chaffe/Documents/Code/JavaScript/personal/frontend-mentor-react/multi-step-form-main/multi-step-form/node_modules/esbuild/lib/main.js:1360:22)
at async handleRequest (/Users/chaffe/Documents/Code/JavaScript/personal/frontend-mentor-react/multi-step-form-main/multi-step-form/node_modules/esbuild/lib/main.js:723:13)

This error came from the "onResolve" callback registered here:
node_modules/esbuild/lib/main.js:1279:20:
  1279 │       let promise = setup({
       ╵                     ^

at setup (file:///Users/chaffe/Documents/Code/JavaScript/personal/frontend-mentor-react/multi-step-form-main/multi-step-form/node_modules/vite/dist/node/chunks/dep-79892de8.js:23569:19)
at handlePlugins (/Users/chaffe/Documents/Code/JavaScript/personal/frontend-mentor-react/multi-step-form-main/multi-step-form/node_modules/esbuild/lib/main.js:1279:21)
at buildOrContextImpl (/Users/chaffe/Documents/Code/JavaScript/personal/frontend-mentor-react/multi-step-form-main/multi-step-form/node_modules/esbuild/lib/main.js:968:5)
at Object.buildOrContext (/Users/chaffe/Documents/Code/JavaScript/personal/frontend-mentor-react/multi-step-form-main/multi-step-form/node_modules/esbuild/lib/main.js:776:5)
at /Users/chaffe/Documents/Code/JavaScript/personal/frontend-mentor-react/multi-step-form-main/multi-step-form/node_modules/esbuild/lib/main.js:2172:68
at new Promise (<anonymous>)
at Object.context (/Users/chaffe/Documents/Code/JavaScript/personal/frontend-mentor-react/multi-step-form-main/multi-step-form/node_modules/esbuild/lib/main.js:2172:27)
at Object.context (/Users/chaffe/Documents/Code/JavaScript/personal/frontend-mentor-react/multi-step-form-main/multi-step-form/node_modules/esbuild/lib/main.js:2012:58)
at prepareEsbuildOptimizerRun (file:///Users/chaffe/Documents/Code/JavaScript/personal/frontend-mentor-react/multi-step-form-main/multi-step-form/node_modules/vite/dist/node/chunks/dep-79892de8.js:44840:35)

The plugin "vite:dep-pre-bundle" was triggered by this import
../../../../../../../node_modules/package-changed/lib/get-package-hash.js:7:39:
  7 │ var crypto_1 = __importDefault(require("crypto"));
    ╵                                        ~~~~~~~~

✘ [ERROR] Failed to resolve entry for package "crypto". The package may have incorrect main/module/exports specified in its package.json. [plugin vite:dep-pre-bundle]
node_modules/esbuild/lib/main.js:1360:21:
  1360 │         let result = await callback({
       ╵                      ^

at packageEntryFailure (file:///Users/chaffe/Documents/Code/JavaScript/personal/frontend-mentor-react/multi-step-form-main/multi-step-form/node_modules/vite/dist/node/chunks/dep-79892de8.js:23266:11)
at resolvePackageEntry (file:///Users/chaffe/Documents/Code/JavaScript/personal/frontend-mentor-react/multi-step-form-main/multi-step-form/node_modules/vite/dist/node/chunks/dep-79892de8.js:23263:5)
at tryNodeResolve (file:///Users/chaffe/Documents/Code/JavaScript/personal/frontend-mentor-react/multi-step-form-main/multi-step-form/node_modules/vite/dist/node/chunks/dep-79892de8.js:23000:20)
at Context.resolveId (file:///Users/chaffe/Documents/Code/JavaScript/personal/frontend-mentor-react/multi-step-form-main/multi-step-form/node_modules/vite/dist/node/chunks/dep-79892de8.js:22762:28)
at Object.resolveId (file:///Users/chaffe/Documents/Code/JavaScript/personal/frontend-mentor-react/multi-step-form-main/multi-step-form/node_modules/vite/dist/node/chunks/dep-79892de8.js:43314:46)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async file:///Users/chaffe/Documents/Code/JavaScript/personal/frontend-mentor-react/multi-step-form-main/multi-step-form/node_modules/vite/dist/node/chunks/dep-79892de8.js:63611:21
at async file:///Users/chaffe/Documents/Code/JavaScript/personal/frontend-mentor-react/multi-step-form-main/multi-step-form/node_modules/vite/dist/node/chunks/dep-79892de8.js:23589:34
at async requestCallbacks.on-resolve (/Users/chaffe/Documents/Code/JavaScript/personal/frontend-mentor-react/multi-step-form-main/multi-step-form/node_modules/esbuild/lib/main.js:1360:22)
at async handleRequest (/Users/chaffe/Documents/Code/JavaScript/personal/frontend-mentor-react/multi-step-form-main/multi-step-form/node_modules/esbuild/lib/main.js:723:13)

This error came from the "onResolve" callback registered here:
node_modules/esbuild/lib/main.js:1279:20:
  1279 │       let promise = setup({
       ╵                     ^

at setup (file:///Users/chaffe/Documents/Code/JavaScript/personal/frontend-mentor-react/multi-step-form-main/multi-step-form/node_modules/vite/dist/node/chunks/dep-79892de8.js:23569:19)
at handlePlugins (/Users/chaffe/Documents/Code/JavaScript/personal/frontend-mentor-react/multi-step-form-main/multi-step-form/node_modules/esbuild/lib/main.js:1279:21)
at buildOrContextImpl (/Users/chaffe/Documents/Code/JavaScript/personal/frontend-mentor-react/multi-step-form-main/multi-step-form/node_modules/esbuild/lib/main.js:968:5)
at Object.buildOrContext (/Users/chaffe/Documents/Code/JavaScript/personal/frontend-mentor-react/multi-step-form-main/multi-step-form/node_modules/esbuild/lib/main.js:776:5)
at /Users/chaffe/Documents/Code/JavaScript/personal/frontend-mentor-react/multi-step-form-main/multi-step-form/node_modules/esbuild/lib/main.js:2172:68
at new Promise (<anonymous>)
at Object.context (/Users/chaffe/Documents/Code/JavaScript/personal/frontend-mentor-react/multi-step-form-main/multi-step-form/node_modules/esbuild/lib/main.js:2172:27)
at Object.context (/Users/chaffe/Documents/Code/JavaScript/personal/frontend-mentor-react/multi-step-form-main/multi-step-form/node_modules/esbuild/lib/main.js:2012:58)
at prepareEsbuildOptimizerRun (file:///Users/chaffe/Documents/Code/JavaScript/personal/frontend-mentor-react/multi-step-form-main/multi-step-form/node_modules/vite/dist/node/chunks/dep-79892de8.js:44840:35)

The plugin "vite:dep-pre-bundle" was triggered by this import
../../../../../../../node_modules/package-changed/lib/get-packagelock-hash.js:7:39:
  7 │ var crypto_1 = __importDefault(require("crypto"));
    ╵                                        ~~~~~~~~

✘ [ERROR] Failed to resolve entry for package "crypto". The package may have incorrect main/module/exports specified in its package.json. [plugin vite:dep-pre-bundle]
node_modules/esbuild/lib/main.js:1360:21:
  1360 │         let result = await callback({
       ╵                      ^

at packageEntryFailure (file:///Users/chaffe/Documents/Code/JavaScript/personal/frontend-mentor-react/multi-step-form-main/multi-step-form/node_modules/vite/dist/node/chunks/dep-79892de8.js:23266:11)
at resolvePackageEntry (file:///Users/chaffe/Documents/Code/JavaScript/personal/frontend-mentor-react/multi-step-form-main/multi-step-form/node_modules/vite/dist/node/chunks/dep-79892de8.js:23263:5)
at tryNodeResolve (file:///Users/chaffe/Documents/Code/JavaScript/personal/frontend-mentor-react/multi-step-form-main/multi-step-form/node_modules/vite/dist/node/chunks/dep-79892de8.js:23000:20)
at Context.resolveId (file:///Users/chaffe/Documents/Code/JavaScript/personal/frontend-mentor-react/multi-step-form-main/multi-step-form/node_modules/vite/dist/node/chunks/dep-79892de8.js:22762:28)
at Object.resolveId (file:///Users/chaffe/Documents/Code/JavaScript/personal/frontend-mentor-react/multi-step-form-main/multi-step-form/node_modules/vite/dist/node/chunks/dep-79892de8.js:43314:46)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async file:///Users/chaffe/Documents/Code/JavaScript/personal/frontend-mentor-react/multi-step-form-main/multi-step-form/node_modules/vite/dist/node/chunks/dep-79892de8.js:63611:21
at async file:///Users/chaffe/Documents/Code/JavaScript/personal/frontend-mentor-react/multi-step-form-main/multi-step-form/node_modules/vite/dist/node/chunks/dep-79892de8.js:23589:34
at async requestCallbacks.on-resolve (/Users/chaffe/Documents/Code/JavaScript/personal/frontend-mentor-react/multi-step-form-main/multi-step-form/node_modules/esbuild/lib/main.js:1360:22)
at async handleRequest (/Users/chaffe/Documents/Code/JavaScript/personal/frontend-mentor-react/multi-step-form-main/multi-step-form/node_modules/esbuild/lib/main.js:723:13)

This error came from the "onResolve" callback registered here:
node_modules/esbuild/lib/main.js:1279:20:
  1279 │       let promise = setup({
       ╵                     ^

at setup (file:///Users/chaffe/Documents/Code/JavaScript/personal/frontend-mentor-react/multi-step-form-main/multi-step-form/node_modules/vite/dist/node/chunks/dep-79892de8.js:23569:19)
at handlePlugins (/Users/chaffe/Documents/Code/JavaScript/personal/frontend-mentor-react/multi-step-form-main/multi-step-form/node_modules/esbuild/lib/main.js:1279:21)
at buildOrContextImpl (/Users/chaffe/Documents/Code/JavaScript/personal/frontend-mentor-react/multi-step-form-main/multi-step-form/node_modules/esbuild/lib/main.js:968:5)
at Object.buildOrContext (/Users/chaffe/Documents/Code/JavaScript/personal/frontend-mentor-react/multi-step-form-main/multi-step-form/node_modules/esbuild/lib/main.js:776:5)
at /Users/chaffe/Documents/Code/JavaScript/personal/frontend-mentor-react/multi-step-form-main/multi-step-form/node_modules/esbuild/lib/main.js:2172:68
at new Promise (<anonymous>)
at Object.context (/Users/chaffe/Documents/Code/JavaScript/personal/frontend-mentor-react/multi-step-form-main/multi-step-form/node_modules/esbuild/lib/main.js:2172:27)
at Object.context (/Users/chaffe/Documents/Code/JavaScript/personal/frontend-mentor-react/multi-step-form-main/multi-step-form/node_modules/esbuild/lib/main.js:2012:58)
at prepareEsbuildOptimizerRun (file:///Users/chaffe/Documents/Code/JavaScript/personal/frontend-mentor-react/multi-step-form-main/multi-step-form/node_modules/vite/dist/node/chunks/dep-79892de8.js:44840:35)

The plugin "vite:dep-pre-bundle" was triggered by this import
../../../../../../../node_modules/etag/index.js:21:21:
  21 │ var crypto = require('crypto')
     ╵                      ~~~~~~~~

✘ [ERROR] Failed to resolve entry for package "crypto". The package may have incorrect main/module/exports specified in its package.json. [plugin vite:dep-pre-bundle]
node_modules/esbuild/lib/main.js:1360:21:
  1360 │         let result = await callback({
       ╵                      ^

at packageEntryFailure (file:///Users/chaffe/Documents/Code/JavaScript/personal/frontend-mentor-react/multi-step-form-main/multi-step-form/node_modules/vite/dist/node/chunks/dep-79892de8.js:23266:11)
at resolvePackageEntry (file:///Users/chaffe/Documents/Code/JavaScript/personal/frontend-mentor-react/multi-step-form-main/multi-step-form/node_modules/vite/dist/node/chunks/dep-79892de8.js:23263:5)
at tryNodeResolve (file:///Users/chaffe/Documents/Code/JavaScript/personal/frontend-mentor-react/multi-step-form-main/multi-step-form/node_modules/vite/dist/node/chunks/dep-79892de8.js:23000:20)
at Context.resolveId (file:///Users/chaffe/Documents/Code/JavaScript/personal/frontend-mentor-react/multi-step-form-main/multi-step-form/node_modules/vite/dist/node/chunks/dep-79892de8.js:22762:28)
at Object.resolveId (file:///Users/chaffe/Documents/Code/JavaScript/personal/frontend-mentor-react/multi-step-form-main/multi-step-form/node_modules/vite/dist/node/chunks/dep-79892de8.js:43314:46)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async file:///Users/chaffe/Documents/Code/JavaScript/personal/frontend-mentor-react/multi-step-form-main/multi-step-form/node_modules/vite/dist/node/chunks/dep-79892de8.js:63611:21
at async file:///Users/chaffe/Documents/Code/JavaScript/personal/frontend-mentor-react/multi-step-form-main/multi-step-form/node_modules/vite/dist/node/chunks/dep-79892de8.js:23589:34
at async requestCallbacks.on-resolve (/Users/chaffe/Documents/Code/JavaScript/personal/frontend-mentor-react/multi-step-form-main/multi-step-form/node_modules/esbuild/lib/main.js:1360:22)
at async handleRequest (/Users/chaffe/Documents/Code/JavaScript/personal/frontend-mentor-react/multi-step-form-main/multi-step-form/node_modules/esbuild/lib/main.js:723:13)

This error came from the "onResolve" callback registered here:
node_modules/esbuild/lib/main.js:1279:20:
  1279 │       let promise = setup({
       ╵                     ^

at setup (file:///Users/chaffe/Documents/Code/JavaScript/personal/frontend-mentor-react/multi-step-form-main/multi-step-form/node_modules/vite/dist/node/chunks/dep-79892de8.js:23569:19)
at handlePlugins (/Users/chaffe/Documents/Code/JavaScript/personal/frontend-mentor-react/multi-step-form-main/multi-step-form/node_modules/esbuild/lib/main.js:1279:21)
at buildOrContextImpl (/Users/chaffe/Documents/Code/JavaScript/personal/frontend-mentor-react/multi-step-form-main/multi-step-form/node_modules/esbuild/lib/main.js:968:5)
at Object.buildOrContext (/Users/chaffe/Documents/Code/JavaScript/personal/frontend-mentor-react/multi-step-form-main/multi-step-form/node_modules/esbuild/lib/main.js:776:5)
at /Users/chaffe/Documents/Code/JavaScript/personal/frontend-mentor-react/multi-step-form-main/multi-step-form/node_modules/esbuild/lib/main.js:2172:68
at new Promise (<anonymous>)
at Object.context (/Users/chaffe/Documents/Code/JavaScript/personal/frontend-mentor-react/multi-step-form-main/multi-step-form/node_modules/esbuild/lib/main.js:2172:27)
at Object.context (/Users/chaffe/Documents/Code/JavaScript/personal/frontend-mentor-react/multi-step-form-main/multi-step-form/node_modules/esbuild/lib/main.js:2012:58)
at prepareEsbuildOptimizerRun (file:///Users/chaffe/Documents/Code/JavaScript/personal/frontend-mentor-react/multi-step-form-main/multi-step-form/node_modules/vite/dist/node/chunks/dep-79892de8.js:44840:35)

The plugin "vite:dep-pre-bundle" was triggered by this import
../../../../../../../node_modules/cookie-signature/index.js:5:21:
  5 │ var crypto = require('crypto');

</details>

### Validations

- [X] Follow our [Code of Conduct](https://github.com/vitejs/vite/blob/main/CODE_OF_CONDUCT.md)
- [X] Read the [Contributing Guidelines](https://github.com/vitejs/vite/blob/main/CONTRIBUTING.md).
- [X] Read the [docs](https://vitejs.dev/guide).
- [X] Check that there isn't [already an issue](https://github.com/vitejs/vite/issues) that reports the same bug to avoid creating a duplicate.
- [X] Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to [vuejs/core](https://github.com/vuejs/core) instead.
- [X] Check that this is a concrete bug. For Q&A open a [GitHub Discussion](https://github.com/vitejs/vite/discussions) or join our [Discord Chat Server](https://chat.vitejs.dev/).
- [X] The provided reproduction is a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example) of the bug.

@Chaffexd How do you have solved that issue?

i found it. Do not use crypto as an npm package... it is deprecated and built in in Node JS. https://www.npmjs.com/package/crypto

authors: Chaffexd ihr-it-projekt

repo: vitejs/vite


text:
Confused about using http/1 when server.proxy is used

Documentation is

[ ] Missing
[ ] Outdated
[X] Confusing
[ ] Not sure?

Explain in Detail

Enable TLS + HTTP/2. Note this downgrades to TLS only when the server.proxy option is also used.
from https://vitejs.dev/config/server-options.html#server-https

From code https://github.com/vitejs/vite/blob/9d7d45e56f98787cd6c7f4245ad5f9562d409997/packages/vite/src/node/http.ts#L104
As shown in the title, I am confused about using http/1 when server.proxy is used and why can't use http/2.
Your Suggestion for Changes
Use http/2 when server.proxy is used
Reproduction
No response
Steps to reproduce
No response

It's because http-proxy doesn't support http2.

See https://github.com/vitejs/vite/discussions/7611#discussioncomment-2925988

See #7611 (reply in thread)

Thank you for your guidance, I will try to use existing vite plugin or create one new plugin that match my own.

I'll close this issue as a duplicate of #4184.

authors: haijie-x sapphi-red


text:
Compiler is broken and generates code that behaves differently than running vite in dev server mode

Describe the bug
We have an app where you play a crossword board game like Scrabble. After updating our JS modules, several users reported that mobile drag-and-drop of the tiles was scrolling the entire page, instead of just dragging and dropping the tiles.
We eventually figured out that the error occurs if we run vite build then vite preview, but not if we run just plain vite. This implies to us that the vite compiler is broken.
Reproduction
https://github.com/woogles-io/liwords/pull/1359/files
Steps to reproduce
It is close to impossible for us to generate a minimal reproduction since we don't have the time to cross-check all the different variables / libraries. However, the following pull request, in which we replaced vite with rsbuild, and had no other changes besides dependencies to both those libraries, show that the problem lies with the vite compiler:
https://github.com/woogles-io/liwords/pull/1359/files
A video is attached that shows me running the error case with vite in preview mode (where dragging tiles drags the screen), then vite in dev server mode, where there is no bug.
We deployed the rsbuild change and that works fine on prod.
https://github.com/user-attachments/assets/d8322b11-3de5-4341-867c-b3585a1fd879
System Info
System:
    OS: Linux 6.10 Arch Linux
    CPU: (16) x64 12th Gen Intel(R) Core(TM) i5-12600K
    Memory: 55.09 GB / 62.59 GB
    Container: Yes
    Shell: 5.2.32 - /bin/bash
  Binaries:
    Node: 22.7.0 - /usr/bin/node
    npm: 10.8.2 - /usr/bin/npm
  npmPackages:
    @vitejs/plugin-react: ^4.3.1 => 4.3.1
    vite: ^5.4.2 => 5.4.2

### Used Package Manager

npm

### Logs

_No response_

### Validations

- [X] Follow our [Code of Conduct](https://github.com/vitejs/vite/blob/main/CODE_OF_CONDUCT.md)
- [X] Read the [Contributing Guidelines](https://github.com/vitejs/vite/blob/main/CONTRIBUTING.md).
- [X] Read the [docs](https://vitejs.dev/guide).
- [X] Check that there isn't [already an issue](https://github.com/vitejs/vite/issues) that reports the same bug to avoid creating a duplicate.
- [X] Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to [vuejs/core](https://github.com/vuejs/core) instead.
- [X] Check that this is a concrete bug. For Q&A open a [GitHub Discussion](https://github.com/vitejs/vite/discussions) or join our [Discord Chat Server](https://chat.vitejs.dev/).
- [X] The provided reproduction is a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example) of the bug.

We'd need a repro for this even though it may be hard to identify what's wrong. Many of us who triage and fix issues also don't have the time to dig into your project, especially since you'd know best around your codebase to trim down what's unnecessary for the issue. Perhaps it would be easier to try different Vite versions if a specific one was causing the bug. (If you're happy with rsbuild as a workaround, that's fine too.)

For future reference, probably this was a duplicate of #16065

authors: bluwy domino14 sapphi-red