E631: write_buf_line()(): write failed

While using ale in MacVim GUI this message appears in the command line very very frequently. There are also some others I am seeing with a simple .vimrc
set nocompatible
set nu
set runtimepath+=~/.vim.old/neobundles/ale

E631: write_buf_line()(): write failed
E631: write_buf_line()(): write failed
Error detected while processing function <SNR>20_TimerHandler[22]..<SNR>20_ApplyLinter[3]..<SNR>20_ClearJob:
line    1:
E716: Key not present in Dictionary: process 25042 dead
E15: Invalid expression: s:job_info_map[a:job].linter
line   15:
E716: Key not present in Dictionary: process 25042 dead
line   16:
E121: Undefined variable: linter
E116: Invalid arguments for function remove
line    1:
E716: Key not present in Dictionary: process 25043 dead
E15: Invalid expression: s:job_info_map[a:job].linter
line   15:
E716: Key not present in Dictionary: process 25043 dead
line   16:
E121: Undefined variable: linter
E116: Invalid arguments for function remove
E631: write_buf_line()(): write failed
E631: write_buf_line()(): write failed
E631: write_buf_line()(): write failed
E631: write_buf_line()(): write failed

Vim Version is 8.0.020 and there is no .vim/ for this test (as seen above only ale is being added manually).

Can you confirm that this occurs only in MacVim and not vim?

From the output above, it looks like it's maybe failing to create new jobs for some reason, or maybe it's failing to pipe output to a process in MacVim? I'm not quite sure. Let me know if this problem exists in versions of Vim other than MacVim. If anyone has MacVim and feels like debugging this, let me know. I might be able to get a hold of a Mac myself to test it at some point, if the issue is specific to Macs.

What type of file were you editing at the time? That might help.

It's working fine for me in MacVim.
As far as I remember, MacVim is just a GUI similar to a terminal emulator. It should still use the regular vim underneath.

@w0rp , the long backtrace seems like it was a one time fluke but the write_buf_line is persistant in both MacVim an vim. I was editing a JavaScript file. The write_buf_line error happens with a sh file too. I didn't test more than this.

The message seems to happen only on Entering/Leaving insert mode.
BTW, @prashcr , I recall seeing some bug where MacVim had some issues with job/channel support while Vim didn't in the past. However, it doesn't seem relevant here as it is happening in both.

And it doesn't happen with nvim.

Here are some more traces in MacVim on a javascript file while trying to edit it. So I guess it's not too hard to reproduce.
Error detected while processing function <SNR>134_HandleExitVim[1]..<SNR>134_HandleExit[36]..ale#sign#SetSigns:
line   36:
E885: Not possible to change sign ALEErrorSign
E631: write_buf_line()(): write failed
Error detected while processing function <SNR>134_HandleExitVim[1]..<SNR>134_HandleExit[36]..ale#sign#SetSigns:
line   36:
E885: Not possible to change sign ALEErrorSign
1 line less
1 line less
E631: write_buf_line()(): write failed
Error detected while processing function <SNR>134_HandleExitVim[1]..<SNR>134_HandleExit[36]..ale#sign#SetSigns:
line   36:
E885: Not possible to change sign ALEErrorSign
1 more line; before #408  3 seconds ago
Error detected while processing function <SNR>134_TimerHandler[22]..<SNR>134_ApplyLinter[3]..<SNR>134_ClearJob:
line    1:
E716: Key not present in Dictionary: process 84884 dead
E15: Invalid expression: s:job_info_map[a:job].linter
line   15:
E716: Key not present in Dictionary: process 84884 dead
line   16:
E121: Undefined variable: linter
E116: Invalid arguments for function remove
E631: write_buf_line()(): write failed
Error detected while processing function <SNR>134_HandleExitVim[1]..<SNR>134_HandleExit[36]..ale#sign#SetSigns:
line   36:
E885: Not possible to change sign ALEErrorSign
E631: write_buf_line()(): write failed
Error detected while processing function <SNR>134_HandleExitVim[1]..<SNR>134_HandleExit[36]..ale#sign#SetSigns:
line   36:
E885: Not possible to change sign ALEErrorSign

E631: write_buf_line()(): write failed
Error detected while processing function <SNR>134_HandleExitVim[1]..<SNR>134_HandleExit[36]..ale#sign#SetSigns:
line   36:
E885: Not possible to change sign ALEErrorSign
1 line less
E631: write_buf_line()(): write failed
Error detected while processing function <SNR>134_HandleExitVim[1]..<SNR>134_HandleExit[36]..ale#sign#SetSigns:
line   36:
E885: Not possible to change sign ALEErrorSign

Thank you for all of the information above. Could you share the file you were editing, or something like it?
It looks like one of the errors is setting some bad signs. What happens if you set let g:ale_set_signs = 0? That should disable the signs for now. If the errors stop then, then the problem lies in the signs feature.
The error might be tied to closing the input stream too quickly or something, which could be hard to detect. What happens if you increase g:ale_lint_delay to some higher number in your vimrc file, say 500?

Here's a sample file I can reproduce errors with. I think without the jshint directive header up top the error is not happening:
https://gist.github.com/junkblocker/8ecf9fc7940a8e42802f241cdf4fcedc
Setting g:ale_set_signs = 0 makes the ALEErrorSign error disappear but the following is still seen in messages. g:ale_lint_delay = 500 didn't seem to matter.
"/tmp/foo" 2018L, 93661C
E631: write_buf_line()(): write failed
E631: write_buf_line()(): write failed
E631: write_buf_line()(): write failed
E631: write_buf_line()(): write failed
E492: Not an editor command: W
"/private/tmp/foo" 2019L, 93662C written
E631: write_buf_line()(): write failed
E631: write_buf_line()(): write failed
"/private/tmp/foo" 2019L, 93662C written
E631: write_buf_line()(): write failed
E631: write_buf_line()(): write failed
Error detected while processing function <SNR>20_TimerHandler[22]..<SNR>20_ApplyLinter[3]..<SNR>20_ClearJob:
line    1:
E716: Key not present in Dictionary: process 5766 dead
E15: Invalid expression: s:job_info_map[a:job].linter
line   15:
E716: Key not present in Dictionary: process 5766 dead
line   16:
E121: Undefined variable: linter
E116: Invalid arguments for function remove
line    1:
E716: Key not present in Dictionary: process 5768 dead
E15: Invalid expression: s:job_info_map[a:job].linter
line   15:
E716: Key not present in Dictionary: process 5768 dead
line   16:
E121: Undefined variable: linter
E116: Invalid arguments for function remove
E631: write_buf_line()(): write failed
E631: write_buf_line()(): write failed
1 more line; before #12  2 seconds ago
1 line less; before #11  4 seconds ago
1 line less; before #10  5 seconds ago
1 line less; before #9  5 seconds ago
1 line less; before #8  6 seconds ago
1 line less; before #7  7 seconds ago
1 line less; before #6  9 seconds ago
E631: write_buf_line()(): write failed

I'll ask for some assistance with this issue. I have limited access to Mac computers myself.

Similiar on Windows 7: when I opening a PHP buffer, it says
Error detected while processing function <SNR>79_TimerHandler[22]..<SNR>79_ApplyLinter:
line   49:
E631: write_buf_line()(): write failed

The file is 500 lines long, but on the line 104 there is a sign (the only one): syntax error, unexpected end of file in -
First time when I switch buffer it says:
Error detected while processing function <SNR>79_TimerHandler[22]..<SNR>79_ApplyLinter[3]..<SNR>79_ClearJob:
line    1:
E716: Key not present in Dictionary: process 2812 dead
E15: Invalid expression: s:job_info_map[a:job].linter
line   15:
E716: Key not present in Dictionary: process 2812 dead
line   16:
E121: Undefined variable: linter
E116: Invalid arguments for function remove
Error detected while processing function <SNR>79_TimerHandler[22]..<SNR>79_ApplyLinter:
line   49:
E631: write_buf_line()(): write failed

