gVim: Can't use  at :terminal

Describe the bug
When Shift+Space is typed at :terminal on gVim, ;2u or [32;2u is input instead of a space.
This occurs after 8.1.2145.
To Reproduce

Run gvim --clean
:terminal
Type <S-space>
;2u or [32;2u is shown

Expected behavior
<Space> is input.
Environment (please complete the following information):

Vim 8.1.2145 or later
OS: Linux, macOS, Windows
Terminal: GUI

Additional context
Originally reported at https://github.com/vim-jp/issues/issues/1328.

Oh, it seems that this occurs also on vim, not only on gvim.

If I run Vim in the terminal and then ":imap  xxx" I can see that shift-space works.
What is it supposed to do in a shell?  Or, if a space is expected, how can Vim know that the commands can't handle a shift-space code?

(I edited your comment, because <S-Space> was not shown correctly.)
I think that only if a program inside :term enables modifyOtherKeys then escape sequences should be sent, otherwise normal character codes should be sent.
Does libvterm (or Vim) handle ^[[>4;2m and ^[[>4;m?

(I edited your comment, because <S-Space> was not shown correctly.)
I think that only if a program inside :term enables modifyOtherKeys then escape sequences should be sent, otherwise normal character codes should be sent.
Does libvterm (or Vim) handle ^[[>4;2m and ^[[>4;m?

The escape codes are produced by libvterm, calling
vterm_keyboard_unichar(vterm, c, mod) and vterm_output_read().
I suppose before modifyOtherKeys was supported we never got the Shift
modifier, now we do.
vterm_keyboard_unichar() has this code:
// The shift modifier is never important for Unicode characters
// apart from Space
if(c != ' ')
mod &= ~VTERM_MOD_SHIFT;
Thus it looks intentional.  But it is causing this problem.
You can ask Paul Evans about it.
--
CVS sux, men don't like commitment
/// Bram Moolenaar --<EMAIL_ADDRESS>-- http://www.Moolenaar.net   \
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \
\\  an exciting new programming language -- http://www.Zimbu.org        ///
\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

ping @leonerd

On vim that comes with git bash, I get this issue with any uppercase letter. In insert mode, let's say I input HELLO. What's shown is:
[72;2u[69;2u[76;2u[76;2u[79;2u

As a workaround you can remap Shift-Space:
tnoremap <S-space> <space>

This mapping will break apps that expect to receive Shift-Space!

On vim that comes with git bash, I get this issue with any uppercase letter. In insert mode, let's say I input HELLO. What's shown is:
[72;2u[69;2u[76;2u[76;2u[79;2u

Try this:
if &t_TI =~ "\<Esc>\\[>4;[12]m"
    autocmd ModeChanged *:t call echoraw(&t_TE)
    autocmd ModeChanged t:* call echoraw(&t_TI)
endif

This requires the patch 8.2.3430 so that Vim supports the ModeChanged event, as well as 8.2.0258 so that it supports the echoraw() function.
It works by temporarily disabling the modifyOtherKeys feature whenever you enter terminal-job mode.
Alternatively, you can disable the feature entirely, by writing this in your vimrc:
set t_TI= t_TE=

This is an original specification in fixterms. So we should parse this if we will fix this.
http://www.leonerd.org.uk/hacks/fixterms/

@mattn  I'm not convinced that CSI u mode is a solution here, it's just another form of the same issue.
So I have this problem too and because I'm lazy typist it happens a lot in the shell (I "ride" the shift key when typing things like backspace or space while typing in ALL UPPER CASE, for example; this does "what's expected" in most terminals and even in this GitHub box)
Is this an accurate summary of what's happening?

My terminal emulator supports modifyOtherKeys mode 2, and this is enabled when Vim is launched
when I run :term, the outermost terminal continues to report keys in modifyOtherKey 2 mode and Vim passes these keypresses directly to libvterm
libvterm passes these keypresses to the shell, which doesn't understand them as "space" or "backspace" and so prints them to the terminal.

What I'm trying to work out is what changed, and what we can do about it. I've been using modifyOtherKey mode 2 for a long time, and I could have sworn it used to "work" as I expect. Did a recent libvterm update change this behaviour? Or was there some change in vim.
So I decided to bisect. I was sure this was "working" late last year, so I started at December 1st 2021 looking for a "working" revision. It behaved the same, so I went back an month, then a year, then another year to the beginning of 2020. Unfortunately at that point, I can no longer build vim from source on this computer.
But I think that suggests whatever changed (if indeed, anything has changed), it was not in vim.
So to the second part... what can/should we do about it.
I think that @lacygoill's solution is along the right path (and seems to be a viable workaround) - disable the modifyOtherKeys 2 key reporting mode when we switch focus into the terminal in terminal-job mode. This allows for the program running in the embedded tty to decide what reporting mode it wants. I think this is equivalent to what happens when we do something like ctrl-z or :!make, as the shell is unlikely to understand this terminal reporting mode.
@brammool have I characterised this correctly? What are your thoughts on switching back to standard key reporting mode when in a terminal-job mode? I suspect this will be irksome for testing vim itself in that terminal... is vim-inside-vim's-terminal able to switch the mode itself (i.e. does libvterm intercept the t_TI command?). Sorry getting a bit beyond my current understanding here...

This CSI %d;%du is thrown via libvterm.
https://github.com/vim/vim/blob/6e1d31e9e3ca42cb883abca198f011dc6f4ceb14/src/libvterm/src/keyboard.c#L56
What i can say is that Vim does not handle this CSI correctly.

@mattn  I'm not convinced that CSI u mode is a solution here, it's just another form of the same issue.
So I have this problem too and because I'm lazy typist it happens a
lot in the shell (I "ride" the shift key when typing things like
backspace or space while typing in ALL UPPER CASE, for example; this
does "what's expected" in most terminals and even in this GitHub box)
Is this an accurate summary of what's happening?

My terminal emulator supports modifyOtherKeys mode 2, and this is
enabled when Vim is launched
when I run :term, the outermost terminal continues to report keys
in modifyOtherKey 2 mode and Vim passes these keypresses directly to
libvterm
libvterm passes these keypresses to the shell, which doesn't
understand them as "space" or "backspace" and so prints them to the
terminal.

What seems wrong here is that libvterm passes the code that is used when
modifyOtherKeys is enabled to the shell, or program running in the
shell, even though that shell or other program did not enable
modifyOtherKeys mode.  This mode needs to be enabled by the program
running in the terminal, otherwise it gets escape sequences it doesn't
understand.  In Vim this is normally done with t_TI.
Vim must send the code with modifyOtherKeys to libvterm, otherwise
special modifiers would not work.  If modifyOtherKeys was not enabled in
the terminal, then libvterm must convert the code back to the normal
key, thus applying the modifiers.
I don't think Vim can do that, because the state whether modifyOtherKeys
was enabled in the terminal is located in libvterm.  Also, the same
should happen in any other application that uses libvterm, it's not
something that belongs in Vim.
Libvterm already knows the state, it is stored in
state->mode.modify_other_keys.  But it is only used to include the
modifier.

What I'm trying to work out is what changed, and what we can do about
it. I've been using modifyOtherKey mode 2 for a long time, and I could
have sworn it used to "work" as I expect. Did a recent libvterm update
change this behaviour? Or was there some change in vim.

Probably when Vim started to pass the right key code to libvterm, so
that a Vim running inside a terminal window works as it does in any
terminal.
It may also depend on changes in libvterm.  Check
libvter/src/keyboard.c, function vterm_keyboard_unichar().

I think that @lacygoill's solution is along the right path (and seems
to be a viable workaround) - disable the modifyOtherKeys 2 key
reporting mode when we switch focus into the terminal in terminal-job
mode. This allows for the program running in the embedded tty to
decide what reporting mode it wants. I think this is equivalent to
what happens when we do something like ctrl-z or :!make, as the
shell is unlikely to understand this terminal reporting mode.

This is a workaround for when you know what is running in the terminal
window.  However, if you start a shell and in that shell you run another
program, you don't know what to do.
--
For society, it's probably a good thing that engineers value function over
appearance.  For example, you wouldn't want engineers to build nuclear power
plants that only look like they would keep all the radiation inside.
(Scott Adams - The Dilbert principle)
/// Bram Moolenaar -- @.*** -- http://www.Moolenaar.net   \
///                                                                      \
\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

What seems wrong here is that libvterm passes the code that is used when
modifyOtherKeys is enabled to the shell, or program running in the
shell, even though that shell or other program did not enable
modifyOtherKeys mode.  This mode needs to be enabled by the program
running in the terminal, otherwise it gets escape sequences it doesn't
understand.  In Vim this is normally done with t_TI.

Yeah. Thanks makes sense, thanks.

This CSI %d;%du is thrown via libvterm.
https://github.com/vim/vim/blob/6e1d31e9e3ca42cb883abca198f011dc6f4ceb14/src/libvterm/src/keyboard.c#L56
What i can say is that Vim does not handle this CSI correctly.

This code is not for Vim, it is for the program running in the terminal.
Vim only passes it on.  Libvterm is supposed to take care of correctly
encoding the keys.
--
Engineers understand that their appearance only bothers other people and
therefore it is not worth optimizing.
(Scott Adams - The Dilbert principle)
/// Bram Moolenaar -- @.*** -- http://www.Moolenaar.net   \
///                                                                      \
\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

Thanks for the pointers, Bram, I can now see exactly what's happening.
The summary is that, actually it's not anything to do with the modifyOtherKeys mode of the terminal. It's just what libvterm specifically does or does not do with shift-{space, enter, backspace}.

Vim is calling vterm_keyboard_unichar with c = ' ' and mod = VTERM_MOD_SHIFT
At this point vt->state->mode.modify_other_keys is false
The first of 2 libvterm special cases for space is passed, where the VTERM_MOD_SHIFT is not removed due to:

  /* The shift modifier is never important for Unicode characters
   * apart from Space
   */
  if(c != ' ')
    mod &= ~VTERM_MOD_SHIFT;

it then drops into the second special case (added https://bazaar.launchpad.net/~xzfc/libvterm/libvterm/revision/680)

    /* Shift-space needs CSIu */
    case ' ':
      needs_CSIu = !!(mod & VTERM_MOD_SHIFT);
      break;

And as such, outputs the CSI u sequence for shifted space character
  /* ALT we can just prefix with ESC; anything else requires CSI u */
  if(needs_CSIu && (mod & ~VTERM_MOD_ALT)) {
    vterm_push_output_sprintf_ctrl(vt, C1_CSI, "%d;%du", c, mod+1);
    return;
  }

Which it seems most shells won't understand.
So you're quite right that the only thing that changed in vim (at any point) would be that it correctly passes c = ' ' and mod = VTERM_MOD_SHIFT when modifyOtherKeys mode 2 is enabled in the terminal controlling Vim.
I wonder where this leaves us. The reaonsing behind the libvterm behaviour is not clear from the comments, but perhaps it's entirely intentional. Certainly, looking at the history of that code, it's been through a number of revisions and was specifically pointed out by Mr Dickey in his seminal commentary of the whole modifyOtherKeys history.
Ironically, there appears to be an earlier patch specifically removing a comment which says:
  /* However, since Shift-Space is too easy to mistype accidentally, remove
    * shift if it's the only modifier
    */

  /* Since Shift-Enter and Shift-Backspace are too easy to mistype
    * accidentally, remove shift if it's the only modifier
    */

The commit message says:

Don't forbid Shift-{Space,Enter,Backspace} as that should be user-configurable; pangoterm should do it

I'm not sure what to make of that. It seems to be suggesting that the controlling app (in this case, vim) should be deciding whether or not to drop the shift-modifier, but then later when the shift modifier is present, it outputs a CSU u sequence which the shell doesn't understand.
Seems like a Mexican stand-off.
As a trial, I added this to src/terminal.c term_convert_key:
    if (c == ' ' || c == '\n' || c == K_BS)
	// libvterm does funny things with
	mod &= ~VTERM_MOD_SHIFT;

This "worked" as you might expect, but again it means that there's no way to pass any of those keys to a program running inside the libvterm terminal, such as vim itself.
Quite a pickle.

Ben Jackson wrote:

Thanks for the pointers, Bram, I can now see exactly what's happening.

[...]
The main problem appears to be that libvterm has no clear policy of what
terminal it is pretending to be.  The behavior you summarize doesn't
look like any traditional one, more like a mix of various optinionated
recent terminal emulators.  I don't know what $TERM should be set to.
In contrast, xterm is really a terminal emulator, it behaves like real
existing terminals.  Options added on top of that exist but must be
enabled explicitly.  Unfortunately, user tend to like lots of features
and not care about backwards compatibility, resulting in lots of
terminal emulators with fancy features and plenty of hidden problems.
We can make modifications here.  E.g. I don't like at all having the Alt
key prefix ESC to the character, recognizing that is timing dependent.
But instead of making arbitrary changes, we should set a goal here that
works for most users.  It will never work for all users.
In case some application does want the modifiers, using the
modifyOtherKeys feature works best.  I don't think the "CSI u" form
should be used in any case, ordinary programs don't recognize that.
--
I used to be indecisive, now I'm not sure.
/// Bram Moolenaar -- @.*** -- http://www.Moolenaar.net   \
///                                                                      \
\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

Hi all. Quick placeholder reply to say as libvterm's original author I've been reading and following along. I'll write up a more detailed reply in a bit...

FWIW, out of passing interest, the same behaviour is observed in neovim when the terminal controlling neovim is put in CSI u reporting mode. I initially thought that neovim was not behaving the same, but that's because neovim does't (it would appear) automatically switch the terminals modifyOtherKeys mode (or CSI u mode, if there's even a control for that).

Same is happening in vim 9.0 patch 1-500 in windows 10, with any terminal (cmd, powershell etc).
if you enter the :terminal and then press shift + space or shift + backspace you get random characters.

We cannot change other programs, we can only change what we have in our hands.
There are a couple of things in libvterm that seem wrong:

in src/keyboard.c: " The shift modifier is never important for Unicode characters apart from Space"
Shift also matters for Tab, Backspace and a few other keys.
a few lines below that: "ALT we can just prefix with ESC; anything else requires CSI u"
The CSI u form should not be used if the modify_other_keys flag is off, because the program running
in the terminal most likely cannot handle it.  Dropping the modifier is what should happen.

Yeah personally I have my controlling terminal set to not bother sending Shift-Space anyway,
Shift-Space is a really common typo
"\e[32;2u": " "

Thanks but I'm on windows 10, probably I can fix that in the keyboard firmware? It's a tmk/qmk. Surely it's not fixable in windows, unless I define a new shortcut.


Server emotes are not showing

For example, take a look at #hang_out in Background Noise (https://discord.com/invite/0v8a0me0lm28o7m1). Here's a screenshot of what is being shown instead:

They... are not. This is because they aren't added yet. This is not an issue.

You didn't need to mark it as not planned. That makes it look like you're not going to add support for them.

Now I am seeing a Discord Icon in place of the actual emote.

Ok, that's an oversight. For now try dragging the window off screen and back in view, this should refresh it

This has been fixed. Unless the emoji can't be loaded it should work.

It is still happening for me (but this time scrolling past it and back to it gets it to show instead of the Discord icon).

Also:

Ok, I fixed that one.

That is how that and the emoticon are supposed to look.

Yup, it should have been fixed now. You can clear cache and they should show up.

Thanks. So, animated emoticons will come when there's MP4 support added?

No and no. I don't think I will support animated images or video for now. You can download MP4s directly from the app, so at least you can play those using your favorite media player.

Okay. I will wait and see what happens later on.

I think this is still broken

It doesn't support animated emoticons and images yet.

Should I make an issue for full emoji support? (emoji picker and animated emojis)

For Unicode emojis, see #81.
You can create one for animated server emojis.  Note that even if I implement them, they will not be animated.

Note that even if I implement them, they will not be animated.

Why? That literally just means I will never use this client unless someone forks and makes them animated. I might as well just not make the issue.

Note that even if I implement them, they will not be animated.

Why? That literally just means I will never use this client unless someone forks and makes them animated. I might as well just not make the issue.

https://github.com/DiscordMessenger/dm/issues/47

Why not just access them as a gif? The animated emojis are all .gif files.

Why not just access them as a gif? The animated emojis are all .gif files.

I don't think they are.

Well, you could just point to the url, which is a gif.

Why? That literally just means I will never use this client unless someone forks and makes them animated. I might as well just not make the issue.

It requires complex support on my part because I have to write a GIF loader, and keep all the animations in sync.  It's actually quite a challenge to manage several animations running simultaneously.
If the lack of features is turning you off, I'm sorry to hear that, but it is what it is. Maybe Discord Messenger is not for you.

I don't think they are.

Indeed they are GIFs.

If the lack of features is turning you off, I'm sorry to hear that, but it is what it is. Maybe Discord Messenger is not for you.

What I want is a good, not bloated local client. Just using Discord makes the CPU on my laptop shoot up to mid-high 80s. The closest thing is Ripcord, but that hasn't had any development in years and has it's own weird bugs that makes me unable to use it.

We just need someone to make a PR that implements animated GIF support.


Not all elasticsearch indices being created when running quickstart script

Describe the bug
When installing datahub following the quickstart guide, the elasticsearch indices are not completely being created. In particular, the datasetdocument indices are missing.
To Reproduce
Steps to reproduce the behavior:

Start a fresh EC2 instance
Install Docker using these steps

sudo apt-get update
sudo apt-get install \   apt-transport-https \   ca-certificates \   curl \   gnupg-agent \   software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
 sudo apt-key fingerprint 0EBFCD88
sudo add-apt-repository \  "deb [arch=amd64] https://download.docker.com/linux/ubuntu \  $(lsb_release -cs) \  stable"
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io
sudo curl -L "https://github.com/docker/compose/releases/download/1.27.4/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose

Run this command so elasticsearch has enough memory

sudo sysctl -w vm.max_map_count=262144

Clone the datahub repository

git clone https://github.com/linkedin/datahub.git

change directory into the cloned repo and run quickstart script

cd datahub
sudo ./docker/quickstart.sh

Once datahub is finished setting up. Run the command to see the elasticsearch indices

curl http://localhost:9200/_cat/indices

Expected behavior
I expected for the quickstart script to successfully and all the proper elasticsearch indices to be created.
Images
Containers

Elasticsearch Docker Logs

Desktop (please complete the following information):

AWS AMI

EC2 Type: t3.xlarge
Volume:

Closing due to inactivity


Best practice to run dart cli under Sudo

I'm the author of dshell a dart package designed to help write dart cli scripts.
https://pub.dev/packages/dshell
Dshell is globally activated and includes an exe 'dshell' which dart installs into ~/.pub-spec/bin.
Dshell allows the development of dshell scripts which are really just dart scripts. When you launch a dshell script, dshell creates a vitualised pubspec.yaml and then launches the script using Dart as normal. The only difference is that dshell tells dart where the virtual pubspec is located (in ~/.dshell/cache)
The dshell script contains a shebang telling bash to run the script with dshell.
#! env dshell

All this works nicely.
I've just tried to write a dshell script that needs sudo access.
To launch the script I tried:
sudo ./somescript.dart
The problem is that sudo changes the user account to the root account.
As a result the PATH environment variable changes and no longer contains the .pub-cache path.
I think that there is a second issue here in that even if dshell is on the root path that the dart cache won't be available to the root user.
So the question is what is the correct approach to ensuring that a dart script can be under sudo.
Is there a bigger question about how you make dart available to all users on a system?
Is an extended version of global activation required to activate a package for all users?
I guess I'm looking for an agreed best practice for managing multiple user access to dart packages rather than setting off on my own.

I've finally go back to trying to solve this and its an real can of worms.
So there appear to be a couple of related issues.

dart isn't on the root path after an install.

this can be fixed by adding /usr/lib/dart/bin to the path.

pub isn't on the root path. Add the noted path in step 1 will fix this.
The .pub-cache/bin isn't on the path
This can be easily added the question really goes to item 4).Which comes down to should root share the users .pub-cache
What happens if the pub-cache is updated by root.

If the root accounts does an update of pub-cache (pub get) then we have a real problem as the owning user can no longer access pub-cache.
As such I believe that root must have its own .pub-cache.
The following is that  'pub global activate' will only 'globally' activate a package for a single user.
As such a global activation would need to be done separately for the root user.
I've done some experimentation and it does seem to work.
I will run some more test over the next few days.


Updated deploy key for documentation

:white_check_mark: Build ExtendedXmlSerializer <IP_ADDRESS>-vkoxcmmi completed (commit https://github.com/ExtendedXmlSerializer/home/commit/26df5f6e23 by @Mike-E-angelo)
Install it by running the following command in Package Manager Console:
Install-Package ExtendedXmlSerializer -Version <IP_ADDRESS>-vkoxcmmi -Source https://ci.appveyor.com/nuget/extendedxmlserializer-preview

Problems with the above command? You may be running into this known issue here:
https://github.com/NuGet/Home/issues/7189


Write a README for cargo-shuttle

In the [Deploying](https://docs.rs/shuttle-service/latest/shuttle_service/#deploying) section there is a link to cargo shuttle
which links to https://docs.rs/crate/cargo-shuttle/latest.
That leads to a valid page, but its main content is cargo-shuttle-0.2.2 is not a library. which is not particularly welcoming.

I agree. We should link to GH with a README.md for the cargo-shuttle crate instead.

@brokad @christoshadjiaslanis Looking for something to do :) If this is still required, can you let me know what's expected on the README (like a short bullet-point outline) and I can draft something?

@nahuakang for anyone installing the cli tool this might still be nice though. A short bullet-point outline with a short description for each sub-command will be great.
Since the cli is not stable yet, I fear a proper documentation will create extra maintenance in the near future.

@nahuakang Yes, please :smile:


https://next.material-ui.com/ --> This site's features are not working 🙄

[x] The issue is present in the latest release.
[x] I have searched the issues of this repository and believe that this is not a duplicate.

Current Behavior 😯

https://next.material-ui.com/
Why this website is not workign properly ?
I can't open the sidebar ,there's no search bar in there to search for various things
Even alteranatively if I click something from side panel , then also it doesn't work
Expected Behavior 🤔

Steps to Reproduce 🕹

Steps:

Context 🔦

Your Environment 🌎

`npx @mui/envinfo`
  Don't forget to mention which browser you used.
  Output from `npx @mui/envinfo` goes here.

References to javascript files return 404.

I think they have moved new version docs to mui.com

We are trying to make the redirect works, please head directly to https://mui.com. duplicate #28368


Add a note about restricting access to certificate files

This information is not version specific - certificates should always be protected.

Thanks, @Rick-Anderson!  I got a warning about using an absolute URL for the doc link.  What's the appropriate way to do that?

Thanks, @Rick-Anderson! I got a warning about using an absolute URL for the doc link. What's the appropriate way to do that?

I fixed it, see my commit if you're interested.

@blowdart  30 second review

@Rick-Anderson Please merge whenever you're ready or let me know when I can.


Allow specifying artist via Spotify artist URI instead of just name

Another proposed PR I would like to run by you before working on.
As I've added a Spotify API artist search check to my lineup scrapers, I came across the varying challenges you've already experienced with not always getting the right artist (noting the current logic in https://github.com/dot4qu/Lineup-List/blob/dev/src/spotify-helper.ts#L127 that attempts a lowercase name check against top 15 results, and if no matches picks the first).
I've come across a couple of cases where an artist doesn't have a unique name (Cici) or even a case-unique name (e.g. Cici, CICI, CiCi). I can work out the correct one, but then have no way of ensuring that passes through via the lineup file. Similarly this would have helped avoid the Maneskin UTF-8 issue around accented characters.
I was going to propose a possible solution: allowing the passing in of an artist in a lineup file as the URI from the Spotify artist object e.g. spotify:artist:4kI8Ie27vjvonwaB2ePh8T.
It would be a relatively straightforward check in the warm cache script to simply check if the artist name starts with spotify:artist: and if so, query the Spotify API artist endpoint rather than the search one. Alternatively could pipe-separate the first value in the csv e.g. CiCi|spotify:artist:4kI8Ie27vjvonwaB2ePh8T,2 which might make debugging a little easier. If the pipe-character was detected and a valid Spotify URI found, the code could use that over the artist name. Either way, it would be backward-compatible with existing lineup files.
This might seem like a bit of a fudge rather than upgrading the line-up file format to something that supports a more complex object hierarchy as you proposed on #25 - but that's relatively speaking a much bigger change.

Not ignoring these I promise! Super hectic time for me right now sorry, moving internationally in a couple weeks and trying to  get that situated + getting two board designs finished to get them back in time from China.
So I've also thought about this as a solution to the issue that I fixed with the code that you identified correctly. It sat on the todo list for a while and then I eventually scrapped it because with the new logic to iterate until it found an exact match I hadn't seen any more errors between artists.
I still think it's a good idea to add the functionality, but I don't want to do it at the expense of the readability of the file. I like having the artist names in there so I can hop in and add daily lineups, remove some artists that get dropped, etc. I wouldn't be able to do that if it was just URIs.
That being said, an easy fix for that is just including it in the comma-delimited list like we've talked about for some other additions as well, i.e.: The Chemical Brothers,spotify:artist:xxxxxxxxxx,2
I'm kind of annoying about this format though and I'd rather not keep shoving more information into just a CSV basically. I think this is the perfect kind of thing to include if the lineup files switch to a more structured format like yaml though:
artist:
- name: The Chemical Brothers
- uri: xxxxxxxxxxxxxxxx
- days:
    - 1
    - 2

You get the point. Have you seen any other instances of artists not matching up correctly from your scraper?

Happy to put together a PR for a yaml lineup format. Looks like using the yaml library it's fairly trivial to parse files. To maintain backward compatibility, could just search for both lineup extensions (festival_year.yml or .txt) and prefer the .yml one if it exists.
One point re your proposed format above - I think this might make the lineup files a bit more difficult to review, because given you are listing artists and then assigning them to days, this means there is no easy way to just read a file and see who is on what day. I can see how you're trying to support artists who appear on multiple days but is it worth the increased complexity when reading a file when this is relatively rare? I would have thought the lesser of two evils would be just to list the artist out for each day they appear on. But happy if that's the way you want to go.
You previously suggested this format on #25 (which also covered externalising the festival data, but one step at a time):
display_name: Nos Alive
slug: nosalive
year: 2022
days: 0
artists:
  - blah
  - blah
  - blah

How about combined (though I would probably ignore the festival data initially and just continue filename-based loading):
display_name: Nos Alive
slug: nosalive
year: 2022
days:
  - day:
      name: '1'
      artists:
        - artist:
            name: The Chemical Brothers
            spotify_uri: xxxxxxxxxxxxxx
        - artist:
            name: The Strokes
            spotify_uri: xxxxxxxxxxxxxx
  - day:
      name: '2'
      artists:
        - artist:
            name: The Cure
            spotify_uri: xxxxxxxxxxxxxx
        - artist:
            name: The XX
            spotify_uri: xxxxxxxxxxxxxx

URI would be optional.
This does open up lots of other possibilities, such as having both friendly names and actual dates for festival days (particularly relevant for say All Points East where it takes place over multiple weeks) and any other metadata that adds value.

Yeah so that's where I was a little hung up when briefly thinking through the format the first time around. I couldn't decide if I liked having days be the top level key and the artists all underneath it but I don't actually see why it would be bad. I think your second example is pretty solid. One note I would have is that each list item should just have a key as the top level item, then fields below it. So it would look more like
display_name: Nos Alive
slug: nosalive
year: 2022
days:
  - 1:
    display_name: Friday, June 16th
    artists:
      - The Chemical Brothers:
        spotify_uri: xxxxxxxxxxxxxx
      - The Strokes:
        spotify_uri: xxxxxxxxxxxxxx
  - 2
    display_name: Saturday, June 17th
    artists:
      - The Cure:
        spotify_uri: xxxxxxxxxxxxxx
      - The XX:
        spotify_uri: xxxxxxxxxxxxxx

I'm kind of ehh on using the artist display name as the key, but the only two other decent options I can think of are either using the spotify uri or using some sort of slug:
      - the_strokes:
        display_name: The Strokes
        spotify_uri: xxxxxxxxxxxxxx

I don't like the former because that mandates the use of spotify URI and I'd like it to be optional, and I don't like the latter because it's annoying amount of extra work to slugify the artist names when I'm inputting from lineup posters (I recognize you don't have either of these problems from your scraping script).

could just search for both lineup extensions (festival_year.yml or .txt) and prefer the .yml one if it exists.
Yep agreed, no need to go through the past ones and change much. Depending on if there's more detail added to the yaml files like festival dates, or actual day names/dates versus just numbers, the frontend render will have to gracefully handle the case of not having all the data for older .txt based lineups.

To your last point:

This does open up lots of other possibilities, such as having both friendly names and actual dates for festival days
I don't actually know why I'm only using 1, 2, and 3. I started using the actual days for one or two festivals and then completely forgot about them. The day numbers are stored as strings anyway I'm pretty sure so there's probably nothing stopping switching to more detailed days strings already.

I don't actually know why I'm only using 1, 2, and 3. I started using the actual days for one or two festivals and then completely forgot about them. The day numbers are stored as strings anyway I'm pretty sure so there's probably nothing stopping switching to more detailed days strings already.

Just a very quick point on this - the day goes into the redis key I think i.e. festivals:name_year:<day>. So if you start putting wacky things in there it'll probably upset it.

I have got something working which you can now see as a draft PR on #46. At the moment it effectively just replicates the current format in YAML, with the only addition being the Spotify URI (i.e. days work the same way as they do currently)

One note I would have is that each list item should just have a key as the top level item, then fields below it. So it would look more like

I just tried changing the code in my PR to have your YAML layout and am struggling to quickly see how I get it to parse the artist name or day as a key into an object property. The way I've done it is probably naive as to what you can do with YAML, but it does work. If you're keen that I fix that I will take a look at it again.


GUI NX - Enable the GENERATE CERTIFICATE button

I'm submitting a ...

[ ] bug report
[ ] feature request
[ ] support request
[x] improvement

After inserting the .pem content enable the GENERATE CERTIFICATE button

Please tell us about your environment:

Version:GUI NX
Environment: [docker-compose]
Operating system: [Ubuntu 16.04]

I didn't understand what's the problem: the button is enabled.
Maybe we can change the button variant to "contained" to improve the clarity of this page.

I suggested an improvement in the button, when inserting the file, "enable" the button, not leave it bottomless, "transparent", with the feeling that the button did not enable after inserting the data.


Assignment 1 A. O. Biffo

Introduction
My name is Biffo. I am a PhD candidate at the Reactor Institute, Technical University of Delft. I love using the gym and playing football during my leisure.
Describe your research in 2-3 sentences to someone that is not from your field (please avoid abbreviations)
I am currently working the so-called Solid Oxide Fuel Cell system. This system is a renewable energy storage and conversion device. The goal of my PhD studies is to improve the performance of this device.
My research entails the following aspects:

Research Aspect
Answer

Use/collect personal data (health data, interviews, surveys)
No

Use/collect experimental data (lab experiments, measurements with instruments)
Yes

Collaborate with industry
Yes

Write/develop software as the main output of the project
No

Use code (as in programming) for data analysis
Yes

Work with large data (images, simulation models)
No

Other:
N/A

Reflections on the importance of RDM videos
To start with, I have no horror stories to share. And, the videos have enlightened me about the need to manage research data as this is pertinent for every research.
What would you like to learn during this course?
Research Data Management
Checklist assignments

[x] Assignment 1: creating a GitHub issue (before Class 1)
[x] Respond to the GitHub issue on 'data challenge'
[x] Assignment 2: Data Flow Map 1 (share a link in this issue before 17 May 13:00). Link: https://github.com/BiffoQ/RDM-Assignments/tree/master
[x] Provide feedback to at least one Assignment 2 from another participant
[x] Respond to the GitHub discussion on 'licenses'
[x] Respond to the GitHub discussion on 'folder structure'
[x] Respond to this GitHub issue with your readme file
[x] Provide feedback to at least one readme file from another participant
[x] Assignment 3: Data Flow Map 2 (share a link in this issue before 31 May 13:00). Link: https://github.com/BiffoQ/RDM-Assignments/tree/master
[x] Provide feedback to at least one Assignment 3 from another participant
[x] Assignment 4: Data Management Plan (before Class 2)
[x] Respond to the GitHub discussion on 'Data Management Plans' if you have any questions (optional)
[x] Assignment 5: Data Flow Map 3: submit your slide (before Class 2)

Hi @BiffoQ! Thanks for handing in your assignment 2 - and on GitHub :)
Well done on the assignment: it looks very detailed and comprehensive!

Indeed, visuals are also data! I'll repeat the same comment I also gave to Héctor, just in case it is of interest: Regarding visuals, Im not sure if it is helpful for your research but you may want to check out BioRender: TU Delft has licenses for this illustration software.
I wonder what part of your data is personal data? You earlier indicated that you won't be working with it but in the assignment I see several personal data flags?
Project/One Drive is an excellent combination :)

Hi Biffo,
I think you have a very good idea about the data you are generating. I like that you included visuals as well. Also think about collected literature and written texts (protocols, articles and other documents) as data you have to safeguard in some way.
I think you also have a very strong data security by working directly in an externally stored location. This way you won't lose anything in case something happens to your laptop or desktop.

Hi @BiffoQ! Thanks for handing in your assignment 2 - and on GitHub :)
Well done on the assignment: it looks very detailed and comprehensive!

Indeed, visuals are also data! I'll repeat the same comment I also gave to Héctor, just in case it is of interest: Regarding visuals, Im not sure if it is helpful for your research but you may want to check out BioRender: TU Delft has licenses for this illustration software.
I wonder what part of your data is personal data? You earlier indicated that you won't be working with it but in the assignment I see several personal data flags?
Project/One Drive is an excellent combination :)

Thanks for the feedback, Esther. I have heard about BioRender, and I have been procrastinating checking it out. Maybe it is time to break the jinx. Thanks for mentioning it.
Regarding personal data, I could not find flags that reflect how I use my data. I thought 'personal' is the most relevant -- I might be wrong though.
Cheers :)

Hi Biffo, I think you have a very good idea about the data you are generating. I like that you included visuals as well. Also think about collected literature and written texts (protocols, articles and other documents) as data you have to safeguard in some way.
I think you also have a very strong data security by working directly in an externally stored location. This way you won't lose anything in case something happens to your laptop or desktop.

Thanks for your comment, Robin. In fact, you are right about collected pieces of literature and written texts. It is sad that they skipped my mind :(.
Cheers :)

Thanks for responding @BiffoQ !

Regarding personal data, I could not find flags that reflect how I use my data. I thought 'personal' is the most relevant -- I might be wrong though.

With personal data we mean data that can directly be traced back to an individual, such as a name, IP address, birth date etc. Do you have any of this data that allows you to identify an individual?
Please also don't forget to provide feedback to other people's assignments!

Hi @BiffoQ!
I don't see a file for your assignment 3 in the link that you included above, and I miss your READme file! Can you update the links and/or share it here as a new comment?
Please also don't forget to provide feedback to other people's assignments, if you haven't already, and to add your data challenge and license preferences to the dicussion threads!

No worries @BiffoQ! I found them in the master branch indeed. You can also provide direct links to files in different branches. (for example, your README). I'm not sure why this happened, but can have a look at it if you want to get this fixed?
I'll have a look at the assignments later, for now some feedback on your README:
README:

I think your dataset title could be a bit more specific about either the content of the dataset or the research questions that this particular dataset is trying to address. It could also be data underlying a research publication, so then you could say: 'Dataset underlying the publication: [name publication]'.
An ORCID is a persistent identifier for yourself as a researcher, and allows you to collect research outputs in one space that you can manage yourself. You can set up your own ORCID, and have a look at Pedro's ORCID to see how it looks like when you have more research outputs.
Is there any additional information that the Electroceramics Society wants you to add to research outputs? Or is just the name of the Society sufficient?
For the 'Licenses/restrictions placed on the data' you can add your preferred license from the licence thread. I don't think you completed this part yet, so please do still add your preferred licenses there! (See the course materials for more information about licenses.)
Well done on adding the folder structure to the README!
Your methodological information could be more comprehensive. For example: which different devices were used? If it is helpful you can also copy/paste and/or adjust information from the method section of a thesis chapter or publication, or directly refer to the publication for this information.
If any questions in the README template do not make sense for the data/software that you're working with, you can also delete those questions. That will make the file more readable.

Hi @EstherPlomp,
everything has been fixed.
Cheers.
Biffo.

Great, well done for completing all the course activities @BiffoQ! I noticed that in the post above you're quoting some text of mine: was there anything you wanted to respond to?


Fixed typo in the development section of the README

Where would you be without my keen eyes and sharp mind?

Somewhere in the matrix, oblivious to the real world and all the typos in my READMEs?


Object detection 2d tud detr

This PR contains the DetrLearner, which is based on the Detr algorithm by Facebook. The original code can be found here. The original code is licensed under the Apache 2.0 license. I tried to take care of license issues, by stating which code is copied and what is modified.

Please let us know when this PR is ready for review.

Dear reviewers,
This PR is ready for review. Thank you in advance.

A couple of comments still have to be addressed.
Then I checked again the tests and I still get errors:
(venv) stefi@libeccio:~/develop/opendr_internal$ python3 -m unittest discover -s tests/sources/tools/perception/object_detection_2d/detr/
E
======================================================================
ERROR: test_detr (unittest.loader._FailedTest)
----------------------------------------------------------------------
ImportError: Failed to import test module: test_detr
Traceback (most recent call last):
  File "/usr/lib/python3.6/unittest/loader.py", line 428, in _find_test_path
    module = self._get_module_from_name(name)
  File "/usr/lib/python3.6/unittest/loader.py", line 369, in _get_module_from_name
    __import__(name)
  File "/home/stefi/develop/opendr_internal/tests/sources/tools/perception/object_detection_2d/detr/test_detr.py", line 23, in <module>
    from opendr.perception.object_detection_2d.detr.detr_learner import DetrLearner
  File "/home/stefi/develop/opendr_internal/src/opendr/perception/object_detection_2d/detr/detr_learner.py", line 30, in <module>
    from opendr.perception.object_detection_2d.detr.algorithm.datasets import build_dataset, get_coco_api_from_dataset
  File "/home/stefi/develop/opendr_internal/src/opendr/perception/object_detection_2d/detr/algorithm/datasets/__init__.py", line 20, in <module>
    from .coco import build as build_coco
  File "/home/stefi/develop/opendr_internal/src/opendr/perception/object_detection_2d/detr/algorithm/datasets/coco.py", line 28, in <module>
    import opendr.perception.object_detection_2d.detr.algorithm.datasets.transforms as T
AttributeError: module 'opendr.perception.object_detection_2d.detr.algorithm' has no attribute 'datasets'

----------------------------------------------------------------------
Ran 1 test in 0.000s

FAILED (errors=1)

Please also make sure that all the CI tests are passing.

Thank you!
Now the tests are working correctly locally for me as well.
Could you please just try to reduce the verbosity and logs of the test?
This will make the results of the CI tests more readable.
About the failing CI it is related to another test (see https://github.com/tasostefas/opendr_internal/pull/113#issuecomment-886637213) and it should not be related to your changes.

Please write a message when this PR is ready for review.

Please write a message when this PR is ready for review.

Dear reviewers, this PR is ready for review. I have implemented the requested changes and I will provide some example scripts in the nearby future.


cant ident annotations corectly

Following code generates standard error: "Expected 1 space after asterix..."
Applies to 2. version*
 * @ORM\Table(
 *     name="table_name",
 *     uniqueConstraints={
 *         @ORM\UniqueConstraint(name="some_idx", columns={"some_column"})
 *     }
 * )

Already solved, waiting for release. See #110.


Getting issue when client accept the Voip Call

Hello Team,
I need help, I want to start a call timer, when user accept or answered the call.Actually currently i am able to connect the voip call, but not able to track when user accept the call.
Please let me know which method will call when user accept the call or answer the call.
I am using xcode 10.0
and latest version of Twilio.
I have used the demo call.
Please let me know what i do?

Hi @devlove1C
Thanks for reaching out and glad that you are able to integrate the Voice iOS SDK and make calls!
To do this, you can use the answerOnBridge flag in your TwiML response and configure according to your business logic. If the flag is set to true, the caller client will only get the callDidConnect: delegate callback when the call is actually answered by the receiver.
Let us know if the flag works for you.
Thanks
-bobie

Hello Team,
Actually currently when phone ringing start, the callDidConnect: delegate method called but  this method doesn't  call when the call is actually answered by the receiver.
We have already implement the below method at back end side
const VoiceResponse = require('twilio').twiml.VoiceResponse;
const response = new VoiceResponse();
const dial = response.dial({
callerId: '+15551112222',
});
dial.number('+15558675310');
console.log(response.toString());
Please let me know what I do, to track the call is answered by the receiver.
Thanks Dev

Hi @devlove1C
Please add answerOnBridge to your dial() so that your mobile client gets the callDidConnect: callback when the call is answered by the callee.

Hello @bchen-twilio
I have added the 'answerOnBridge' in dial(), but still doesn't get callback when the call is answered by the callee.
Here is my code :-

+918269009410

I have attached the .swift file(swift code which we are using to voip call) Please check that
Let me know if there is anything missing or wrong
Thanks
-Dev

Hi @devlove1C
Unfortunately I cannot view those file for security reasons. It would be great if you can share the snippets in Github gist format. We can check the TwiML response if you can give us a Call SID.
Back to the issue you were seeing - did it stop giving you the callDidConnect: callback after you enabled answerOnBridge in the <Dial>?
Thanks
-bobie

Hello @bchen-twilio ,
Actually I want to make a phone call by VOIP. We have a app, in which we want voip call implementation. User can able to make a voip call  by app and  callee will get a phone call on his mobile number.
Server side code is
<?xml version="1.0" encoding="UTF-8" ?>
<Response>
    <Dial callerId="+12138103667" answerOnBridge="true"
  timeLimit="14400" timeout="15"<EMAIL_ADDRESS>        <Number<EMAIL_ADDRESS>statusCallbackMethod="POST" statusCallbackEvent="initiated ringing answered completed">+918269009410</Number>
    </Dial>
</Response>

And my swift code is here
import UIKit
import TwilioVoice
import PushKit
import CallKit
import AVFoundation
class HomeVC: UIViewController,PKPushRegistryDelegate , TVONotificationDelegate, CXProviderDelegate,TVOCallDelegate {
var token_info: UserTokenResponse!
@IBOutlet weak var shadowView: UIView!
@IBOutlet weak var CallPopupView: UIView!
@IBOutlet weak var txtUserName: UITextField!
@IBAction func dismissCallpopupView(_ sender: Any) {
CallPopupView.isHidden = true
shadowView.isHidden = true
txtUserName.resignFirstResponder()
}
@IBAction func showCallPopup(_ sender: Any) {
    shadowView.isHidden = false
     CallPopupView.isHidden = false
}
// MARK: PKPushRegistryDelegate
func pushRegistry(_ registry: PKPushRegistry, didUpdate credentials: PKPushCredentials, for type: PKPushType) {
    NSLog("pushRegistry:didUpdatePushCredentials:forType:")
    let deviceToken = (credentials.token as NSData).description

    if (token_info != nil) {
        TwilioVoice.register(withAccessToken: token_info.token, deviceToken: deviceToken) { (error) in
            if let error = error {
                NSLog("An error occurred while registering: \(error.localizedDescription)")
            }
            else {
                NSLog("Successfully registered for VoIP push notifications.")
            }
        }
    }

    self.deviceTokenString = deviceToken
}

// MARK: TVONotificaitonDelegate
func callInviteReceived(_ callInvite: TVOCallInvite) {
    if (callInvite.state == .pending) {
       // handleCallInviteReceived(callInvite)
    } else if (callInvite.state == .canceled) {
       // handleCallInviteCanceled(callInvite)
    }
}

func notificationError(_ error: Error) {
    NSLog("notificationError: \(error.localizedDescription)")
}

// MARK: CXProviderDelegate
func providerDidReset(_ provider: CXProvider) {
    NSLog("providerDidReset:")
    TwilioVoice.isAudioEnabled = true
}

@IBOutlet weak var placeCallButton: UIButton!
 var call:TVOCall?

var voipRegistry:PKPushRegistry
 var deviceTokenString:String?
var isSpinning: Bool
var incomingAlertController: UIAlertController?
var callKitCompletionCallback: ((Bool)->Swift.Void?)? = nil

let callKitProvider:CXProvider
let callKitCallController:CXCallController

  @IBOutlet weak var callControlView: UIView!
@IBOutlet weak var muteSwitch: UISwitch!
@IBOutlet weak var speakerSwitch: UISwitch!

required init?(coder aDecoder: NSCoder) {
    isSpinning = false
    voipRegistry = PKPushRegistry.init(queue: DispatchQueue.main)
    TwilioVoice.logLevel = .verbose
    let configuration = CXProviderConfiguration(localizedName: "CallKit Quickstart")
    configuration.maximumCallGroups = 1
    configuration.maximumCallsPerCallGroup = 1
    configuration.ringtoneSound = "ringtone.caf" //set your default ringtone
    if let callKitIcon = UIImage(named: "iconMask80") {
        configuration.iconTemplateImageData = UIImagePNGRepresentation(callKitIcon)
    }

    callKitProvider = CXProvider(configuration: configuration)
    callKitCallController = CXCallController()

    super.init(coder: aDecoder)

    callKitProvider.setDelegate(self, queue: nil)

    voipRegistry.delegate = self
    voipRegistry.desiredPushTypes = Set([PKPushType.voIP])
}

deinit {
    // CallKit has an odd API contract where the developer must call invalidate or the CXProvider is leaked.
    callKitProvider.invalidate()
}

override func viewDidLoad() {
    super.viewDidLoad()
    let data = UserDefaults.standard.object(forKey: "USER") as! NSData
    let user_info = NSKeyedUnarchiver.unarchiveObject(with: data as Data) as! PsychicLoginResponse
    let token_data = UserDefaults.standard.object(forKey: "TOKEN_INFO") as! NSData
   token_info = NSKeyedUnarchiver.unarchiveObject(with: token_data as Data) as! UserTokenResponse
   // let paraTo : String = user_info.firstName + "\(user_info.customerId)"
    self.title = user_info.firstName
   toggleUIState(isEnabled: true, showCallControl: false)
}
//MARK:- Mute Switch Toggle
@IBAction func muteSwitchToggled(_ sender: UISwitch) {
    if let call = call {
        call.isMuted = sender.isOn
    } else {
        NSLog("No active call to be muted")
    }
}
//MARK:- Speaker Switch Toggle
@IBAction func speakerSwitchToggled(_ sender: UISwitch) {
    toggleAudioRoute(toSpeaker: sender.isOn)
}

func toggleUIState(isEnabled: Bool, showCallControl: Bool) {
   // placeCallButton.isEnabled = isEnabled
    if (showCallControl) {
        callControlView.isHidden = false
        muteSwitch.isOn = false
        speakerSwitch.isOn = true
     }else {
        callControlView.isHidden = true
    }
}

@IBAction func placeCall(_ sender: UIButton) {
    txtUserName.resignFirstResponder()
     TwilioVoice.call( token_info.token, params: ["to" : txtUserName.text!], delegate: self)

}

// MARK: Call Kit Actions
// MARK: Call Kit Actions
func performStartCallAction(uuid: UUID, handle: String) {
    let callHandle = CXHandle(type: .generic, value: handle)
    let startCallAction = CXStartCallAction(call: uuid, handle: callHandle)
    let transaction = CXTransaction(action: startCallAction)

    callKitCallController.request(transaction)  { error in
        if let error = error {
            NSLog("StartCallAction transaction request failed: \(error.localizedDescription)")
            return
        }
        NSLog("StartCallAction transaction request successful")
        let callUpdate = CXCallUpdate()
        callUpdate.remoteHandle = callHandle
        callUpdate.supportsDTMF = true
        callUpdate.supportsHolding = true
        callUpdate.supportsGrouping = false
        callUpdate.supportsUngrouping = false
        callUpdate.hasVideo = false
        self.callKitProvider.reportCall(with: uuid, updated: callUpdate)
    }
}

func stopSpin() {
    isSpinning = false
}

// MARK: TVOCallDelegate
func callDidConnect(_ call: TVOCall) {
    NSLog("callDidConnect:")
    self.call = call
    toggleUIState(isEnabled: true, showCallControl: true)
    stopSpin()
    toggleAudioRoute(toSpeaker: true)
}

func call(_ call: TVOCall, didFailToConnectWithError error: Error) {
    NSLog("Call failed to connect: \(error.localizedDescription)")

    if let completion = self.callKitCompletionCallback {
        completion(false)
    }

    performEndCallAction(uuid: call.uuid)
    callDisconnected()
}

func call(_ call: TVOCall, didDisconnectWithError error: Error?) {
    if let error = error {
        NSLog("Call failed: \(error.localizedDescription)")
    } else {
        NSLog("Call disconnected")
    }

    performEndCallAction(uuid: call.uuid)
    callDisconnected()
}

func callDisconnected() {
    self.call = nil
    self.callKitCompletionCallback = nil
    stopSpin()
    toggleUIState(isEnabled: true, showCallControl: false)
    self.placeCallButton.setTitle("Call", for: .normal)
}
func performEndCallAction(uuid: UUID) {

    let endCallAction = CXEndCallAction(call: uuid)
    let transaction = CXTransaction(action: endCallAction)

    callKitCallController.request(transaction) { error in
        if let error = error {
        self.CallPopupView.isHidden = true
            NSLog("EndCallAction transaction request failed: \(error.localizedDescription).")
            return
        }
        NSLog("EndCallAction transaction request successful")
    }
}

// MARK: AVAudioSession
func toggleAudioRoute(toSpeaker: Bool) {
    // The mode set by the Voice SDK is "VoiceChat" so the default audio route is the built-in receiver. Use port override to switch the route.
    do {
        if (toSpeaker) {
            try AVAudioSession.sharedInstance().overrideOutputAudioPort(.speaker)
        } else {
            try AVAudioSession.sharedInstance().overrideOutputAudioPort(.none)
        }
    } catch {
        NSLog(error.localizedDescription)
    }
}

func pushRegistry(_ registry: PKPushRegistry, didReceiveIncomingPushWith payload: PKPushPayload, for type: PKPushType) {
    NSLog("pushRegistry:didReceiveIncomingPushWithPayload:forType:")
    if (type == PKPushType.voIP) {
        TwilioVoice.handleNotification(payload.dictionaryPayload, delegate: self)
    }
}
override func didReceiveMemoryWarning() {
    super.didReceiveMemoryWarning()
}

Note:- Let me know if there is anything missing or wrong

Hello team,
Can anybody have idea about my above comment issue.
Please let me know what i do?

Hi @devlove1C
Before I use the same TwiML logic and try, are you getting any callDidConnect: callback with this implementation (and when)?
Thanks
-bobie

Hello @bchen-twilio
Yeah when phone ringing start, the callDidConnect: delegate method called but this method doesn't call when the call is actually answered by the receiver.
I didn't undertstand what you want to say about "TwiML logic"
Please response as soon as possible

Hi @devlove1C
The callDidConnect: callback will only be fire once, either the call is connected between the caller and Twilio Voice service, or the call is answered by the callee with answerOnBridge enabled in the TwiML. Do you experience the same when the callee is another SDK client, i.e. using <Client> inside <Dial> and call another registered identity?
Also it would be great if you can provide us a Twilio Call SID which you had this issue? That way we can also investigate more insights of the signaling connection of the call. You can find Call SIDs in the Programmable Voice Dashboard.
Thanks,
-bobie

Hi @devlove1C
I am closing the issue since there hasn't been any activity for a while. Feel free to reach out to us any time.
Thanks
-bobie

Hi,
i'm facing the same issue mentioned above. @bchen-twilio can you please help out where to add answerOnBridge . I've downloaded php code and don't know in which file add this answerOnBridge

Hi @AdnanMajeed06
You can use the setAnswerOnBridge method of the Dial object: https://github.com/twilio/twilio-php/blob/650f42647c9b3039e03ae075785164ec97203e94/src/Twilio/TwiML/Voice/Dial.php#L202
Let me know if this works for you.
Cheers,
-bobie

Hi @bchen-twilio
Thank for your quick reply.
I've downloaded the sample PHP code from here
https://github.com/twilio/voice-quickstart-server-php
Can you please help me how I can add setAnswerOnBridge  in makeCall.php file.
Thank you

Hi @AdnanMajeed06
This will do:

Hi @bchen-twilio ,
I've already tried this above code but it seems not working. callDidStartRinging never called and callDidConnect delegate called when call start ringing. When callee answer the call. There is no delegate that triggers.
Please check the code.
include('./config.php');
$callerId = $_POST["from"] ;
$to = isset($_POST["to"]) ? $_POST["to"] : "";
if (!isset($to) || empty($to)) {
  $to = isset($_GET["to"]) ? $_GET["to"] : "";
}
$callerNumber = '1234567890';
$response = new Twilio\Twiml();
if (!isset($to) || empty($to)) {
  $response->say('How are you');
} else if (is_numeric($to)) {
  $dial = $response->dial(
    array(
  	  'callerId' => $callerNumber
  	));
  $dial->number($to);
} else {
  $dial = $response->dial(
      array(
          'callerId' => $callerId,
          'answerOnBridge' => TRUE
      ));
  $dial->client($to);
}
print $response;

Thank you

Hi @AdnanMajeed06
Please provide a Call SID where you are experiencing problem with the callbacks.

Hi @bchen-twilio ,
Here is SID
AC2ad3a65553e8e1e6ef7d9f12f85fecba
Thanks

Hi @bchen-twilio
There are two SID i'm using in Config file. i don't know which one is Call SID. i'm providing you both.
$APP_SID = 'APb32af4b29cc4035bf37415f641668b4f';
$ACCOUNT_SID = 'AC2ad3a65553e8e1e6ef7d9f12f85fecba';
Thanks

Hi @AdnanMajeed06
You can find the Call SIDs here: https://www.twilio.com/console/voice/calls/logs

@bchen-twilio
Here is call SID : CAef7ae541408a46f3c202c0d59034f894
Thank you

Thanks for providing the Call SID. I've checked it and for some reason during the signaling handshaking process I couldn't find the event that would trigger the ringing event. I will reach out to the Voice backend experts and see if they can provide more insights and will keep you updated.
-bobie

Hi @AdnanMajeed06
According to our backend expert, the account is currently a trial account thus once the call is made, the Twilio Voice service will skip the ringing state and connect the call directly to play a promotion prompt. That's the reason why the app didn't receive the callDidStartRinging: callback.
Can you confirm this?
Thanks,
-bobie

Hi @bchen-twilio,
Yes currently I'm using trial account and this point was never mentioned before neither in document that callDidStartRinging or answerOnBridge will not work in trial account. That can save our time :)
I'll upgrade my account and then let you know.
Thank you so much for your help.
Cheers.

Hi @bchen-twilio ,
I've updated my account and callDidStartRinging callback called. But I've got another issue here :)
There is no call ringing tone. In trial version once promotion prompt end there was a rigning tone. But now I can't hear any tone from the caller side.
Here is my latest call SID :  CA20f1b1a619d2d43d1ce3dd2db309a843
Thanks

Hi @AdnanMajeed06
With answerOnBridge enabled with the  verb, the caller won't hear any ringtone. The application can play the custom ringtone file locally upon receiving the callDidStartRinging: callback and stop when the call is connected or disconnected.
-bobie

I lost a day to this because no where in the docs does it say this is a limitation of trial accounts. At the least, it would be helpful to drop that info here as a bullet point: https://support.twilio.com/hc/en-us/articles/360036052753-Twilio-Free-Trial-Limitations.

Hi @MarkPare
Thanks for reaching out and we are sorry for the inconvenience. Can you provide a Call SID or the error details to help us improve the SDK documentation?
-bobie


Meld displays nothing in right pane when comparing directories

Describe the bug
The meld command displays nothing in the right pane when comparing folders.
It was working fine until recently.
I'm not sure when I last used meld,
but I suspect the problem started sometime in the last few months.
To Reproduce
Steps to reproduce the behavior:
$ rm -rf a b
mkdir a
echo "hello" > a/hello.txt
mkdir b
echo "hello again" > b/hello.txt
meld a b

The contents of the a folder are displayed in the left pane,
but the right pane is empty.
Expected behavior
I expect the contents of the a folder to be displayed in the left pane,
and the contents of the b folder to be displayed in the right pane.
Screenshots
A screenshot is attached.
Additional context
Here is the output of the meld command.
$ meld a b
Traceback (most recent call last):
  File "/nix/store/aaxl1lylcpijq8ipfz35prpkm3i1fc5k-meld-3.21.0/lib/python3.8/site-packages/meld/ui/emblemcellrenderer.py", line 100, in do_render
    pixbuf = self._get_pixbuf(self.emblem_name, self._emblem_size)
  File "/nix/store/aaxl1l
![Screenshot_20201213_185732](https://user-images.githubusercontent.com/1899200/102021251-77c88f80-3d76-11eb-96f9-19eaebffcf30.png)
ylcpijq8ipfz35prpkm3i1fc5k-meld-3.21.0/lib/python3.8/site-packages/meld/ui/emblemcellrenderer.py", line 64, in _get_pixbuf
    pixbuf = icon_theme.load_icon(name, size, 0).copy()
gi.repository.GLib.Error: gtk-icon-theme-error-quark: Icon 'emblem-new' not present in theme breeze (0)
Traceback (most recent call last):
  File "/nix/store/aaxl1lylcpijq8ipfz35prpkm3i1fc5k-meld-3.21.0/lib/python3.8/site-packages/meld/ui/emblemcellrenderer.py", line 100, in do_render
    pixbuf = self._get_pixbuf(self.emblem_name, self._emblem_size)
  File "/nix/store/aaxl1lylcpijq8ipfz35prpkm3i1fc5k-meld-3.21.0/lib/python3.8/site-packages/meld/ui/emblemcellrenderer.py", line 64, in _get_pixbuf
    pixbuf = icon_theme.load_icon(name, size, 0).copy()
gi.repository.GLib.Error: gtk-icon-theme-error-quark: Icon 'emblem-new' not present in theme breeze (0)
cairo.Error: Context.restore() without matching Context.save()

Notify maintainers
@jtojnar
@mimame
Metadata
Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.
$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 5.4.80, NixOS, 20.09.2205.65c9cc79f1d (Nightingale)`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.3.9`
 - channels(root): `"nixos-20.09.2205.65c9cc79f1d"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

Maintainer information:
# a list of nixpkgs attributes affected by the problem
attribute: meld
# a list of nixos modules affected by the problem
module:

Interesting. Does it happen if you install/enable adwaita-icon-theme?

Interesting. Does it happen if you install/enable adwaita-icon-theme?

Yes! Installed the theme, and now it works again. Thank you!

I think that is probably still a bug in Meld. At worst, it should show image-missing icon instead of a failure.

I just installed Nix on macOS 11.0.1 (Big Sur), then installed the 'meld' package.  When I invoke 'meld', I get a working application with no icons.  I tried installing the 'adwaita-icon-theme' package, but that did not fix the issue.  I have found Meld to be buggy when installed via Homebrew as well (and in general).  Very disappointing.  Time to learn how to diff in Spacemacs.

For icons, you might need something like https://github.com/NixOS/nixpkgs/pull/112325.

@jtojnar, thank you for the suggestion.  I tried nix-env -i gdk-pixbuf.  I got a message that there were multiple derivations.
When I ran meld, I saw no difference.  I may have to try some other derivations.  I did this while still having the adwaita-icon-theme still installed.
I must confess that I am a bit surprised.  It has been my understanding that Nix derivations are exhaustive, so dependencies cannot be missed like this.  However, it seems to me now that it depends heavily on how thorough was the writer of the derivation.  Apparently it is still possible to pick up undeclared dependencies that make installation appear to work.  Am I correct?  I assume a strict sandbox is then the answer, which not everyone will take the trouble to invoke properly.

@rdw20170120 Installing libraries like that will not help you with Nix. You would need to edit the meld expression to disable strictDeps.

It has been my understanding that Nix derivations are exhaustive, so dependencies cannot be missed like this.

That is true for dependencies the project’s build system checks at build time (e.g. linking of C libraries and other similarly static environments). More dynamic ecosystems like gobject-introspection or gdk-pixbuf will only fail at runtime when a dependency is missing.

However, it seems to me now that it depends heavily on how thorough was the writer of the derivation. Apparently it is still possible to pick up undeclared dependencies that make installation appear to work.

Right, dynamic dependencies are influenced by environment variables so they require wrappers, which can be forgotten or not noticed due to contaminated environment (e.g. when running the project in a terminal emulator that itself is wrapped). Or strict hermeticity would not be practical. And then there is the strictDeps bug that makes the wrappers inefficient.

I assume a strict sandbox is then the answer, which not everyone will take the trouble to invoke properly.

Missing sandboxing is not the issue (our CI is sandboxed, probably even on Mac but I am not familiar with the platform) as all dependencies checked at build time are there. The run time is the problem – compare static and dynamic programming languages.

Ah, thanks for filling in that crucial bit.  The issue is the intentional dynamic nature of (GUI) applications, which were designed and built for traditional Linux systems.  Meld is my first foray into using Nix to manage GUI applications, which I now understand is still a wild beast.  Most likely, fixing that will never be truly possible without a complete (and perhaps undesirable) redesign.  I am switching my tooling from Vim to Emacs (Spacemacs), so it is time for me to also embrace using that for working with diffs.  I was being lazy with Meld.

@rdw20170120 It is not that bad. It mostly works if hooks are properly specified, which Meld package has. The problem you were seeing was caused by a bug that is easy to bypass: https://github.com/NixOS/nixpkgs/commit/f02fc10d0dd79559de62e265da091d58f251a030 (Though, I am not sure if Mac does not need some extra considerations.)

I see.  Thanks for clarifying.  I am very impressed with Nix, and I strongly believe that it is the way to go.  But nothing is perfect, and there is no silver bullet.

Both bugs described in this issue still persist (at least on macOS):

The log is full of:
cairo.Error: Context.restore() without matching Context.save()
Traceback (most recent call last):
  File "/nix/store/w53f712qg889j8gbb5r33b2w0a0g1jw8-meld-3.22.0/lib/python3.10/site-packages/meld/ui/emblemcellrenderer.py", line 100, in do_render
    pixbuf = self._get_pixbuf(self.emblem_name, self._emblem_size)
  File "/nix/store/w53f712qg889j8gbb5r33b2w0a0g1jw8-meld-3.22.0/lib/python3.10/site-packages/meld/ui/emblemcellrenderer.py", line 64, in _get_pixbuf
    pixbuf = icon_theme.load_icon(name, size, 0).copy()
gi.repository.GLib.GError: gtk-icon-theme-error-quark: Icon 'emblem-new' not present in theme Adwaita (0)
cairo.Error: Context.restore() without matching Context.save()

I also still see this buggy behavior as of 'github:nixos/nixpkgs/aa9d4729cbc99dabacb50e3994dcefb3ea0f7447' (2023-12-14) on nixos.
I searched for "gi.repository.GLib.GError: gtk-icon-theme-error-quark: Icon 'emblem-symbolic-link' not present in theme Adwaita (0)" nix meld and found only one link which is an upstream bug filed with the exact same symptoms:

https://gitlab.gnome.org/GNOME/meld/-/issues/741

That ticket explains that the symptom is caused by missing adwaita icon theme, as suggested in https://github.com/NixOS/nixpkgs/issues/106844#issuecomment-744059825 yet when I looked at https://github.com/NixOS/nixpkgs/commit/f02fc10d0dd79559de62e265da091d58f251a030 I noticed that both revisions explicitly include gnome3.adwaita-icon-theme (right before the diff's change).
So now I'm confused why I am still seeing this symptom (almost 3 years after the patch).
I found that when I explicitly install gnome3.adwaita-icon-theme in my profile this bug goes away.
My installation method:
Am I seeing this problem because of my unusual approach to installing nix packages? I have a flake which selects a set of packages to install which I then install/upgrade with nix profile, so the broken version looks sort of like this:
{
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
# …
outputs = { nixpkgs, ... }:
  with nixpkgs.legacyPackages."x86_64-linux";
  symlinkJoin {
    name = "my-user-env";
    paths = [
      # …
      meld
  };
}

I modify this file in a local git repo, then do nix profile install . (or nix profile upgrade …).
If I include gnome3.adwaita-icon-theme in the symlinkJoin paths, then the bug goes away. Is there something about this installation method that prevents meld from properly including its runtime dependencies?
So I cannot tell if there's a nixpkgs bug for meld for the nix-env -i style flow or if the problem is only my installation method. My next plan is to read the nixpkgs source for meld to learn if my installation method deviates from say nix-env -i in some substantial way.

I found that when I explicitly install gnome3.adwaita-icon-theme in my profile this bug goes away.

That is the proper fix – adwaita-icon-theme being listed in buildInputs actually does not do anything.

Hm, my understanding of buildInputs is that it should include runtime dependencies, in which case I would expect the meld derivation to wrap or patch binaries to ensure those dependencies are met at runtime. Is my understanding incorrect?

I have meld in my NixOS environment.systemPackages
nixpkgs commit 9b5328b7f761a7bbdc0e332ac4cf076a3eedb89b.


minor refactor on avro

I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.
What's changed and what's your intention?

Checklist

[ ] I have written necessary rustdoc comments
[ ] I have added necessary unit tests and integration tests
[ ] I have added test labels as necessary. See details.
[ ] I have added fuzzing tests or opened an issue to track them. (Optional, recommended for new SQL features #7934).
[ ] My PR contains breaking changes. (If it deprecates some features, please create a tracking issue to remove them in the future).
[ ] All checks passed in ./risedev check (or alias, ./risedev c)
[ ] My PR changes performance-critical code. (Please run macro/micro-benchmarks and show the results.)

[ ] My PR contains critical fixes that are necessary to be merged into the latest release. (Please check out the details)

Documentation

[ ] My PR needs documentation updates. (Please use the Release note section below to summarize the impact on users)

Release note
If this PR includes changes that directly affect users or other significant modifications relevant to the community, kindly draft a release note to provide a concise summary of these changes. Please prioritize highlighting the impact these changes will have on users.

#17024  👈
main

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @xxchan and the rest of your teammates on  Graphite

Merge activity

May 30, 5:42 PM GMT+8: Graphite failed to merge this pull request due to This repository has GitHub's merge queue enabled, which is currently incompatible with Graphite. Try your merge again, or report a bug if you see this consistently.


BUG: fix SLSQP max iteration setting to fix #4921

Reference issue
To fix #4921
What does this implement/fix?
fix SLSQP max iteration setting and enable SLSQP and TNC unittest.
Additional information
TNC unittest can pass the unittest in current master branch code, so I enabled all methods for the test.

Id like to think about this for a few days.

Thinking a bit more deeply I think there are a few things that need to be changed in the SLSQP, and one discussion point in TNC.
SLSQP
Could you check when maxiter is reached that OptimizeResult.status == 9. Also the status message needs to be changed on L308, from Iteration Limit Exceeded to Iteration Limit Reached. Also the docstring for fmin_slsqp needs to be changed. I'm not sure if there are other locations in the documentation where those exit mode messages are written.
TNC
In the context of tnc the maxiter parameter actually refers to the maximum number of function evaluations (L355 of tnc.py). I don't think it's actually possible at the moment to set a max number of iterations, just a max number of function evaluations.

Hi. @andyfaff . Thank you for your review.  I added a test for OptimizeResult check and updated exit code message and docstring. Please take a look.
I have a question on TNC.
Number of iterations and number of function evaluations are not same meaning in TNC optimization?

When I inspected the TNC code it looks like maxiter is taken to mean the maximum number of iterations. From the docstring:
    maxiter : int
        Maximum number of function evaluation. If None, `maxiter` is
        set to max(100, 10*len(x0)). Defaults to None.

and:
In[8]: minimize(rosen, [2,3,2], method='tnc', options={'maxiter': 10})
Out[8]:
     fun:<PHONE_NUMBER>1396187
     jac: array([<PHONE_NUMBER>2, -532.93195793,<PHONE_NUMBER> ])
 message: 'Max. number of function evaluations reached'
    nfev: 44
     nit: 2

This is confusing, and I think it's a bug. Normally setting maximum function iterations would use a maxfun kwd. Note that I think res.nit, and res.nfev are correct.

I changed "maxiter" to "maxfun" in options of tnc solver.

I'd like to get feedback from other maintainers here, because it might cause problems for a few of our users.
@mdhaber

@mdhaber my ping was due to using maxfun in TNC rather than maxiter.

I haven't read TNC too closely, but from the discussion above it sounds like

the maximum number of function evaluations and the maximum number of iterations are distinct for TNC,
that the current interface allows control over the maximum number of function evaluations using the maxiter option, and
that there is no way to actually control the number of iterations.

I agree that

if maxiter actually sets the max number of function evaluations and
if the number of function evaluations does not equal the number of iterations

then maxfun should have been the name of the option.
I don't think just changing the name now is a good idea. I think one of the following would be better:

Leave the name alone
Add maxfun, have it do the same thing as maxiter, and mention both in the documentation.
(best) Do what you have done, but also add the ability to control the maximum number of iterations with maxiter

@mdhaber @andyfaff Thank you for reviewing. I added maxiter also for tnc solver. Currently, I prioritizes maxiter over maxfun. I rolled back some test codes because maxiter can be used. Please take a look.

@andyfaff Should I fix other something?

@andyfaff I did it. PTAL.

Looks good to me now. Thank you @AtsushiSakai for all the hard work.

And thanks @andyfaff for finishing this off; it dropped off my radar. You know, I just discovered the GitHub notification center / inbox today? : )


Support HTTPS

@Manason I stumbled across a forum post on the CFX.re forum, it is already possible to use HTTPS, this is how:
1. Start Your Server:
Start your FiveM server.
2. Authentication:
Monitor your server console for authentication information. Once the server is started, you should see authentication details.

3. Copy Authenticated URL:
Copy the URL displayed in the console after authentication. This URL likely contains the necessary authentication and server information.
4. Use as Endpoint:
Use the copied URL as the endpoint when making requests to your server. This endpoint provided by CFX.re should have a valid TLS certificate, enabling HTTPS.
This solution essentially leverages the existing infrastructure and TLS certificate provided by CFX.re for secure communication.


Servlet ReadListener/WriteListener errors return pooled buffers

Windows Build 2180 outcome was FAILURE using a merge of 6dc13548b9a8026379af5eb81be80247ccb1ab54
Summary: Tests passed: 2909, ignored: 613; exit code 1 Build time: 00:28:14

Merrged under https://issues.jboss.org/browse/UNDERTOW-1176


Sidebar not showing all icons and mashing search and source control together

Type: Bug
I don't know how to reproduce it, but my vscode's sidebar got weird, the source control icon disappeared and the number of changes are being displayed on the search icon now. So when I click the search icon it displays source control stuff and the search box way down in the component, in a way that I can't see the search results.

VS Code version: Code 1.80.2 (Universal) (2ccd690cbff1569e4a83d7c43d45101f817401dc, 2023-07-27T21:05:41.366Z)
OS version: Darwin arm64 23.1.0
Modes:

System Info

Item
Value

CPUs
Apple M2 Pro (12 x 24)

GPU Status
2d_canvas: enabledcanvas_oop_rasterization: disabled_offdirect_rendering_display_compositor: disabled_off_okgpu_compositing: enabledmetal: disabled_offmultiple_raster_threads: enabled_onopengl: enabled_onrasterization: enabledraw_draw: disabled_off_okvideo_decode: enabledvideo_encode: enabledvulkan: disabled_offwebgl: enabledwebgl2: enabledwebgpu: enabled

Load (avg)
6, 6, 7

Memory (System)
16.00GB (0.06GB free)

Process Argv
code/backend --crash-reporter-id e7bba6ab-34e7-4974-b500-3991c71283be

Screen Reader
no

VM
0%

Extensions (10)

Extension
Author (truncated)
Version

vscode-sql-formatter
adp
1.4.4

vscode-eslint
dba
2.4.2

gitlens
eam
14.4.1

prettier-vscode
esb
10.1.0

todo-tree
Gru
0.0.226

rest-client
hum
0.25.1

prisma
Pri
5.6.0

vscode-yaml
red
1.14.0

code-spell-checker
str
3.0.1

errorlens
use
3.15.0

A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383cf:30185419
vspor879:30202332
vspor708:30202333
vspor363:30204092
vslsvsres303:30308271
vserr242cf:30382550
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
vscod805:30301674
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593:30376534
pythonvs932:30410667
py29gd2263:30880072
vsclangdc:30486549
c4g48928:30535728
dsvsc012cf:30540253
pynewext54:30695312
azure-dev_surveyonecf:30548226
3biah626:30602489
f6dab269:30613381
showlangstatbar:30737416
pythonfmttext:30731395
fixshowwlkth:30771522
showindicator:30805244
pythongtdpath:30769146
i26e3531:30792625
pythonnosmt12:30797651
pythonidxpt:30866567
pythonnoceb:30805159
dsvsc013:30795093
dsvsc014:30804076
dsvsc015:30845448
pythontestfixt:30871694
pythonregdiag2cf:30871583
pyreplss1:30897532
pythonmypyd1:30879173
pythoncet0:30885854
2e7ec940:30885897
pythontbext0:30879054
dsvsc016cf:30886111
dsvsc017:30886112
dsvsc018:30886114
aa_t_chat:30882232

Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.84.2. Please try upgrading to the latest version and checking whether this issue remains.
Happy Coding!

Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.84.2. Please try upgrading to the latest version and checking whether this issue remains.
Happy Coding!

Already tried updating it, didn't solve it. Also removed the gitlens extension and it's still the same...

I recommend you use the Reset View Locations command from the Command Palette. Perhaps you had inadvertently dragged a view somewhere.

OMG it worked, thanks!


Incorrect work of context input in Procedures

I noticed a relatively correct operation of Procedures, but also a usability problem.
If we need to create a procedure in the context of which another type or object will be thrown, an error will occur:
"use server"
import { createServerActionProcedure } from "zsa"
import { zu } from "zod_utilz"
import { z } from "zod"

const authedProcedure = createServerActionProcedure()
  .input(z.object({ userId: z.number() }.or(z.number())))
  .handler(async ({ input }) => {
    return {
      user: {
        id: typeof input === number ? input : input.userId,
      },
    }
  })

export const updateUser = authedProcedure
  .createServerAction()
  .input(zu.useFormData(z.object({
    newEmail: z.string(),
    newAvatar: z.instanceof(File)
  }))).handler(async ({input, ctx}) => {
    const {user} = ctx

    // Update user's email in the database
    await db.update(users).set({
      email: input.newEmail,
      avatar: input.avatar
    }).where(eq(users.id, user.id))

    return input.newEmail
  })

// NOT WORK
const test = updateUser({
  userId: 1, // Object literal may only specify known properties, and 'userId' does not exist in type 'FormData | URLSearchParams'
  formData: new FormData(),
})

To fix the error, it is necessary to add a layer with an object (which will deprive the ability to throw primitive data types number, string, ...):
import { createServerActionProcedure } from "zsa";
import { zu } from "zod_utilz";
import { z } from "zod";

const authedProcedure = createServerActionProcedure()
  .input(z.object({ userId: z.number() }))
  .handler(async ({ input }) => {
    return {
      user: {
        id: input.userId,
      },
    };
  });

export const updateUser = authedProcedure
  .createServerAction()
  .input(
    // NESTED FORM DATA
    z.object({
      formData: zu.useFormData(
        z.object({
          newEmail: z.string().email(),
          avatar: z.instanceof(File),
        })
      ),
    })
  )
  .handler(async ({ input, ctx }) => {
    const { user } = ctx;

    // Update user's email in the database
    await db.update({ id: user.id }).set({
      email: input.formData.newEmail,
      avatar: input.formData.avatar,
    });

    return {
      avatar: input.formData.avatar,
      email: input.formData.newEmail,
    };
  });

// WORK
const test = updateUser({
  userId: 1,
  formData: new FormData(),
});

Wouldn't it be easier to make a separate ctx or pass in an array [...ctx, inputData]?
const test = updateUser([1 or { userId: 1 }, formData]);

Addition
I've read the documentation and I know that useServerActionQuery has an input, but I see that useServerActionMutation doesn't. All of the above applies specifically to mutations.

Hi, the reason this doesn't work is because ZSA only merges the input in the procedure chain for zod objects. Is there a reason you need to have a union with object and number? Curious what is preventing it from just being an object. In general I would suggest to keep everything in objects for mergability.

Hi, the reason this doesn't work is because ZSA only merges the input in the procedure chain for zod objects. Is there a reason you need to have a union with object and number? Curious what is preventing it from just being an object. In general I would suggest to keep everything in objects for mergability.

There are cases when primitive data types are accepted and I don’t really see the point in creating a wrapper in the form of an object for the sake of passing 1 primitive (number, string, etc.). This is just a way of passing data into the server action when nested.
And yet I agree that all this can be done through objects.

I understand that point. Initially there was the ability to intersect primitives but I removed it due to the inefficient types it caused. Keeping merge across objects only made things much simpler and faster.

Ok, please provide the package version where possible. I'll try, if nothing works and it's bad, I'll just close the issue


[BUG] Influx server config not accepting DNS hostnames

When using a dns or container name for the influx url like: unfluxdb, I get the error that it's not correct and needs to be a hostname or ip. When reverting to docker image with tag v1.1 it works like normal.

We applied regex style parameters to urls to ensure integrity before creating a session with the host. Hostnames alone will not match this regex as its not an fqdn or IP. If you define an IP you must define a port, if you define a url you MAY define a port. These were both intentional and allow for sane logic in debugging.
As a side note, i worked in networking support for a long time. When you query within the same layer2 domain, you should always use an IP:PORT over dns whether hostname or fqdn. This removes any issues with dns that cause cascading application failures unnecessarily. when crossing layer3 you should use either an IP:PORT or FQDN. There is never a circumstance where you should rely on hostnames alone. even with dns-search/append applied to your nic

So when using Docker I should config the url as: influxdb:8023 for example. And should I ignore the port setting or fill that with the same port?

No, IP address or domain name. That is a hostname. And influxdb port is an argument not a url so it is defined as it’s own var

You really should reconsider this then. Things like Docker are build to be dynamic. Using container names (hostnames) in configuration is one of the things that makes Docker dynamic. So you are not stuck to static config. With this requirement (IP or domain name) you need to forward ports of the container to your host (to use a domain name) or set a static IP in your Docker environment for that container (to use an IP).
A container does not have a domain name. Using the name of the container in configuration makes your environment dynamic and easy to manage and troubleshoot.
Don't get me wrong, I like Varken. But I just don't get this IP/domain name requirement.

Made the change to be able to specify just a hostname.


Make port configurable for web ui

@rgardler,
Thanks for your contribution as a Microsoft full-time employee or intern. You do not need to sign a CLA.
Thanks,
Microsoft Pull Request Bot


Use-after-free if Styles are dropped after being assigned

Turns out that when adding a style to a widget, LVGL doesn't actually store that style internally anywhere; instead, it just stores a pointer to it. Thus, dropping a Style after it's been added to an object can cause undefined behaviour and we have no way of detecting it.
My first idea was to internally hold a static mut ALL_STYLES: Vec<Style> and rather than having Style creation return a Style, rather have it return a &mut Style (giving the option of removing Styles from the global vector unsafely). This is... bad, though, since it would make anyone using us end up having a lot of unsafe code and would also break if alloc is not enabled. Similar issues re: unsafe proliferation would occur if we make add_style() unsafe directly.
My next suggestion might be having every widget struct internally hold a Style, and on assigning a style, simply copy the new Style in-place. However this carries the issue of making assigning multiple Styles impossible. We could maybe find a way to "merge" styles together but I fear this may require carrying a patched version LVGL itself and I don't think we want that headache. Carrying a Vec<Style> internally is better than the idea above but still breaks if we don't have alloc (though I guess we can write our own Vec with the LVGL allocator? That might be our best bet).
Lastly we can try to make this Someone Else's Problem by somehow making the compiler complain when Styles are dropped. The neatest way would be if it were possible to somehow carry multiple PhantomDatas and append to it the lifetimes we care about, thus causing an error if a Style we care about is dropped - thus forcing the consumer of our API to use some kind of collection on their end - but I don't think it's actually possible which is entirely possible since Rust allows lifetime summing. Neat.
I've also considered doing what we do with Objects i.e. storing a raw pointer, but that leads right back to memory leak issues since Styles don't have parents to drop them (though we don't yet implement deletion on objects, but it can be done relatively easily and it might be worth doing on Screen types at least).

@kisvegabor is there any way to merge together two styles to support this?

Normally, (I mean in a common LVGL UI secario) the styles should be created and initialized once at the beginning of the UI code and should never be dropped. At least this is how we do it in C.
There can be cases when the a give group of styles are related e.g. to a screen and you want to free the styles too when your delete the screen. But it might be required only if the RAM is very limited.

Is it safe to drop a style if we can assert that no object is using it?

It's safe, but the user also needs to be aware of that the unused style will be dropped. For example this can happen:

During start up the user initializes style for a popup
The styles are not used yet so they will be freed
When a button is pressed a popup needs to be created with the styles, but the styles are already freed

Basically the same issue can happen if some time elapses between initializing the styles and actually using them.

Sort of. Under my proposal, if I were to do this::
let mut obj = Obj::new();
{
    let style = Style::default();
    obj.add_style(&style);
    // ~~~~~~~^~~~~
    // ERROR: `style` does not live long enough
}

It would be a compile-time error as we're defining style in a smaller scope than the object it's assigned to. Thus, we need to either move it into the same scope as the object (or greater), e.g. by creating some kind of growable collection or declaring it but not initialising it:
let style_uninit; // `style_uninit` lives in this scope, but is uninitialized
let style_vec: Vec::new(); // Assuming we have an allocator and heap access

let mut obj_1 = Obj::new();;
let mut obj_2 = Obj::new();;
{
    style_uninit = Style::default(); // Initialise `style_uninit`
    obj_1.add_style(&style_uninit);
    // No error since we're just initialising the style here and moving the value into the parent scope

    let style_new = Style::default();
    style_vec.add(style_new);
    obj_2.add_style(style_vec.last().unwrap()) // `.last()` only fails if the `Vec` is empty
    // No error; we create `new_style` here, but move it into the parent scope which is also where the object lives
}

Thus the compiler can assert that by the time it's ready to drop the Style aka lv_style_t, it can also drop the Obj aka lv_obj_t. If we were to move the object into some still greater scope (i.e. if the code above was inside of a non-main function body and we moved the object into main()), the compiler would complain and ask us to drag the style along with it. We could also provide methods to intentionally leak a style and/or object (since a style doesn't contain any other references or pointers that Rust tracks, it would have 'static lifetime i.e. lives until the end of the program. Leaking an object would only give it the same lifetime as the shortest-lived Style we've assigned to it, so leaking all the Styles associated to an object and also the object itself means they live forever)

I see now and it sounds good! :+1:


PowerToys Run should use a different default key - alt + space is already used in windows for opening the application menu

Description of the new feature / enhancement
While I realize I can change this, everytime I have a new machine and setup powertoys I have to reconfigure the default since powertoys run overrides the default behaviour of alt-space.
Scenario when this would be used?
New users who want to play with powertoys run but don't want to lose the functionality of alt-space
Supporting information
No response

https://github.com/microsoft/PowerToys/issues/3381 likely tracks your desired functionality when setting up a new machine.
For completely new users, this is a fair point. alt + space was chosen as a comparable experience to Mac's command + space shortcut. We likely won't change the default without significant telemetry to suggest a change is preferred, but we can probably make it more apparent that it's customizable in the "Welcome to PowerToys" window that opens on first launch.
Thanks for the feedback!

I was contemplating on filing exactly the same issue for a few weeks but put it off.
I see this issue has been closed as "won't fix" now but I think that's a pretty big mistake.
Adding my two cents as there has been no other feedback and the developers seem to have have questioned why this was an issue.
The main reason: software should never cause a direct conflict with a standard Windows OS feature (this by itself should be enough) especially when that feature is assumed to be built into every (almost) application as default functionality.

I don't know how many people rely on the Windows application menu but I assume the number is not insignificant. I use it. My usage is fairly infrequent but I do use it. The number of people that cannot operate a mouse is also not insignificant. I have found myself in rare instances using it for automation tasks (scripting) as well.
People that install PowerToys very likely will not have installed it to use "PowerToys Run" but one of the many other PowerToys features and so will not be aware of this feature. Some subset will be surprised that Alt+Space no longer functions "normally" and some (probably very significant) portion of that subset will have no idea why.
The fact that "PowerToys Run" is enabled by default but does not identify itself in any way makes it non-trivial to understand why it is appearing when it does. It has no window frame, no titlebar, no icon, toolbars, help button, or anything else that identifies it as being part of PowerToys. Someone that doesn't know PowerToys has this feature could assume anything from a Windows update having changed this standard Windows functionality to any of the other applications they may have installed recently. In fact, the last thing they might expect to be conflicting with a standard OS feature would be software sanctioned by Microsoft itself.

@dedavis6797 we are not on Macs when running PowerToys Run. While I too have a long background with macOS, it seems problematic to default to a long established Windows shortcut. Why wasn't Win+Space chosen? The windows key seems like fair game for this sort of customization. That's what I typically override PowerToys Run to use.

@eddieparker Good luck making any headway. A rather poorly done survey early on has been used as an excuse to dismiss any objections to redefining this Windows standard of 30-some years (see Win 2 emulator).  As more people use PowerToys, this will cause more problems.  I also suspect as more PowerToys developers and users commit it to muscle memory, this will be ever harder to change.  The sooner changed, the better!

I just killed powertoys because I needed to send alt-space to a window -like in the old days