ruff
143e1724 - Do not bail code action resolution when a quick fix is requested (#12462)

Commit
1 year ago
Do not bail code action resolution when a quick fix is requested (#12462) ## 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 the `resolve` call to fill out other fields (such as `command`). AFAICT Helix also tries to resolve the code actions unconditionally (as in, when either `edit` or `command` 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](https://github.com/rust-lang/rust-analyzer/blob/c1c9e10f72ffd2e829d20ff1439ff49c2e121731/crates/rust-analyzer/src/handlers/request.rs#L1257)) that fill out both `command` and `edit` 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
Author
Parents
Loading