Most of the bugs coming random (expect the E631: write_buf_line()(): write failed) - sometimes there's no warnings on the same file. It's weird... (o_O')
Versions
Vim: 8.0.21
PHP: 5.6.24 (via XAMPP)
Ps.: Sorry for my Englisch.

I tried to repeat this with Vim 8 on Linux with the JS file above and a very large PHP file, but I haven't been able to repeat the bug yet. If anyone can repeat the bug and wants to have a go at fixing it, go for it. I'll be working on some Windows support now.

I have this the same on my vim.

Could you let me know which OS and which version of Vim you are using, etc?

Here's a sample which produces the bug: https://gist.github.com/BimbaLaszlo/2e664f9da38197c687605cfcdac648f9

I can't repeat the issue using that file on my machine. Are you running Mac OSX or Windows? I'm wondering if someone who can repeat the issue can have a look at this. I haven't been able to find out what the problem is yet.

Using Windows. The file is truncated to the size where the bug just appears - removing a character will make it disappear. I will make another one to compare. The content not matters, but the number of characters maybe.

Hmm, maybe the issue only happens on Windows or Mac? That seems to be what I'm seeing above. I'm working on some Windows support at the moment, so maybe I'll come across it eventually.

https://gist.github.com/BimbaLaszlo/cfc87d01fbacac320576f2d9620c88a7
Delete some char in the middle of the file and the bug still alive, but deleting the last line makes it disappear.

I've tried out both the JS and PHP samples in my Macvim 8.0-110 (vim 8.0.0003) and vim 8.0.0019 and do not see the errors, if that is helpful.

Tried out the JS sample and do not see the errors.

OMG! (o_O) I just forgot to install JS linter... (-_-') Will be back with the results... If anybody tries out the samples, be sure to install the linter of that first!

@junkblocker Please explain me how can I set up a JS linter - never used it.

@BimbaLaszlo , I just installed jshint binary globally per http://jshint.com/install/
sudo npm install -g jshint

Nothing else. No special configuration etc.

I have another issue: JSHint is installed and works fine (type .\foo.js | jshint --reporter unix - prints the warnings) but Ale does not shows any sign or messages, nor bugs.

Could you paste the output of jshint?

$ type .\foo.js | jshint --reporter unix -
stdin:6:23: Missing semicolon.
stdin:7:27: Missing semicolon.
stdin:8:27: Missing semicolon.
stdin:9:27: Missing semicolon.
stdin:10:27: Missing semicolon.
...etc...

Can you run the same from inside of Vim with :!? It looks like the regex parses those lines. If you place echo a:output inside of the handler function in ale_linters/javascript/jshint.vim, does it receive any of the error lines?

It works from Vim too. Didn't caught a:lines and function! ale_linters#javascript#jshint#Handle(buffer, lines) never called (wrote echo "OK" to the first line of it, but it didn't appeared). More over I put echo job_info(a:linter.job) after this line https://github.com/w0rp/ale/blob/d97e25a2601d58a1d7e8ae72fb787210f2588a69/plugin/ale/zmain.vim#L220 - the output is allways:
{'status': 'fail', 'stoponexit': 'term', 'exitval': 0, 'exit_cb': 0, 'channel': channel fail, 'process': 0}

The output of the job_info() on the PHP samples is:
{'status': 'dead', 'stoponexit': 'term', 'exitval': -1, 'exit_cb': 0, 'channel': channel 2 open, 'process': 3952}

The channel number is increasing after every run.

The output on a "working" PHP file (no bugs appearing) is:
{'status': 'run', 'stoponexit': 'term', 'exitval': 0, 'exit_cb': 0, 'channel': channel 2 open, 'process': 3380}

It looks like it's failing to start a job for you, for some reason. Which OS were you testing that on? I could try running jshint on the same OS myself. So far, I have been unable to repeat the bugs mentioned in this issue.

I have discovered some very odd behaviour for Windows, which I guess is a bug with job_start()? If you run system('jshint'), it will execute just fine. You'll get some output. If you run job_start('jshint'), it will fail. If you run job_start('jshint.cmd') it will succeed. It looks like job_start doesn't respect PATHEXT, where system does.
I'll see if I can write a workaround for that.

@BimbaLaszlo I just pushed a command which I believe should fix this issue on Windows now. Take a look. Someone in the #vim channel suggested trying cmd /c, and that does seem to work.

I think I finally see where the original errors came from. It was failing to write to a program which couldn't be run, and then failing to get the job out of the dictionary again because it didn't succeed. I'll see If I can change the key used for the dictionaries and handle that better.

The cmd /c solved to lint Javascript, it works fine - there is no E631: write_buf_line()(): write failed bugs in it, but in PHP files still there.

I pushed a commit which fixes how jobs are stored in the map. That should hopefully fix some of the errors. I tested editing a PHP file on Windows 7 with php.exe in my PATH, and I can see the linter errors. Would you like to try again?

Linting works, but E361 still exists, plus I got a new error on the second PHP sample:
Error detected while processing function <SNR>83_HandleExitVim[1]..<SNR>83_HandleExit[1]..<SNR>83_GetJobID:
line    8:
E916: not a valid job
E475: Invalid argument: 0
E121: Undefined variable: id
E15: Invalid expression: ch_info(job_getchannel(a:job)).id

The latter can be fixed by adding before this line:
    if a:job == 'no process'
      return
    endif

Fix works, only E361 exists now, so we came back to the original problem.

I can finally see the error on Windows. I'm having a look now. It looks like maybe Vim isn't sending the buffer data to the process on Windows, while it works on other machines, which is odd.

Don't forget that (in my case) depends on some properties of the file - some files don't dropping bugs, others do that.

@BimbaLaszlo I just pushed a commit for sending the buffer lines to the job by reading them with getbufline() instead. For some reason the job options for sending the buffer via internal Vim mechanisms to the program work very well on Linux, but not very well on Windows with large files. This processing is slower, so I have only enabled this for Windows for now. I may do this in MacVim also if it experiences the same issues.
Take a look and let me know what output you get now.

Everything works fine for me. Good job!

Nice. :+1:
@junkblocker Do you want to check this in MacVim again? The error may be present there, and if it is, I will push a commit to make MacVim do the same as Windows.

The problem is still present on MacVim.

Okay, thanks for letting me know. I have a copy of MacVim on another computer, and I believe I should be able to fix this tomorrow. It'll probably the same issue as on Windows.

@junkblocker I just pushed a commit to apply the fix in MacVim gui too. Check it out.

The error has changed to something new.
 That means that neither option for sending data to a job is working. Have you tried updating MacVim? It sounds like a bug in your version of MacVim. I tried running ALE with the examples attached to this issue with the latest MacVim on Mac OSX, and I can't see any errors.

Yes, I am running the HEAD version (8.0.027).
VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Oct 10 2016 09:52:19)
MacOS X (unix) version
Included patches: 1-27
Compiled by<EMAIL_ADDRESS>Huge version with MacVim GUI.  Features included (+) or not (-):
+acl             +diff            +jumplist        +mouse_urxvt     +scrollbind      +virtualedit
+arabic          +digraphs        +keymap          +mouse_xterm     +signs           +visual
+autocmd         +dnd             +lambda          +multi_byte      +smartindent     +visualextra
+balloon_eval    -ebcdic          +langmap         +multi_lang      +startuptime     +viminfo
+browse          +emacs_tags      +libcall         -mzscheme        +statusline      +vreplace
++builtin_terms  +eval            +linebreak       +netbeans_intg   -sun_workshop    +wildignore
+byte_offset     +ex_extra        +lispindent      +num64           +syntax          +wildmenu
+channel         +extra_search    +listcmds        +odbeditor       +tag_binary      +windows
+cindent         +farsi           +localmap        +packages        +tag_old_static  +writebackup
+clientserver    +file_in_path    +lua/dyn         +path_extra      -tag_any_white   -X11
+clipboard       +find_in_path    +menu            +perl/dyn        -tcl             -xfontset
+cmdline_compl   +float           +mksession       +persistent_undo +termguicolors   +xim
+cmdline_hist    +folding         +modify_fname    +postscript      +terminfo        -xpm
+cmdline_info    -footer          +mouse           +printer         +termresponse    -xsmp
+comments        +fork()          +mouseshape      +profile         +textobjects     -xterm_clipboard
+conceal         +fullscreen      +mouse_dec       +python/dyn      +timers          +xterm_save
+cryptv          -gettext         -mouse_gpm       -python3         +title
+cscope          -hangul_input    -mouse_jsbterm   +quickfix        +toolbar
+cursorbind      +iconv           +mouse_netterm   +reltime         +transparency
+cursorshape     +insert_expand   +mouse_sgr       +rightleft       +user_commands
+dialog_con_gui  +job             -mouse_sysmouse  +ruby/dyn        +vertsplit
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
  system gvimrc file: "$VIM/gvimrc"
    user gvimrc file: "$HOME/.gvimrc"
2nd user gvimrc file: "~/.vim/gvimrc"
       defaults file: "$VIMRUNTIME/defaults.vim"
    system menu file: "$VIMRUNTIME/menu.vim"
  fall-back for $VIM: "/Users/xxxx/Applications/MacVim.app/Contents/Resources/vim"
Compilation: clang -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_MACVIM -Wall -Wno-unknown-pragmas -pipe  -DMACOS_X_UNIX  -g -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: clang   -L. -L/usr/local/lib -L. -L/usr/local/lib  -L/usr/local/lib -o Vim -framework Cocoa -framework Carbon       -lm -lncurses  -liconv -framework Cocoa   -fstack-protector  -L/System/Library/Perl/5.18/darwin-thread-multi-2level/CORE

It have no idea why the plugin doesn't work for you. If anyone else running MacVim wants to have a look, go for it. I have tried to repeat the bug in MacVim, and I have been unable to do so.

Some new observations.

The error is not happening for a sh file I had.

For JavaScript,  the error is happening if jscs is included in linters (e.g. by default) and does not have a proper .jscsrc.

% jscs
No configuration found. Add a .jscsrc file to your project root or use the -c option.

To prove if I either exclude jscs via
let g:ale_linters = {'javascript': ['eslint', 'jshint']}

or if I create a dummy .jscsrc file
% echo '{}' > ~/.jscsrc

the error does not happen.
Also unrelated, the code in jshint.vim is not really using the executable variable
diff --git a/ale_linters/javascript/jshint.vim b/ale_linters/javascript/jshint.vim
index 577e5c1..a020ca0 100644
--- a/ale_linters/javascript/jshint.vim
+++ b/ale_linters/javascript/jshint.vim
@@ -7,6 +7,9 @@ endif

 let g:loaded_ale_linters_javascript_jshint = 1

+let g:ale_javascript_jshint_executable =
+\   get(g:, 'ale_javascript_jshint_executable', 'jshint')
+
 function! ale_linters#javascript#jshint#GetCommand(buffer)
     " Set this to the location of the jshint configuration file to
     " use a fixed location for .jshintrc
@@ -17,7 +20,7 @@ function! ale_linters#javascript#jshint#GetCommand(buffer)
         let jshint_config = ale#util#FindNearestFile(a:buffer, '.jshintrc')
     endif

-    let command = 'jshint --reporter unix'
+    let command = g:ale_javascript_jshint_executable . ' --reporter unix'

     if !empty(jshint_config)
         let command .= ' --config ' . fnameescape(jshint_config)
@@ -69,14 +72,14 @@ endfunction

 call ALEAddLinter('javascript', {
 \   'name': 'jshint',
-\   'executable': 'jshint',
+\   'executable': g:ale_javascript_jshint_executable,
 \   'command_callback': 'ale_linters#javascript#jshint#GetCommand',
 \   'callback': 'ale_linters#javascript#jshint#Handle',
 \})

 call ALEAddLinter('javascript.jsx', {
 \   'name': 'jshint',
-\   'executable': 'jshint',
+\   'executable': g:ale_javascript_jshint_executable,
 \   'command_callback': 'ale_linters#javascript#jshint#GetCommand',
 \   'callback': 'ale_linters#javascript#jshint#Handle',
 \})

I reverted my attempt at fixing the issue from before, as it didn't fix the issue, and might make matters worse.
Maybe the issue is caused by the jscs linter then. I'll try installing that and seeing if I can repeat the bug.
I'll apply your patch for the jshint linter. Sounds good to me.

Oh, it's not using the executable variable, because there never was one. That was never implemented. I'll add that anyway.

I haven't had the time to repeat this bug with jscs and solve it yet, but I'll roll the bug fix into another version if it is pretty simple.

I just experienced this in terminal vim on Mac as well (oddly, with css instead of other filetypes.)

If you have any luck with isolating the cause, let me know. My best guess is that there's something wrong with Vim in Mac terminals being able to process stdin data for jobs.

Absolutely. I'll try it on my Ubuntu laptop later to see if I can reproduce the issue.

Started seeing this today with flake8, on any edit to my .py file.

I don't have much access to Macs, so if anyone who has a Mac who wants to see if they can find out what the problem is and how to fix it, let me know.

I just encountered the same with a Fortran file. I'm running vim 8.0 on macOS.
In any case, with the default Ale settings, the error appears to only occur when the Fortran file goes above a certain length, even if the syntax is garbage.
For example, these files (each named test.f) show the error on my machine, but removing a line causes the error to vanish:

313 lines of 50 A each, 15936 characters
197 lines of 80 A each, 15957 characters
80 lines of 200 A each, 16080 characters

In each of those cases, the output that Ale sees (I think) is something along the lines of "warning: unused compilation option -ffree-format" and "error: invalid value f95 in -x f95", since gcc is symlinked to clang on macOS, and Clang doesn't (yet) know how to process Fortran files.
Changing the linter to gfortran (installed through Homebrew) results in no error occurring, although I don't get any warnings/errors. Changing the linter to a nonexistent command (e.g. aksdjgh) yields the original error.
This doesn't appear to happen on Git Bash in Windows, although I'm not sure anything is even running in the first place. It doesn't happen in Neovim either.
Based on a quick glance at the vim source, it looks like that error occurs when trying to write to a channel, but not all the text is written despite the fact there is no channel error. Maybe a buffer somewhere is getting filled too early?
vim --version outputs this:
VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Nov  8 2016 15:11:16)
MacOS X (unix) version
Included patches: 1-71
Compiled by Homebrew
Huge version without GUI.  Features included (+) or not (-):
+acl             +file_in_path    +mouse_sgr       +tag_old_static
+arabic          +find_in_path    -mouse_sysmouse  -tag_any_white
+autocmd         +float           +mouse_urxvt     +tcl
-balloon_eval    +folding         +mouse_xterm     +termguicolors
-browse          -footer          +multi_byte      +terminfo
++builtin_terms  +fork()          +multi_lang      +termresponse
+byte_offset     -gettext         -mzscheme        +textobjects
+channel         -hangul_input    +netbeans_intg   +timers
+cindent         +iconv           +num64           +title
-clientserver    +insert_expand   +packages        -toolbar
+clipboard       +job             +path_extra      +user_commands
+cmdline_compl   +jumplist        +perl            +vertsplit
+cmdline_hist    +keymap          +persistent_undo +virtualedit
+cmdline_info    +lambda          +postscript      +visual
+comments        +langmap         +printer         +visualextra
+conceal         +libcall         +profile         +viminfo
+cryptv          +linebreak       -python          +vreplace
+cscope          +lispindent      +python3         +wildignore
+cursorbind      +listcmds        +quickfix        +wildmenu
+cursorshape     +localmap        +reltime         +windows
+dialog_con      +lua             +rightleft       +writebackup
+diff            +menu            +ruby            -X11
+digraphs        +mksession       +scrollbind      -xfontset
-dnd             +modify_fname    +signs           -xim
-ebcdic          +mouse           +smartindent     -xpm
+emacs_tags      -mouseshape      +startuptime     -xsmp
+eval            +mouse_dec       +statusline      -xterm_clipboard
+ex_extra        -mouse_gpm       -sun_workshop    -xterm_save
+extra_search    -mouse_jsbterm   +syntax
+farsi           +mouse_netterm   +tag_binary
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
       defaults file: "$VIMRUNTIME/defaults.vim"
  fall-back for $VIM: "/usr/local/share/vim"
