Do not bail code action resolution when a quick fix is requested #12462
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
When working on improving Ruff integration with Zed I noticed that it errors out when we try to resolve a code action of a
QUICKFIX
kind; apparently, per @dhruvmanila we shouldn't need to resolve it, as the edit is provided in the initial response for the code action. However, it's possible for theresolve
call to fill out other fields (such ascommand
).AFAICT Helix also tries to resolve the code actions unconditionally (as in, when either
edit
orcommand
is absent); so does VSC. They can still apply the quickfixes though, as they do not error out on a failed call to resolve code actions - Zed does. Following suit on Zed's side does not cut it though, as we still get a log request from Ruff for that failure (which is surfaced in the UI).There are also other language servers (such as rust-analyzer) that fill out both
command
andedit
fields as a part of code action resolution.This PR makes the resolve calls for quickfix actions return the input value.
Test Plan
N/A