Skip to content

Properly notify all language server worktree trust listeners#46613

Merged
SomeoneToIgnore merged 1 commit intomainfrom
kb/all-language-servers
Jan 12, 2026
Merged

Properly notify all language server worktree trust listeners#46613
SomeoneToIgnore merged 1 commit intomainfrom
kb/all-language-servers

Conversation

@SomeoneToIgnore
Copy link
Contributor

Closes #46590

trust_all.mov

use smol::channel::{Receiver, Sender}; do not propagate the value change to all receivers, hence only one language server received the "worktree trusted" message.
The fix uses watch kind of channels instead, and cleans up its state more eager to rely on the sender drop as another form of notification.

Release Notes:

  • Fixed groups of language servers not starting after worktree trust approval

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Jan 12, 2026
@SomeoneToIgnore SomeoneToIgnore enabled auto-merge (squash) January 12, 2026 11:57
@SomeoneToIgnore SomeoneToIgnore merged commit 38fc4ea into main Jan 12, 2026
25 of 26 checks passed
@SomeoneToIgnore SomeoneToIgnore deleted the kb/all-language-servers branch January 12, 2026 12:09
@SomeoneToIgnore
Copy link
Contributor Author

/cherry-pick preview
/cherry-pick stable

github-actions bot pushed a commit that referenced this pull request Jan 12, 2026
Closes #46590


https://github.com/user-attachments/assets/8464a3b6-9258-4d15-9168-56178bf46437

`use smol::channel::{Receiver, Sender};` do not propagate the value
change to all receivers, hence only one language server received the
"worktree trusted" message.
The fix uses `watch` kind of channels instead, and cleans up its state
more eager to rely on the sender drop as another form of notification.

Release Notes:

- Fixed groups of language servers not starting after worktree trust
approval
github-actions bot pushed a commit that referenced this pull request Jan 12, 2026
Closes #46590


https://github.com/user-attachments/assets/8464a3b6-9258-4d15-9168-56178bf46437

`use smol::channel::{Receiver, Sender};` do not propagate the value
change to all receivers, hence only one language server received the
"worktree trusted" message.
The fix uses `watch` kind of channels instead, and cleans up its state
more eager to rely on the sender drop as another form of notification.

Release Notes:

- Fixed groups of language servers not starting after worktree trust
approval
zed-zippy bot added a commit that referenced this pull request Jan 12, 2026
… (cherry-pick to preview) (#46614)

Cherry-pick of #46613 to preview

----
Closes #46590



https://github.com/user-attachments/assets/8464a3b6-9258-4d15-9168-56178bf46437

`use smol::channel::{Receiver, Sender};` do not propagate the value
change to all receivers, hence only one language server received the
"worktree trusted" message.
The fix uses `watch` kind of channels instead, and cleans up its state
more eager to rely on the sender drop as another form of notification.

Release Notes:

- Fixed groups of language servers not starting after worktree trust
approval

Co-authored-by: Kirill Bulatov <kirill@zed.dev>
zed-zippy bot added a commit that referenced this pull request Jan 12, 2026
… (cherry-pick to stable) (#46615)

Cherry-pick of #46613 to stable

----
Closes #46590



https://github.com/user-attachments/assets/8464a3b6-9258-4d15-9168-56178bf46437

`use smol::channel::{Receiver, Sender};` do not propagate the value
change to all receivers, hence only one language server received the
"worktree trusted" message.
The fix uses `watch` kind of channels instead, and cleans up its state
more eager to rely on the sender drop as another form of notification.

Release Notes:

- Fixed groups of language servers not starting after worktree trust
approval

Co-authored-by: Kirill Bulatov <kirill@zed.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Language servers do not start after trusting a project

1 participant