Compilation: clang -c -I. -Iproto -DHAVE_CONFIG_H   -DMACOS_X_UNIX  -g -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: clang   -L. -fstack-protector -L/usr/local/lib -L/opt/X11/lib -L/usr/local/opt/libyaml/lib -L/usr/local/opt/openssl/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/gdbm/lib -L/usr/local/opt/gmp/lib -L/usr/local/opt/libffi/lib  -L/usr/local/lib -o vim        -lncurses -liconv -framework Cocoa  -pagezero_size 10000 -image_base 100000000 -L/usr/local/lib -lluajit-5.1 -mmacosx-version-min=10.12 -fstack-protector-strong -L/usr/local/lib  -L/usr/local/Cellar/perl/5.24.0_1/lib/perl5/5.24.0/darwin-thread-multi-2level/CORE -lperl -lm -lutil -lc  -L/usr/local/opt/python3/Frameworks/Python.framework/Versions/3.5/lib/python3.5/config-3.5m -lpython3.5m -framework CoreFoundation -F/System/Library/Frameworks -framework Tcl -framework CoreFoundation -lruby.2.3.0 -lgmp -lobjc -L/usr/local/Cellar/ruby/2.3.1_2/lib

I wonder if the bug should be reported in MacVim. As near as I can tell, I'm doing everything I should be doing in VimL, and MacVim is barfing.

I mangled a copy of vim to get more information about what is going on. It appears that the write fails due to a broken pipe. I have no idea what exactly that means.

Oh, I should have made it clearer; I'm running a regular terminal install of vim.

I opened an issue on the MacVim repo for this. Maybe some answers will come from there.

What does ale do when a call to the linter doesn't return a useful message, e.g. "/bin/bash: gfortran: command not found"? I'm still curious why the error occurs with a bad "linter" but doesn't with a good one.

why issue is closed? How to fix it?

This issue is still open. No one has a solution at the moment.

how to turn off ALE for a file?

https://github.com/w0rp/ale#faq-disable-linters See here. You can specify an empty List of linters for a given filetype.

let g:ale_linters = {} does not turn ALE off

It shouldn't. You can use that dictionary to configure the linters used for a particular filetype. If you want to turn everything off, consult the online documentation with :help ale. There are a few options for disabling linting on typing, on save, on enter, etc.

it continues spamming write_buf_line after disabling linting on typing, on save, on enter, etc.

Remove the plugin then.

how about fix

This is a wrong running problem, and I don't have a solution for it. If anyone knows how to fix this problem once and for all, please do so.

This problem isn't purely the fault of this plugin. There is something wrong with certain versions of Vim on certain terminals which causes weird error output for something that the documentation says should work, but clearly doesn't. I have never been able to figure out exactly why this bug happens with some versions of Vim, and I've never seen anyone propose a workable solution.

add command to disable ALE
test it with file of type .pl (perl), size about 5k lines

I just updated ALE then I got the same error message on Ubuntu.  It appears only at the first to open Vim process.  After a second, it disappears.

@sublee I think you saw the same error message, but with a different cause.
The error describes a failure to write to a channel for a job, such as when a command doesn't read stdin. I realised that not only was the last command in a chain of commands, such as with flake8, reading stdin, but every command in the chain was reading the Vim buffer, for no good reason. I have pushed a commit now which will make it so only the last command in the chain reads the Vim buffer, which should work better, and was what I originally intended anyway.
I suppose having a command in the middle of the chain read the Vim buffer could be useful in future. I'll open an issue for an enhancement to add this option.
Try pulling again, and see if this fixes your issues.
I still don't know why the problem for this GitHub issue persists for some MacVim users. I suspect it has something to do with commands not being able to read from stdin, when they should be able to do so.

@w0rp Your patch fixed my problem.  Thank you. 😄

Aha! Great. I thought that might be the problem.

I finally have a solution for this now.
Vim 8+ lets you send Vim buffer data to a program in two ways. You can use the in_io option, or you can use ch_sendraw.  Both are blocking. Neither work for some people. So now I use neither.
Now ALE writes the Vim buffer to a temporary file, and pipes the data with < filename in whatever shell you're using. It works on every version of Vim I have at hand, so that should be that.

Awesome.

Sweet, confirmed that it is fixed. But the description of fix has me concerned for another issue. For golang, linters like gometalinter expect the source to stay in certain directories (on $GOPATH) for linting to work. Sounds like this new behavior won't work with such linting.

That'll be okay, in a sense. The Go linters are being worked on, and they will work completely differently.
Some of them might end up being tools which only run on the files on disk, versus most other things which can be checked as you're typing changes. Go tools seem so amazingly stubborn as to prevent you doing pretty much anything but compiling Go with a very specific set of directories. See issue #333


Test get_dandiset_stats

Closes #374

@jwodder  same issue here if you don't mind, issuing the PR from this repo. Thanks and sorry for the bother.

FWIW, added @jwodder into dandiarchive team to be able to submit through branches in this repo

@mgrauer Resubmitted as #466.


Replace rustful with hyper

The management code is using the rustful framework. This means we have two different versions of hyper in the code base. The API surface area is minimal enough that I think we should replace rustful with raw hyper.

Fixed in #85


refactor returning exception

Finally got some time to do the Exception returning/throwing refactoring, documented in issue #74

Would it be possible to fix the tabs to whitespaces to align with the rest of the code? Once it's done I'll merge the request :-)
Thanks


[WIP] ServiceDescriptor validation for implementation type

ServiceDescriptor constructor will throw an exception if implementation type/object can't be assigned to service type, based on issue #452.
Validation proved itself useful by finding small errors in existing unit tests.
Initially, I also had an implementation for validation of open generics, but logic for it became a bit cumbersome (link), so I've removed it for now.

@AndreyTretyak,
Thanks for having already signed the Contribution License Agreement. Your agreement was validated by .NET Foundation. We will now review your pull request.
Thanks,
.NET Foundation Pull Request Bot

This issue was moved to aspnet/Home#2333


Add custom name transformations for appsync_func and glue_

Fixes: #793
Fixes: #781

Looks good to me! Do we have automated tests for this sort of thing? Would be nice to execute that logic and vet it against ^[a-z]+(_[a-z]+)*$


How to generate my own *_normalized_proposal_list.txt which needed by gen_proposal_list.py in the first step? ?

Thanks for your great work

Have you generated yet?

Have the same question. Could you pls tell us  how to generate my own  *_normalized_proposal_list.txt? Thanks a lot.

Have you generated yet?

not yet

see
https://github.com/yjxiong/action-detection#generating-tag-proposals

see
https://github.com/yjxiong/action-detection#generating-tag-proposals

感谢您的分享，我想知道’Generating TAG proposals‘中的ACTIONNESS_RESULT_PICKLE在’Obtaining actionness score‘中生成的时候，它使用的是rgb还是flow呢


Add allowNativePasswords=true to go by default for mysql connection

https://github.com/rancher/rancher/issues/9049

LGTM


Popup (Info Baloon)

Add support for Info Balloons - Popups to display extra info. CMAPI states the the description field of the features should be string or HTML string and should be used to display a popup.

Duplicate of #252. My mistake.


switch to predictor + sagemaker session

handle input and output through predictor serializer to simplify usage
adding output handler for various model types
switch from boto3 to sagemaker session and predictor to simplify usage -> offloading sts session to users

cc @3coins, anything in here you'd want to add to sagemaker?

@shayan1897
Thanks for submitting this change. This will break all existing clients using SM endpoints with LangChain. What is the added benefit to consumers of this class by moving to the sagemaker sdk?

Closing since no response from @shayan1897


Access token from browser to server side using cors

Hi, when we are doing the request of token from our frontend is possible to fetch the data but the response throws the error No 'Access-Control-Allow-Origin'.
Error:
Access to XMLHttpRequest at 'http://localhost:53348/Token' from origin 'http://localhost:3000' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.
If in the WriteResponseAsync we set the header with => context.Response.Headers["Access-Control-Allow-Origin"] = "*";  we can fetch the data correctly.
private Task WriteResponseAsync(
int statusCode,
HttpContext context,
string content = "",
string contentType = "application/json")
{
context.Response.Headers["Content-Type"] = contentType;
context.Response.StatusCode = statusCode;
return context.Response.WriteAsync(content);
}
Thanks!

Thanks @Shurpop, let me add a registration action to configure the pipeline middlewares and update the version

@Shurpop, I have added a new configurePipeline parameter so you can register CORS in the JWTSimpleServer middleware branch
Sample:
public void ConfigureServices(IServiceCollection services)
{
services.AddSingleton<IAuthenticationProvider, CustomAuthenticationProvider>()
.AddCors()
.AddJwtSimpleServer(setup =>
{
setup.IssuerSigningKey = SigningKey;
})
.AddJwtInMemoryRefreshTokenStore()
.AddMvcCore().
AddAuthorization();
}
    public void Configure(IApplicationBuilder app, IHostingEnvironment env)
    {
        app.UseDefaultFiles();
        app.UseStaticFiles();

        app.UseJwtSimpleServer(setup =>
        {
            setup.IssuerSigningKey = SigningKey;
        }, pipeline => {

            pipeline.UseCors(setup =>
            {
                setup.AllowAnyOrigin().AllowAnyHeader().AllowAnyMethod();
            });
        });

        app.UseMvc();
    }


addFont function creation

[x] - make it work properly
[x] - migrate to a package

This looks really good, going to release it without documentation and we can give it a run and document later on.

Maybe we can add <Beta /> and put it in docs now so we don't lose track.


Jake in Windows

Here is a workaround to get jake working in windows.
I'm using similar concept that rake.bat does with ruby in windows.
you need to create "jake.bat" in the same location as node.exe with the following contents.
@ECHO OFF
@"%~dp0node.exe" "%~dp0/node_modules/jake/bin/cli.js" %*

you can then call jake from command line.

https://github.com/mde/jake/pull/66 includes windows support


Clustering should be cancelable

Original author<EMAIL_ADDRESS>(December 16, 2010 21:53:00)
Steps to reproduce the problem:

Select a column with a large number of long and different values
Select "cluster" and "nearest neighbor"
Close the cluster dialog window without waiting for results

Expected behavior would be to shutdown the clustering job.
Instead, it continues running in background, consuming all the CPU.
Version: Google Refine 2.0 [r1836]
Operating system: Mac OS X
Original issue: http://code.google.com/p/google-refine/issues/detail?id=289

@tfmorris I thought there is now a way to perhaps have a cancel for clustering using ProcessBuilder or similar?


Physics bug

Hi.
First, congratulations. The editor just looks superb. :)
Then, I was playing around with it and when you add a physic body to a object in the right-click menu, the body doesn´t fit the object is supposed to, is created displaced from it. Rather annoying.
A suggestion: could, in a distant future, be that the editor support different open source html5 engines? Likes playcanvas or babylon. One editor, several game engines.
Regards,
Belén M.

