Skip to content

Conversation

@SomeoneToIgnore
Copy link
Contributor

Re-applies what's been reverted in #26832 with an action-related fix in 64b5d37

Before, actions were resolved only if data is present and either of the possible fields is empty:

&& lsp_action.data.is_some()
&& (lsp_action.command.is_none() || lsp_action.edit.is_none())

But Zed resolves completions and inlays once, unconditionally, and the reverted PR applied the same strategy to actions.
That did not work despite the spec not forbidding data-less actions to be resolved.

Soon, it starts to work due to rust-lang/rust-analyzer#19369 but it seems safer to restore the original filtering code.

Code lens have no issues with data-less resolves:
https://github.com/rust-lang/rust-analyzer/blob/220d913cbcd05f9b7635179a98c685f31821a572/crates/rust-analyzer/src/handlers/request.rs#L1618-L1620

so the same approach as completions and inlays is kept: resolve once.

Release Notes:

  • N/A

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Mar 15, 2025
@SomeoneToIgnore SomeoneToIgnore enabled auto-merge (squash) March 15, 2025 19:57
@SomeoneToIgnore SomeoneToIgnore merged commit 8a31dca into main Mar 15, 2025
15 checks passed
@SomeoneToIgnore SomeoneToIgnore deleted the kb/resolve-actions-once-2 branch March 15, 2025 20:09
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.

2 participants