Hi
Thanks a lot. Currently the physics body does not match the transformation of the object.
I will try to fix soon for new next release.
Its a bit hard since nunuStudio is really tied to threejs, fortunatelly threejs is already a great graphics engine. I might move physics in the future from cannonjs to ammojs (interchangable).
Thanks a lot for reporting this.

Hello
This bug was been fixed in the meanwhile when you create a physics body it now matches the object transform properly.
Thanks a lot!
Cheers


Add FCO to the list

This is a resubmission of https://github.com/perl6/problem-solving/pull/82 originally submitted by @FCO. The previous PR was merged ahead of time before everyone had a chance to accept it, so this PR resubmits the same change.
Ping @JJ @jnthn @lizmat @maettu @masak @MasterDuke17 @moritz @rba @samcv @timo @tony-o @ugexe.

To prevent this from happening again, I bumped the amount of required reviews in github settings. Reason why it wasn't done before? Github doesn't have a drop down option for reviewer counts beyond 6. I had to edit and resend the web request with a bigger number, and I'm very pleased they don't limit it on the server side :)

What happens if it becomes stuck?

@FCO admins can still merge without the required number of reviews.

@FCO admins can still merge without the required number of reviews.

Not exactly.
In case someone doesn't leave a review, there's a deadline:

If a reviewer does not respond in 14 days, they are removed from the list of reviewers on that PR.

So it can only become stuck if there's a disagreement. The assumption is that grown ups will always come to an agreement, and if they really don't, maybe the change is not worth doing after all.
See https://github.com/perl6/problem-solving#acceptance.

It's my opinion these should wait until after the great renaming debate is, once again, resolved.

@tony-o well, I guess the concern is that people might start flocking into the list to cause trouble with the naming solution? I think that is possible in the future, but I feel pretty safe regarding the PRs that we have right now.

@AlexDaniel not sure it's good precedence to set, allowing a shuffling of approvers/rejectors prior to major language changes, is more the concern.

@tony-o I agree, but at the same time I think some devs didn't really get a good chance to add themselves because the problem-solving repo didn't have many tickets that actually required consensus. I don't want anyone to feel left out.

@AlexDaniel while I dislike people feeling left out making an exception on handling one of the first major issues we're facing as a community sets the precedent and reversing that will be difficult, the context will also be lost (as is it is with the renaming issue).
If it causes feelings of bitterness or resentment then the people waiting to be added might not be a good fit for making decisions in a committee, akin to the if we change the name from perl6 then I'll just stop participating in the language.

As a candidate, I would support @tony-o. Let the dust settle down first.

OK, no problem, I'll make sure not to merge this before we figure out the naming. Thank you, @tony-o and @FCO. I guess same goes for https://github.com/perl6/problem-solving/pull/83. Also, https://github.com/perl6/problem-solving/pull/87 is not even in the review stage yet, but given that it touches the language label, I think it'll need to wait too.

Is that ok to continue with this now?

Given that the Raku PR is now merged, I think it's safe to move on with this now. @maettu, @tony-o please leave a review :)

Two days left, ping @maettu, @tony-o :)

Sorry for the delay!

Also, welcome! :)


Update README.md

Updated some documentation:

stimpack has a new name
added installation steps

Due to the merge conflict, this is replaced by https://github.com/rubyatscale/packs/pull/127


Add control panel allow manage multi vllm instances

This PR import controller feature from fastchat, which make vllm could be running with its full openai compatible server of latest features.

it inherits original fastchat controller core feature, such like model registry, auto scale, model roll update

it keeps controller logic layer at minimal shape, which it would forward whatever user request pass to vllm openai compatible server worker

it would also track each worker's unfinished queue length, and adjust the request sending speed accordingly. Thus keep the whole cluster balanced, and at its full serving capability.

Currently, only v1/completions and v1/chat/completions are implemented. Along with other three interface to help check controller status.

/list_workers: show current registered workers and their status
/health: whether current controller is functional
/list_models: all registered model names

FILL IN THE PR DESCRIPTION HERE
FIX #4226
Since vllm openai compatible server is evolving rapidly, I think we may need to move the control panel feature we
see from fastchat into vllm itself, to enjoy those feature fastchat brought to us along with latest vllm functions.

Can you open an RFC for this for design discussion?

It would be good to have an open discussion about this feature as there is a real debate about what should be in or out of scope for vllm

Scope or not, there's no point to porting over FastChat's Python controller implementation, it's literally 1000x slower at scale than 1 day's worth of Rust coding.

@simon-mo @robertgshaw2-neuralmagic
RFC https://github.com/vllm-project/vllm/issues/4873 is created

Scope or not, there's no point to porting over FastChat's Python controller implementation, it's literally 1000x slower at scale than 1 day's worth of Rust code.

Yep, rust also could be a choice, since fastchat original choose python style and also the rest of vllm, we may head it up with python first, and latter people could improve it if found rust have performance benefit.

@leiwen83 I apologize, I did not mean to be rude. The idea is good, this type of controller is very useful.
But I have seen first-hand how incredibly slow FastAPI is at this particular job, even after you eliminate 90% of the current code's overhead through things like using persistent sockets instead of individual calls.
The user experience is bad. It will end up taking more dev time to deal with Issues than it would take to just make it performant from the beginning.


Make plugin base URL configurable with a reasonable default.

Every deployment of the plugin currently has to change your-app-url.com to whatever hostname their plugin is deployed under. This simple change introduces a new environment variable, PLUGIN_API_BASE, that will be used as the base url in the outputs of ai-plugin.json and openapi.yaml. If not provided, it'll use https://<Host header value>. It uses string Template class to substitute $base_url in the original text files.
The original files are read on every request, but my assumption is that these APIs are not called heavily so that is okay. Otherwise, we could consider caching the outputs in memory. I am also just making this small part of ai-plugin.json configurable, rather than the whole thing. Those of us with multiple environments would want everything to stay the same in these files besides the base url, since we'll deploy it to multiple endpoints (and hosts).

@isafulf please help review - we are trying to get this in for Azure OpenAI


Change the JSS error code for incorrect claims.

Currently when claims don't match the CA, we return < HTTP/1.1 503 SERVICE UNAVAILABLE, but it should be 403 Forbidden

This is addressed by PR #44


README update to include package.json change @dialectlabs/react package

Thank you, sir!

thank you for reviewing and pointing that out!


Can't make bar chart after groupby.

Thank you very much for making great package. I'm really into it. I'd like to report the bug with the latest version
Environment
pandas                            0.23.3
pandas-bokeh                      0.1.1
Python 3.6
The program
import numpy as np
import pandas as pd
import pandas_bokeh
pandas_bokeh.output_file("Interactive Plot.html")

x = np.arange(0, 100, 0.1)
df = pd.DataFrame(x)
result = df.groupby(pd.cut(df[0], np.arange(0, 100, 10))).sum()
result.plot_bokeh.bar()

Error
$ python '/tmp/tmp.GaLHNeE1Eg/test.py'
Traceback (most recent call last):
  File "/tmp/tmp.GaLHNeE1Eg/test.py", line 20, in <module>
    result.plot_bokeh.bar()
  File "/home/myuser/.pyenv/versions/miniconda3-4.1.11/lib/python3.6/site-packages/pandas_bokeh/plot.py", line 1845, in bar
    return self(kind="bar", x=x, y=y, **kwds)
  File "/home/myuser/.pyenv/versions/miniconda3-4.1.11/lib/python3.6/site-packages/pandas_bokeh/plot.py", line 1659, in __call__
    return plot(self._data, *args, **kwargs)
  File "/home/myuser/.pyenv/versions/miniconda3-4.1.11/lib/python3.6/site-packages/pandas_bokeh/plot.py", line 879, in plot
    show(p)
  File "/home/myuser/.pyenv/versions/miniconda3-4.1.11/lib/python3.6/site-packages/bokeh/io/showing.py", line 137, in show
    return _show_with_state(obj, state, browser, new, notebook_handle=notebook_handle)
  File "/home/myuser/.pyenv/versions/miniconda3-4.1.11/lib/python3.6/site-packages/bokeh/io/showing.py", line 175, in _show_with_state
    _show_file_with_state(obj, state, new, controller)
  File "/home/myuser/.pyenv/versions/miniconda3-4.1.11/lib/python3.6/site-packages/bokeh/io/showing.py", line 158, in _show_file_with_state
    filename = save(obj, state=state)
  File "/home/myuser/.pyenv/versions/miniconda3-4.1.11/lib/python3.6/site-packages/bokeh/io/saving.py", line 83, in save
    _save_helper(obj, filename, resources, title, template)
  File "/home/myuser/.pyenv/versions/miniconda3-4.1.11/lib/python3.6/site-packages/bokeh/io/saving.py", line 145, in _save_helper
    html = file_html(obj, resources, title=title, template=template)
  File "/home/myuser/.pyenv/versions/miniconda3-4.1.11/lib/python3.6/site-packages/bokeh/embed/standalone.py", line 281, in file_html
    (docs_json, render_items) = standalone_docs_json_and_render_items(models)
  File "/home/myuser/.pyenv/versions/miniconda3-4.1.11/lib/python3.6/site-packages/bokeh/embed/util.py", line 340, in standalone_docs_json_and_render_items
    docs_json[docid] = doc.to_json()
  File "/home/myuser/.pyenv/versions/miniconda3-4.1.11/lib/python3.6/site-packages/bokeh/document/document.py", line 781, in to_json
    doc_json = self.to_json_string()
  File "/home/myuser/.pyenv/versions/miniconda3-4.1.11/lib/python3.6/site-packages/bokeh/document/document.py", line 810, in to_json_string
    return serialize_json(json, indent=indent)
  File "/home/myuser/.pyenv/versions/miniconda3-4.1.11/lib/python3.6/site-packages/bokeh/core/json_encoder.py", line 213, in serialize_json
    return json.dumps(obj, cls=BokehJSONEncoder, allow_nan=False, indent=indent, separators=separators, sort_keys=True, **kwargs)
  File "/home/myuser/.pyenv/versions/miniconda3-4.1.11/lib/python3.6/json/__init__.py", line 238, in dumps
    **kw).encode(obj)
  File "/home/myuser/.pyenv/versions/miniconda3-4.1.11/lib/python3.6/json/encoder.py", line 199, in encode
    chunks = self.iterencode(o, _one_shot=True)
  File "/home/myuser/.pyenv/versions/miniconda3-4.1.11/lib/python3.6/json/encoder.py", line 257, in iterencode
    return _iterencode(o, 0)
  File "/home/myuser/.pyenv/versions/miniconda3-4.1.11/lib/python3.6/site-packages/bokeh/core/json_encoder.py", line 135, in default
    return self.transform_python_types(obj)
  File "/home/myuser/.pyenv/versions/miniconda3-4.1.11/lib/python3.6/site-packages/bokeh/core/json_encoder.py", line 102, in transform_python_types
    return super(BokehJSONEncoder, self).default(obj)
  File "/home/myuser/.pyenv/versions/miniconda3-4.1.11/lib/python3.6/json/encoder.py", line 180, in default
    o.__class__.__name__)
TypeError: Object of type 'Interval' is not JSON serializable

I think it happens because groupy method makes categorical index.

Hi, I'm glad you enjoy using my package and thanks for reporting me your bug.
The reason why it fails is the following, when I look at your result DataFrame, it looks like:

So, the values of the index are tuples (or better Pandas Intervals). The bar method then basically takes the index (or what should be used for the x-axis) and converts it to a string to show it on the x-axis. (so basically each bar has a central point). However, it also stores the original object in the plot (for using it as a DataSource). Since Bokeh translates everything into a finalo html, it tries to serialize everything to JSON, but he doesn't know how to do this for a Pandas interval.
There are now two possible solutions for your problem. Either you make:
import numpy as np
import pandas as pd
import pandas_bokeh
pandas_bokeh.output_notebook()

x = np.arange(0, 100, 0.1)
df = pd.DataFrame(x)
result = df.groupby(pd.cut(df[0], np.arange(0, 100, 10))).sum()
result.index = result.index.astype(str)
result.plot_bokeh.bar()

Alternatively, I would propose that you do:
import numpy as np
import pandas as pd
import pandas_bokeh
pandas_bokeh.output_notebook()

x = np.arange(0, 100, 0.1)
df = pd.DataFrame(x)
result = df.groupby(pd.cut(df[0], np.arange(0, 100, 10))).sum()
result.index = np.arange(5, 90, 10)
result.plot_bokeh.bar()

I hope that I could help you. If you have further questions, please answer to this post. If you issue is solved, please also write me such that I can close it.
Cheers, Patrik

.astype(str) method looks good to me.  Thank very much for the kind response and showing the work around!

You’re welcome. Maybe you also want to give the histogram plot a chance ...


Enhancement: Improve test coverage

Summary
Coverage is around 90-98%, depending on who you ask.
https://sonarcloud.io/component_measures?id=litestar-org_litestar&metric=new_coverage&view=list
Basic Example
No response
Drawbacks and Impact
No response
Unresolved questions
No response

[!NOTE]
While we are open for sponsoring on GitHub Sponsors and
OpenCollective, we also utilize Polar.sh to engage in pledge-based sponsorship.
Check out all issues funded or available for funding on our Polar.sh Litestar dashboard

If you would like to see an issue prioritized, make a pledge towards it!
We receive the pledge once the issue is completed & verified
This, along with engagement in the community, helps us know which features are a priority to our users.

If #2528 gets a green light these numbers will get fractionally worse due to branch coverage being enabled.
We also have a lot of # pragma: no cover that should really be covered instead of ignored.

Anyone is free to find uncovered tests and add them, even if its just 1-2 :)

I like what @sobolevn suggested: https://github.com/wemake-services/coverage-conditional-plugin
This looks to be quite useful.


JavaScript Azure Function, error during deploy to azure function app and NodeJs 10

Repro steps:

Create new project azure funtion
I have selected: javascript language
3.- After that F1, I selected > Azure Functions: Deploy to Function App
4.- I selected : Create new Function App in Azure,
5.- I selected : NodeJs 10x
6.- finally in this moment it was failed.

Action: azureFunctions.deploy
Error type: Error
Error Message: Entry not found in cache.
Version: 0.20.1
OS: win32
Product: Visual Studio Code
Product Version: 1.40.2
Language: en

Call Stack
a.createError extension.js:1:48963
b.<anonymous> extension.js:229:179463
extension.js:229:174078extension.js:229:174078
extension.js:229:46161extension.js:229:46161
extension.js:229:44154extension.js:229:44154
extension.js:229:43776extension.js:229:43776
i.find extension.js:229:78269
extension.js:229:25219extension.js:229:25219

Thanks for filing - as a workaround you could try signing out and signing back in to your Azure Account using the command palette.
Unfortunately there's not much we can do in this extension, but this is being tracked upstream here: https://github.com/microsoft/vscode-azure-account/issues/53


Specify encoding to fix EncodingWarning in 3.10

Fixes the EncodingWarning that exists in Python 3.10 by specifying the encoding as UTF-8 for both the read and write methods for the filesystem persister
.../site-packages/vcr/persisters/filesystem.py:24: EncodingWarning: 'encoding' argument not specified
  with open(cassette_path, "w") as f:

Test failure seems to be unrelated to my code:
  E       vcr.errors.UnhandledHTTPRequestError: "The cassette ('/tmp/pytest-of-runner/pytest-6/test_redirect_DoAsyncRequest_0/test_redirect.yaml') doesn't contain the request (<Request (GET) https://mockbin.org/redirect/303/2>) asked for"


test: Capture alarm->time_system_.mutex_ in a temp prior to running libevent timers, which can delete the alarm.

Description: In CI there is a flake in a test, failing about 3/1000 times under tsan. This was due to SimulatedTimeSystem releasing a lock to activate a libevent timer, and then still relying on alarm->time_system_->mutex_ to reacquire it. However alarm can be deleted by another thread when we activate the libevent timer. the SimulatedTimeSystem object will still be there, but we can't get there via the Alarm.
To resolve this we conceptually just need to store a reference to time_system_.mutex_ as a local. however, thread annotation doesn't like this. Rather than disabling thread analysis, we use an UnlockGuard (which does the opposite of a LockGuard). Thread annotation analysis seems OK with this.
Risk Level: low
Testing: //test/... and  --config=clang-tsan test/extensions/filters/http/fault:fault_filter_integration_test --runs_per_test=10000 -j 100
Docs Changes: n/a
Release Notes: n/a

Snippets from the tsan error without this fix:
==================
WARNING: ThreadSanitizer: data race (pid=30789)
  Write of size 8 at 0x7b0c000471d0 by thread T18:
    #0 free <null> (fault_filter_integration_test+0x118f424)
    #1 Envoy::Event::SimulatedTimeSystemHelper::Alarm::~Alarm() /proc/self/cwd/test/test_common/simulated_time_system.cc:113:51 (fault_filter_integration_test+0x2749048)
    #2 std::default_delete<Envoy::Event::Timer>::operator()(Envoy::Event::Timer*) const /usr/lib/gcc/x86_64-linux-gnu/7.4.0/../../../../include/c++/7.4.0/bits/unique_ptr.h:78:2 (fault_filter_integration_test+0x12b026e)
    #3 std::unique_ptr<Envoy::Event::Timer, std::default_delete<Envoy::Event::Timer> >::reset(Envoy::Event::Timer*) /usr/lib/gcc/x86_64-linux-gnu/7.4.0/../../../../include/c++/7.4.0/bits/unique_ptr.h:376:4 (fault_filter_integration_test+0x12a7e14)
    #4 Envoy::Extensions::HttpFilters::Fault::FaultFilter::resetTimerState() /proc/self/cwd/source/extensions/filters/http/fault/fault_filter.cc:372:18 (fault_filter_integration_test+0x12a0aa0)

  Previous read of size 8 at 0x7b0c000471d0 by main thread:
    #0 Envoy::Event::SimulatedTimeSystemHelper::Alarm::activateLockHeld() /proc/self/cwd/test/test_common/simulated_time_system.cc:54:5 (fault_filter_integration_test+0x274b6aa)
    #1 Envoy::Event::SimulatedTimeSystemHelper::alarmActivateLockHeld(Envoy::Event::SimulatedTimeSystemHelper::Alarm*) /proc/self/cwd/test/test_common/simulated_time_system.cc:230:10 (fault_filter_integration_test+0x274aa22)
    #2 Envoy::Event::SimulatedTimeSystemHelper::setMonotonicTimeAndUnlock(std::chrono::time_point<std::chrono::_V2::steady_clock, std::chrono::duration<long, std::ratio<1l,<PHONE_NUMBER>l> > > const&) /proc/self/cwd/test/test_common/simulated_time_system.cc:274:7 (fault_filter_integration_test+0x274a184)

For the record, I ran this test with 10k iterations and it timed out once. Not sure if that's related to this change or some pre-existing condition. But I think other changes I have in development may help, which will eliminate the use of a timed condvar wait for the waitForXXX variants in fake_upstream.h.
So I think it makes sense to go ahead and merge this because 0.01% timeouts is much better than 0.3% tsan failures.


[Feat] - Add axios and styled-components snippets(fapi, scr, scrd)

Hi, i've been using your snippets and i liked a lot, but i feel it's missing a few things that i've been using lately like a styled-component snippet and an api one.
scr: Create a ReactJS Styled Components file
scrd: Create an exported style constant of Styled Components instance
fapi create an axios api file

@lucaslamar Sorry, but I'm not convinced to add more packages from js realm.

@dsznajder why not?
many people use styled components to styled react

I've been looking for some styled-components snippets. I think this would be a good feature.


fix security updates getting into grouped code

In https://github.com/dependabot/dependabot-core/pull/8742 the applies_to? method was too permissive so singular security updates are trying to create in groups.

Smoke test failures are from invalid inputs, should be fixed by: https://github.com/dependabot/smoke-tests/pull/179


How can we change the google map into openstreetmap.

How can we change the google map into openstreetmap.

+1 for this. A swiss tile service for openstreetmap data is easy to integrate with leaflet or else


Custom Type

Is there a way to override the type of a property?
My use case: I'm using remix which has this concept of "loaders". Whatever data you return from your loaders you have it available in your ui. However, since the loaders run on a server the data gets serialized with JSON.stringify this basically converts Date types to String.
This causes my prisma and zod-prisma types to be "incorrect". Is there a way I can force the type of a property?

This section of the README is probably what you're looking for.

In your import file you could have something like
export const dateStringSchema = ... // some zod schema

and then change the type to use the custom zod schema with
model SomeModel {
  ...
  field Date /// @zod.custom(imports.dateStringSchema)
}

I sincerely apologize, I missed it. Worked beautifully ❤

No need to apologize! Feel free to reach out if you have any other question! :D


Update flydragon2.2.md doc with RPM-S 5v supply warning

Added warning regarding the RPM-S port and it's 5V supply

Thank you.


Fix some sensor related bugs and update tests and samples

Fix the crash issue of nodejs-align.js
Add parameter check for the option related sensor APIs
Support callback for sensor.start
Update testcases and examples

This PR is exact same with #604. I'm resubmitting it since @tingshao is on vacation and can not push a update to trigger CI.


CaptureElement or other UI Element to preview stream from a capture device

Hello,
I want to know if the CaptureElement will be available to use or if it will be replaced for some other new element.

Can you please provide more info about what product you are asking about?  ProjectReunion Winui3 UWP/Desktop etc.

Winui3 UWP

@Austin-Lamb or @MikeHillberg was this removed from winui3? I think this is owned by the media team, are we asking them to do the work or enabling the feature for winui3? I think @chigy has contacts with that team.

I am also looking forward for the CaptureElement. I think it is necessary for the MediaCapture class to show a preview.

I had this problem too.

I had this problem too. I looked for CaptureElement, but couldn't find it.
[Environment]
OS: Windows10 (19042.985)
Windows SDK: 10.0.19041.0
Project Reunion: 0.5.7
CPU architecture: x64
Program Type: Desktop (C++)

Same here.

CaptureElement is not ready for consumption in WinUI 3 and thus is not available in the current releases. It is on the backlog for a future WinUI 3 release, but unfortunately, we do not currently have an estimate of when. In the meantime, you can use the following sample code to hook up to a camera:
namespace winrt::WinUIExtensions::implementation
{
    using namespace Windows::Media::Capture;
    using namespace Windows::Storage;

    CameraCaptureUI::CameraCaptureUI(const Microsoft::UI::Xaml::Window& window)
    {
        const auto nativeWindow = window.as<IWindowNative>();
        HWND hWnd = NULL;
        winrt::check_hresult(nativeWindow->get_WindowHandle(&hWnd));

        const auto init = m_launcherOptions.as<IInitializeWithWindow>();
        winrt::check_hresult(init->Initialize(hWnd));

        m_launcherOptions.TreatAsUntrusted(false);
        m_launcherOptions.DisplayApplicationPicker(false);
        m_launcherOptions.TargetApplicationPackageFamilyName(L"Microsoft.WindowsCamera_8wekyb3d8bbwe");
    }

    Windows::Foundation::IAsyncOperation<Windows::Storage::StorageFile> CameraCaptureUI::CaptureFileAsync(Windows::Media::Capture::CameraCaptureUIMode mode)
    {
        if (mode != CameraCaptureUIMode::Photo)
        {
            winrt::check_hresult(E_NOTIMPL);
        }

        const auto appDataCurrent = Windows::Storage::ApplicationData::Current();
        const auto tempLocation = appDataCurrent.TemporaryFolder();
        const auto tempFileName = L"CCapture.jpg";
        const auto tempFile = co_await tempLocation.CreateFileAsync(tempFileName, CreationCollisionOption::GenerateUniqueName);
        const auto token = Windows::ApplicationModel::DataTransfer::SharedStorageAccessManager::AddFile(tempFile);

        auto valueSet = Windows::Foundation::Collections::ValueSet();
        valueSet.Insert(L"MediaType", winrt::box_value(L"photo"));
        valueSet.Insert(L"PhotoFileToken", winrt::box_value(token));

        const auto uri = Windows::Foundation::Uri(L"microsoft.windows.camera.picker:");
        const auto result = co_await Windows::System::Launcher::LaunchUriForResultsAsync(uri, m_launcherOptions, valueSet);
        if (result.Status() == Windows::System::LaunchUriStatus::Success && result.Result())
        {
            return tempFile;
        }
        return nullptr;
    }
}

And in you xaml.cs:
private async void myButton_Click(object sender, RoutedEventArgs e)
{
    System.Console.WriteLine("MainWindow.myButton_Click()");
    myButton.Content = "Clicked";

    var captureUI = new WinUIExtensions.CameraCaptureUI(this);
    var file = await captureUI.CaptureFileAsync(Windows.Media.Capture.CameraCaptureUIMode.Photo);
    if (file != null)
    {
        var bitmapImage = new BitmapImage()
        {
            UriSource = new System.Uri(file.Path),
        };
        this.image.Source = bitmapImage;
    }
}

@bkudiess Any way for this to work in a C# only project? Or otherwise guide me on how to add a C++ component to a C# project?

@bkudiess Wow, thank you so much for that sample! I was able to launch the camera from a WPF .NET Core app using your guidance. Is there any documentation for other parameters besides MediaType and PhotoFileToken? Specifically, I'm looking to set the equivalent of CameraCaptureUI.PhotoSettings.CroppedAspectRatio when launching.

@mallocation here is a C# version of @bkudiess answer
public class CameraCaptureUI
{
    private LauncherOptions _launcherOptions;

    public CameraCaptureUI(Window window)
    {
        var hndl = WindowNative.GetWindowHandle(window);

        _launcherOptions = new LauncherOptions();
        InitializeWithWindow.Initialize(_launcherOptions, hndl);

        _launcherOptions.TreatAsUntrusted = false;
        _launcherOptions.DisplayApplicationPicker = false;
        _launcherOptions.TargetApplicationPackageFamilyName = "Microsoft.WindowsCamera_8wekyb3d8bbwe";
    }

    public async Task<StorageFile> CaptureFileAsync(CameraCaptureUIMode mode)
    {
        if (mode != CameraCaptureUIMode.Photo)
        {
            throw new NotImplementedException();
        }

        var currentAppData = ApplicationData.Current;
        var tempLocation = currentAppData.TemporaryFolder;
        var tempFileName = "CCapture.jpg";
        var tempFile = await tempLocation.CreateFileAsync(tempFileName, CreationCollisionOption.GenerateUniqueName);
        var token = Windows.ApplicationModel.DataTransfer.SharedStorageAccessManager.AddFile(tempFile);

        var set = new ValueSet
        {
            { "MediaType", "photo" },
            { "PhotoFileToken", token }
        };

        var uri = new Uri("microsoft.windows.camera.picker:");
        var result = await Launcher.LaunchUriForResultsAsync(uri, _launcherOptions, set);
        if (result.Status == LaunchUriStatus.Success)
        {
            return tempFile;
        }

        return null;
    }
}

@bkudiess I tried this code (with hope) will work with WPF NET 6 as well.
I just changed the line to get the window handle to var hndl = new WindowInteropHelper(window).Handle;.
It compiles but an exception is thrown in CaptureFileAsync.
I suppose this is so, because one cannot do this in WPF but can you confirm it? Or is there a way to make it work under WPF NET 6?

@rgomez90 Thanks! A while back I was able to get this "working" in WPF .NET Core 3.1. I was more so asking about additional parameters for the Camera app, specifically the cropping parameters that are available through CameraCaptureUI. I eventually discovered those parameters:

AllowCropping: true/false
PhotoCroppedARHeight: integer value
PhotoCroppedARWidth: integer value

This all worked while debugging. But after packaging the WPF app using MSIX, I was not able to launch the Camera app via Launcher.LaunchUriForResultsAsync. I've since discovered that launching for results is not supported in desktop apps, though I'm not sure why.
https://github.com/microsoft/WindowsAppSDK/issues/1034
https://github.com/microsoft/WindowsAppSDK/issues/1938

Wooops. Sorry @mallocation I wanted to tag @zangai 😂 you didn't ask for a c# version, sorry mate!

I'm interested in any update on CaptureElement on WinUI3, since the last comment from @bkudiess back in August. I'm evaluating C# application development that requires a camera preview in shared mode, and realize that we are now on a crux between sticking with UWP or moving to WinUI3. Of course, I would love to move to WinUI3 so that we are not hindered by UWP and its stagnant developments. From what I can see, UWP versions greater than 10.0.16299 don't support .NET Core beyond 2.0 in its compatibility matrix. This makes long-term development difficult because then we can't write reusable .NET Core 3.1/5/6 libraries and instead have to write all of our "camera" code in an exclusive UWP library.
Any update would be greatly appreciated.

@rgomez90 I am not able to get your C# sample to work. When I place it into my test WinUI3 app, this line always returns the result as LaunchUriStatus.Unknown.
var result = await Launcher.LaunchUriForResultsAsync(uri, _launcherOptions, set);

Do I need to specify any particular capabilities in my WAP project's Package.appxmanifest file?  I have checked 'microphone' and 'webcam', but when I click the 'Click Me' button on the UI, nothing happens. And if I run the debugger and put in breakpoints, I see that result is equal to LaunchUriStatus.Unknown.

I am also looking forward to having this implemented. 👍

I believe docs are wrong.
Since they said you should be able to use this approach with WPF and Winforms as well (need to look for docs source now) but when trying it the line getting the window handler will throw an exception if the UI framework is not WinUI....

@rgomez90 I am not able to get your C# sample to work. When I place it into my test WinUI3 app, this line always returns the result as LaunchUriStatus.Unknown.
var result = await Launcher.LaunchUriForResultsAsync(uri, _launcherOptions, set);

Do I need to specify any particular capabilities in my WAP project's Package.appxmanifest file? I have checked 'microphone' and 'webcam', but when I click the 'Click Me' button on the UI, nothing happens. And if I run the debugger and put in breakpoints, I see that result is equal to LaunchUriStatus.Unknown.

@StephenLPeters @bkudiess
I am having the same issue. If this is not the way to do this, is there any possible way in WinUI3 we can use the webcam?
If not, what are the alternatives to solve this issue and will that option be available in the future releases?

@MajidAbuRmelah @TamBuiWork I have checked back, and created a new sample project and this solution appears only to work if you set your platform to 'x64'.
I don't really know why this is so, only found this but I am not sure if related....maybe @bkudiess can tell us something more.

Hi @rgomez90 - It looks like either your sample project is still private or you removed it. Is it possible for you to make it available so I can have a look and use?
I already have got a UWP app that uses camera stream and draw some overlays on that control (for example, a rectangle), can I achieve this today in Win UI 3 using your example?

You can use DirectShow with IVMRWindowlessControl9::SetVideoClippingWindow
Test With a Virtual Camera on Windows 10 21H1 :

Hi @castorix - thanks for the prompt response. This looks like it will solve my problem.
Any idea how can I use this in a C# project?

Hi @castorix - thanks for the prompt response. This looks like it will solve my problem.
Any idea how can I use this in a C# project? Is it possible for you to share this sample with me if you have created in C#?

I made a basic sample in C#, adapted from MS SDK C++ sample :
WinUI3_DirectShow_Capture.zip
(tested with VS 2022 on Windows 10 21H1, WindowsAppSDK 1.1.0-preview1 (so the matching Runtime must be installed or you must update the WindowsAppSDK  package)
I added subclassing for WM_ERASEBKGND, otherwise I had flickering on resizing...

@arafattehsin sorry, now it's public.

Thanks @rgomez90 - I can see that the your CameraCaptureUI has just exposed one method CaptureFileAsync. Is it possible to have a webcam stream like we have in CaptureElement? I want to have a camera/video stream and draw some overlays on that control (for example, a rectangle)

I want to have a camera/video stream and draw some overlays on that control (for example, a rectangle)

In the sample I posted, you can draw an overlay bitmap with IVMRMixerBitmap9::SetAlphaBitmap
A test with a red rectangle :

Updated code :
IVMRMixerBitmap9 pBMP = null;
pBMP = (IVMRMixerBitmap9)pVideoMixingRenderer9;
hr = g_pCapture.RenderStream(DirectShowTools.PIN_CATEGORY_PREVIEW, DirectShowTools.MEDIATYPE_Video, pSrcFilterPtr, null, pVideoMixingRenderer9);
//Marshal.ReleaseComObject(pVideoMixingRenderer9);

// Draw Red rectangle
int nWidth = 200;
int nHeight = 100;
IntPtr hDC = GetDC(IntPtr.Zero);
IntPtr hDCMem = CreateCompatibleDC(hDC);
IntPtr hBitmap = CreateCompatibleBitmap(hDC, nWidth, nHeight);
IntPtr hBitmapOld = SelectObject(hDCMem, hBitmap);
RECT rc = new RECT(0, 0, nWidth, nHeight);
IntPtr hBrush = CreateSolidBrush(System.Drawing.ColorTranslator.ToWin32(System.Drawing.Color.Red));
FillRect(hDCMem, ref rc, hBrush);
DeleteObject(hBrush);

VMR9AlphaBitmap alphaBitmap = new VMR9AlphaBitmap();
alphaBitmap.dwFlags = (uint)VMRBITMAP.VMRBITMAP_HDC;
alphaBitmap.hdc = hDCMem;
alphaBitmap.rSrc = new RECT(0, 0, nWidth, nHeight);
alphaBitmap.rDest.left = 0.3F;
alphaBitmap.rDest.right = 0.7F;
alphaBitmap.rDest.top = 0.3F;
alphaBitmap.rDest.bottom = 0.7F;
alphaBitmap.clrSrcKey = System.Drawing.ColorTranslator.ToWin32(System.Drawing.Color.White);
alphaBitmap.dwFlags |= (uint)VMRBITMAP.VMRBITMAP_SRCCOLORKEY;
alphaBitmap.fAlpha = 0.6F;
hr = pBMP.SetAlphaBitmap(alphaBitmap);

SelectObject(hDCMem, hBitmapOld);
DeleteObject(hBitmap);
DeleteDC(hDCMem);
ReleaseDC(IntPtr.Zero, hDC);

Marshal.ReleaseComObject(pVideoMixingRenderer9);

Thank you @castorix, once again for helping me out. My current requirement is to capture a video frame and do some processing on that frame and then draw a rectangle on it.
Is there a way to achieve this?

I updated the sample (same zip file) by adding a Frame capture (it is inside a byte array that can be modified (I let in comment a test to make the image negative))
But it has to be fixed/improved because the colors of the grabbed frame are a bit lighter...

@castorix would be great if you share the code as repo!

@castorix would be great if you share the code as repo!

OK... I had never used GitHub (I used AppBox for ages)
I just tested with another project, then this one  : WinUI3_DirectShow_Capture

Any updates on getting CaptureElement added into WinUI3?  I am working a project that utilizes CaptureElement via XAML Islands with .NET Core 3.1 but unfortunately .NET Core 3.1 is approaching end of support later this year.  I would really like to move to .NET 6 with CaptureElement in WinUI3 but unfortunately it's missing.

I would like to move my UWP project to WinUI 3. The project requires a bar code scanner (nuget from ZXing.net). CaptureElement is required.

@castorix would be great if you share the code as repo!

OK... I had never used GitHub (I used AppBox for ages) I just tested with another project, then this one : WinUI3_DirectShow_Capture

I updated the test code with a Layered child window, to avoid flickering on resizing (because of the background they added in the DirectComposition window)
(tested with 1.1.0)

@castorix would be great if you share the code as repo!

OK... I had never used GitHub (I used AppBox for ages) I just tested with another project, then this one : WinUI3_DirectShow_Capture

I updated the test code with a Layered child window, to avoid flickering on resizing (because of the background they added in the DirectComposition window)
(tested with 1.1.0)

Any update on adding CaptureElement to WinUI3? This seems like a basic control.

CaptureElement not yet available on WinAppSdk.
The simplest alternative is, Capture the media frames and render them on Image Element to make a preview.
I have made a sample with last stable release of WinAppSdk (1.1.x).
WinUI3 MediaFrame Capture

That's a good sample @TripleSM - thanks for this. I think there's a potential need of a CaptureElement as a Video source but let's see when it becomes available.

@TripleSM Many thanks! https://twitter.com/archiecoder/status/1587123503739928578

It appears that as of this month, Microsoft has finally released a media playback control for WinUI 3. Check out the MediaPlayerElement control from their WinUI 3 Gallery from the Microsoft Store. It works similarly to the CaptureElement control from WPF, in that you specify its Source property and it will playback either a camera preview stream, or a video file. I have tested that it works on at least two different cameras.

Thanks @TamBuiWork, were you able to capture the frames?

Thanks @TamBuiWork, were you able to capture the frames?

Yes, I was able to process each captured frame. Here's a snippet of my code to show the camera preview in a MediaPlayerElement, as well as processing the frames using the MediaFrameReader approach for additional frame-related scenarios:
How I defined the XAML:
<MediaPlayerElement x:Name="mediaPlayerElement" Stretch="UniformToFill" AutoPlay="True" />

The code-behind:
public MediaFrameSourceGroup MediaFrameSourceGroup;
public MediaCapture MediaCapture;

// Snippet
var symbolicLink = "set this to your camera's unique device id";
MediaFrameSourceGroup = await MediaFrameSourceGroup.FromIdAsync(symbolicLink);
MediaCapture = new MediaCapture();
var mediaCaptureInitializationSettings = new MediaCaptureInitializationSettings()

  SourceGroup = this.MediaFrameSourceGroup,
  SharingMode = MediaCaptureSharingMode.SharedReadOnly,
  StreamingCaptureMode = StreamingCaptureMode.Video,
  MemoryPreference = MediaCaptureMemoryPreference.Cpu
};
await MediaCapture.InitializeAsync(mediaCaptureInitializationSettings);

// Set the UI MediaPlayerElement control's Source property to the MediaSource you desire
mediaPlayerElement.Source = MediaSource.CreateFromMediaFrameSource(MediaCapture.FrameSources[this.MediaFrameSourceGroup.SourceInfos[0].Id]);

I was also able to capture every frame and process it using a MediaFrameReader. This might be useful if, say, you want to show some bells and whistles over the camera preview, or to simply capture and save important frames to disk.
public MediaFrameReader MediaFrameReader;

// Snippet
MediaFrameReader = await MediaCapture.CreateFrameReaderAsync(MediaCapture.FrameSources[MediaFrameSourceGroup.SourceInfos[0].Id], MediaEncodingSubtypes.Argb32);
MediaFrameReader.FrameArrived += MediaFrameReader_FrameArrived;
await this.MediaFrameReader.StartAsync();

private void MediaFrameReader_FrameArrived(MediaFrameReader sender, MediaFrameArrivedEventArgs args)
{
    var mediaframeReader = sender as MediaFrameReader;
    if (mediaframeReader != null)
    {
        var mfr = mediaframeReader.TryAcquireLatestFrame();

        // From this point on, follow Microsoft's 'CameraFrames' universal sample to process the frame and do what you want with it: https://github.com/microsoft/Windows-universal-samples
    }
}

@TamBuiWork Thanks for this. I think the time has come when I should port my app from UWP to WinUI 3 😊

@TamBuiWork Thanks for this. I think the time has come when I should port my app from UWP to WinUI 3 😊

You and me both! Cheers 😊

@TamBuiWork Thanks for this. I think the time has come when I should port my app from UWP to WinUI 3 😊

This works great. But does anyone know how to decode a QR Code with the Camera Preview

https://github.com/CommunityToolkit/Windows/issues/287

Closing this as completed: The recommendation is to use a MediaPlayerElement to render source from a MediaCapture. There is now a sample of this in WinUI 3 Gallery.

@codendone MediaPlayerElement can stream from MediaCapture in gallery app downloaded from Store - but frame does not come up to MediaPlayerElement from MediaCapture Source when running the repo from visual studio. I am using USB for the webcam input - webcam light turns on but no frame is captured thereafter.

I'm facing a similar issue with @ashubuntu. I think it is related to #9756.
However, I'm not sure about this because I double-checked the video subtype. It is MJPG but according to UWP's supported codec it should be supported. But I could be reading it wrong.


[CI Problem] Flaky test test_task_scheduler_gradient

https://ci.tlcpack.ai/blue/organizations/jenkins/tvm/detail/PR-10351/1/pipeline
I definitely saw that multiple times recently.

I think it's a floating point issue because the 1st gradient is too close to 0 and the autoscheduler would randomly pick a task in that case. Changing the objective_func to 1e5 * costs[0] can fix the test I think.


lines between points_offdiag

https://github.com/mackelab/sbi/blob/70949278d1830fc9f3d0ca70de45ee8d0a61590d/sbi/analysis/plot.py#L890
could plot be changed to scatter? currently, when plotting multiple points_offdiag per offdiagonal subplot there appear ugly lines between the points
i could do a PR if you like

that sounds like a bug, but looking at the code it seems the points are intended to be plotted individually so that no lines should appear between them. Maybe it depends on the dimensionality of the points you are passing? I think it should be a list of Arrays.
If that does not fix it it would be great if you create a PR!

That fixed it, thanks! I got confused due to v being multidimensional :D


cmake: fix utterly cryptic error handling in the -DSPARSE=y build

Fixes commit 7a85ff768385 ("add sparse support")
The sparse build needs (at least) two things:

sparse to be in the PATH
the environment variable REAL_CC to be defined and to match the value expected by CMake

Fix error messages when either condition is wrong.

New error message when 1. is not satisfied:

CMake Error at zephyr/cmake/compiler/gcc/target.cmake:12 (find_program):
  Could not find CMAKE_C_COMPILER using the following names: cgcc

Previous error "message" when 1. is not satisfied:

CMake Error at zephyr/cmake/compiler/gcc/target.cmake:17 (message):
  C compiler
  ZSDK/xtensa-intel_s1000_zephyr-elf/bin/xtensa-intel_s1000_zephyr-elf-gcc
  not found - Please check your toolchain installation

New error message when 2. is not satisfied:

CMake Error at zephyr/cmake/compiler/gcc/target.cmake:25 (message):
  sparse's REAL_CC is undefined, it must be set to:
  zsdk/xtensa-intel_s1000_zephyr-elf/bin/xtensa-intel_s1000_zephyr-elf-gcc

Previous error "message" when 2. is not satisfied:

modules/hal/xtensa/include/xtensa/config/core.h:54:10:
    error:unable to open 'core-isa.h'`

Also: stop using the same name REAL_CC for both the internal CMake variable and the external sparse parameter; they're two different things so name them differently. Environment variable messes are complicated enough.
Signed-off-by: Marc Herbert<EMAIL_ADDRESS>

No idea why the "operation was cancelled" in the middle of test run https://github.com/zephyrproject-rtos/zephyr/actions/runs/3086675604/jobs/4991288674. Clearly unrelated.

Thanks for patching something that is basically broken in its initial proposal, https://github.com/zephyrproject-rtos/zephyr/pull/43776#pullrequestreview-1023060702.

Just for the record, complete rework  by @tejlmand in progress in

#51212


setup storybook testing react

added testing-react module to implement stories while testing
Closes #106

Great work thank you!


dependencies: require typing-extensions 3.10.0

Strawberry uses TypeGuard from typing-extensions, which is only
available starting with version 3.10.0
Signed-off-by: Tobias Wiese<EMAIL_ADDRESS>

@tobiaswiese I completely missed this! I did change how we require TypeGuards in this PR: https://github.com/strawberry-graphql/strawberry/pull/1074
so we don't need to update typing_extensions, does that work for you? :)

As it is no longer a hard dependency on 3.10.0 anymore that should be enough


[C++] Add test exhibiting recording descriptor bug in stored channel strings

This is not a finished PR. This just adds a failing test that should pass.
The EXPECT_EQ(originalChannel, m_recordingChannel); assertion fails as follows:
AeronArchiveTest.cpp:1402: Failure
Expected equality of these values:
  originalChannel
    Which is: "aeron:udp?endpoint=localhost:3333\t"
  m_recordingChannel
    Which is: "aeron:udp?endpoint=localhost:3333"

There's always an extra byte at the end of the channel strings in recording descriptors, whether it's originalChannel or strippedChannel or sourceIdentity.
I don't know what the solution is. The generated SBE code seems correct. For good measure I added that same assertion to the jumbo recording descriptors test, which fails in the same way.

Note that the CI checks for the various GCC and Clang versions succeed despite the test failing. The Windows check fails as it should. Maybe something is not right in the CI setup if test outcomes are ignored.

My guess on this is that the RecordingDescriptorPoller is running off the end of the string due to not using the string version of the get field. i.e. getOriginalChannelAsString. The compiler might be making an explicit conversion from a const char * to a std::string which doesn't have a length, so the end of the string has the next field varDataEncoding.

@tmontgomery Things I also tried that didn't work in ControlResponseAdapter.cpp, where m_onRecordingDescriptor is called:
descriptor.getOriginalChannelAsString(),

std::string(descriptor.originalChannel(), descriptor.originalChannelLength()),

I looked at the encoding side in Java class RecordingDescriptorEncoder and it seemed fine. It seems to be used correctly in Catalog#addNewRecording.

No. It is actually as I mentioned. I've added your tests and my fix and seems fine. Will push once I run a cppbuild.

commit is d95157f6c5d392e17cbb1a5c7771717c85f9f4eb

fixed


No mssql-tools package for ubuntu 20.04

I seem unable to locate the package mssql-tools for ubuntu 20.04. I changed the curl to point towards https://packages.microsoft.com/config/ubuntu/20.04/prod.list , which exists, but I get an error " Unable to locate package mssql-tools" when I try to install it.

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 39bb4ba1-ae62-07a3-f79a-138f14cf2f10
Version Independent ID: beaa4e7d-e771-cc96-0e59-34d9b1d5e8cc
Content: Install SQL Server command-line tools on Linux - SQL Server
Content Source: docs/linux/sql-server-linux-setup-tools.md
Product: sql
Technology: linux
GitHub Login: @VanMSFT
Microsoft Alias: vanto

Also, if I try to install from 18.04 or earlier, there are broken dependencies.

Hi @camille-rodriguez! Ubuntu 20.04 is not a supported for SQL Server at the moment.
https://docs.microsoft.com/en-us/sql/linux/sql-server-linux-release-notes-2019?view=sql-server-ver15


What should we use instead of Jeet?

Now that Jeet is unmaintained, is it because something better has come along that I'm not aware of?
Thanks for all the good times, Jeet! I really like the way you work(ed).

I don't think something similar has come along...jeet is pretty cool, but jeet creators have moved to other projects and don't have the time/interest to maintain it. There is an alternative grid system based on PostCSS, lost grid system, that you may find interesting, but if you don't need to support older browsers you could just use flexbox with autoprefixer ;p

Thanks. Along these lines, I�m looking at sGrid, to stay with Stylus. It�s mostly some flexbox utilities, but has a similar-enough feel to me. Haven�t gotten to spend a lot of time with it yet!
http://stylusgrid.com

I might be interested in taking it over but I think I would only be interested in maintaining the Stylus version.

Hello, I am now a maintainer of Jeet! I am not aware of anything better, as my knowledge shows that Jeet is still in working order. This will start to be updated more often, as the issues, pull requests, and features come!

Sounds great, I'm still using ; )

Closing for now. If it is an issue you still find present in recent versions, please make a new issue!


Integrate News and Updates

Develop a news and updates section within StudyPal that aggregates relevant articles, research papers, and blog posts related to the chosen subjects. This will keep users informed about the latest advancements and trends in their areas of interest.

@Deveshjoshi101 can you assign this issue to me


Add CloudBees "Foundation" team as security_contact to help as necessary

Description
As proposed in this thread to propose a new maintainer, I'm defining our team so we can be pulled in in case of security issue arising on the MSBuild Plugin: https://github.com/jenkinsci/msbuild-plugin.
AFAICT, last active maintainer was @marshall777 2.5 years ago and it was actually to release a PR from a member of our team: Francisco, PR was https://github.com/jenkinsci/msbuild-plugin/pull/35.

Submitter checklist for adding or changing permissions

Always

[x] Add link to plugin/component Git repository in description above

For a newly hosted plugin only

[ ] Add link to resolved HOSTING issue in description above

For a new permissions file only

[ ] Make sure the file is created in permissions/ directory
[ ] artifactId (pom.xml) is used for name (permissions YAML file).
[ ] groupId / artifactId (pom.xml) are correctly represented in path (permissions YAML file)
[ ] Check that the file is named plugin-${artifactId}.yml for plugins

When adding new uploaders (this includes newly created permissions files)

[x] Make sure to @mention an existing maintainer to confirm the permissions request, if applicable
[x] Use the Jenkins community (LDAP) account name in the YAML file, not the GitHub account name
[x] Make sure to @mention the users being added so their GitHub account names are known if they require GitHub merge access (see below).
[x] All newly added users have logged in to Artifactory at least once

Reviewer checklist (not for requesters!)

[ ] Check this if newly added person also needs to be given merge permission to the GitHub repo (please @ the people/person with their GitHub username in this issue as well). If needed, it can be done using an IRC Bot command
[ ] Check that the $pluginId Developers team has Admin permissions while granting the access.
[ ] In the case of plugin adoption, ensure that the Jenkins Jira default assignee is either removed or changed to the new maintainer.
[ ] If security contacts are changed (this includes add/remove), ping the security officer (currently @daniel-beck) in this pull request. If an email contact is changed, wait for approval from the security officer.

There are IRC Bot commands for it

Needs approval by a maintainer, as this is essentially adding a secondary kind of maintainer, but I'm not opposed from a security team POV.

Hello,
I made a topic in Google groups a few weeks ago because I don't have time to maintain this plugin anymore. Another maintainer would be welcome.
Regards

@marshall777 would you be fine to define our team as a contact at least to handle security issues? Thanks!
I think we could merge this, as I see your comment as an implicit approval, but I'm double-checking :-).
Thank you

@batmat You understood me well. It would be a great thing if you could take the relay and keep the plugin living.

Merging then. Thanks!


"centered"-class for medium-range (Grid)

Hello guys,
i found a small-centered class and a large-centered class, is there a possibility to show content centered ONLY inside the medium-range? I don't want the content to be centered on small or large.

There are uncentered classes as well, which will achieve this effect:


Update the schedule image to the version with launch in 2025

The schedule needs updating @elisaquintana has a new one.

Thanks for the request! Resolved.


Bug report about type check in function.

TypeScript Version:  2.4.2 / nightly (2.5.0-dev.201xxxxx)
Code
// A *self-contained* demonstration of the problem follows...
// Test this by running `tsc` on the command-line, rather than through another build tool such as Gulp, Webpack, etc.
/*!
 *
 * Copyright 2017 - acrazing
 *
 * @author acrazing<EMAIL_ADDRESS> * @since 2017-08-18 16:57:10
 * @version 1.0.0
 * @desc ts.ts
 */

let code: 1 | 2

function change(value: 1 | 2) {
  code = value
}

function detect() {
  code = 1
  LOOP:
    while (true) {
      switch (code) {
        case 2:
          change(1)
          break
        default:
          break LOOP
      }
    }
}

Expected behavior:
No Error.
Actual behavior:

22         case 2:
                ~

src/__test__/ts.ts(22,14): error TS2678: Type '2' is not comparable to type '1'.

See #9998.


address() should be split into discrete R/W methods

This really doesn't need to be crammed into one method and should be split into two for simplicity.
Rename address() to set_address() (with alias to the name address so existing code doesn't break) and move the read code to a new method get_address().

Wrong repo...


uri decode username for special chars

Haha, snap. I used $window in case we want to add tests (to mock window out); #2.

what are the chances
ok yeah lgtm


Add Instituto Consorcio Clavijero

https://www.clavijero.edu.mx/
https://www.clavijero.edu.mx/tsu-licenciatura/ingenieria-en-sistemas-computacionales-tsu-licenciatura/
https://cursos.clavijero.edu.mx/cursos/TIE-2015/modulo3/contenidos/32_correo_electrnico_institucional.html

@franx87 First stage of verification passed, official domain is clavijero.edu.mx as far as I verified. This is just an informational note. Pull request is still in the review. I appreciate your patience while waiting for the final decision.

Thank you Philip, I'm waiting...

@franx87 Thank you for your patience while waiting for a review and processing your request. Pull request merged.

Thankyou for your time. "Hasta luego amigo"


Add median filtering for the input depth image

Adds option to enable median filter for the input depth image.
Merges into #47

test this please


PULL REQUEST TEMPLATE

Have a look here first of all https://github.com/himanshu007-creator/SFC-foundations/issues/12

I would like to work on this.
Please assign it to me

I would like to work on this.
Please assign it to me

HI @Subhangini GSSOC will begin on 1st march, then only issues will be alotted . Please have a look here https://github.com/himanshu007-creator/SFC-foundations/issues/12

Ok @himanshu007-creator .Will wait till then.

https://github.com/syedibrahim/Pharmacy-Management-System

Hi, i want to contribute as a participant of gssoc'21

@Subhangini   yes you can work on it. We just need an idea like how you will proceed. As we are redesigning everything so everything will be changes and so will the site structure. We just need to know how you are going to implement it. Prepare a prototype of code and send it within this week. Best of luck!

@himanshu007-creator I would like to work on it .
Please assign it to me.
Thanks.


error: unresolved import std::str::from_c_str. There is no from_c_str in std::str

Tried compiling, got
error: unresolved import std::str::from_c_str. There is no from_c_str in std::str
True enough, from_c_str is deprecated. Suggested replacement here:
http://www.reddit.com/r/rust/comments/2robk4/whats_the_nondeprecated_equivalent_of_from_c_str/

Looking at the source, this problem already seems to have been fixed in master, but apparently the "official" crate has not been updated. Unfortunately, trying to use master produces another error:
src\rocksdb.rs:201:18: 201:41 error: unresolved name slice::from_raw_mut_buf
Is this library still being maintained?

Hello @tanderberg!  I've pushed a few updates to the nightly_6.28.15 branch, but it appears that some handling of raw buffers is no longer valid, and some tests are failing.  I've been waiting a bit for rust to settle down before spending more time on this, but it seems that that now may be a good time to resume.  I'll be digging into the current buffer issues over the next couple days as I have time and I'll publish a new crate when they are ironed out!

@tanderberg I've fixed the buffer issues (the way I was transmuting slices became invalid at some point) and I've pushed a new crate, 0.0.5, that should work with the current nightly.  If you have any problems at all please open an issue and I'll try to address them asap - I think I'll probably be adding support for scanning this weekend in case that's something you're interested in.  If you encounter a small semantic issue that you don't mind fixing, I'd happily accept any PR's as well.
Thanks for opening this ticket!


Override default RELATIVE_UPSTREAM_DB_* vars for integration tests

Fixes

Fixes #447 by @AetherUnbound
Description

This PR resolves an issue wherein the integration tests were failing after running just env. It turns out that the decouple library (which is being used to initialize the RELATIVE_UPSTREAM_DB_* variables) was picking up the variables in the .env file created under the ingestion_server directory. Since RELATIVE_UPSTREAM_DB_* is explicitly defined in the env.template file, it was overriding the default, which would normally fall back to the UPSTREAM_DB_* values. Since the services are named differently for integration tests, this would then cause the tests to fail.
There are a few ways to correct this, but the easiest seemed to be just to explicitly define them in the environment file for the service since decouple gives precedence to environment variables over those loaded from a .env file.
Testing Instructions

just env
just ing-testlocal

Checklist

[x] My pull request has a descriptive title (not a vague title like Update index.md).
[x] My pull request targets the default branch of the repository (main) or a parent feature branch.
[x] My commit messages follow best practices.
[x] My code follows the established code style of the repository.
[ ] I added or updated tests for the changes I made (if applicable).
[ ] I added or updated documentation (if applicable).
[x] I tried running the project locally and verified that there are no visible errors.

Developer Certificate of Origin

Developer Certificate of Origin
Developer Certificate of Origin
Version 1.1

Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
1 Letterman Drive
Suite D4700
San Francisco, CA, 94129

Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.

Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
    have the right to submit it under the open source license
    indicated in the file; or

(b) The contribution is based upon previous work that, to the best
    of my knowledge, is covered under an appropriate open source
    license and I have the right under that license to submit that
    work with modifications, whether created in whole or in part
    by me, under the same open source license (unless I am
    permitted to submit under a different license), as indicated
    in the file; or

(c) The contribution was provided directly to me by some other
    person who certified (a), (b) or (c) and I have not modified
    it.

(d) I understand and agree that this project and the contribution
    are public and that a record of the contribution (including all
    personal information I submit with it, including my sign-off) is
    maintained indefinitely and may be redistributed consistent with
    this project or the open source license(s) involved.

Unexpectedly fairly straightforward!

Yet incredibly difficult to debug :joy:


grafana notifications not working properly

While grafana is generating alerts as expected, the issues we expect to be generated automatically in github are not being created. Please investigate.

Spoke to Stu, he said this is related to https://github.com/dotnet/dnceng/issues/849 and he is looking at it

Stu fixed this, I am going to close this tomorrow after I validate grafana is creating github issues.

this is fixed, closing this


No license file

It would be cool if you added a license file to let people know if it's okay to use some of this code in their own projects.

@dfyx hi! Good point, the license is MIT. It is specified in the package.json but just added a proper LICENSE file https://github.com/gitterHQ/irc-bridge/blob/master/LICENSE
:+1: