ruff/crates/ruff_server/src
Piotr Osiewicz 143e172431
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](c1c9e10f72/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
2024-07-23 10:30:03 +05:30
..
edit Consider the content of the new cells during notebook sync (#12203) 2024-07-05 17:10:00 +05:30
server Do not bail code action resolution when a quick fix is requested (#12462) 2024-07-23 10:30:03 +05:30
session Consider --preview flag for server subcommand (#12208) 2024-07-18 11:05:01 +05:30
edit.rs Add Jupyter Notebook document change snapshot test (#11944) 2024-06-21 05:29:27 +00:00
fix.rs Conside include, extend-include for the native server (#12252) 2024-07-10 04:12:57 +00:00
format.rs ruff server: Formatting a document with syntax problems no longer spams a visible error popup (#11745) 2024-06-04 17:18:21 -07:00
lib.rs Conside include, extend-include for the native server (#12252) 2024-07-10 04:12:57 +00:00
lint.rs Conside include, extend-include for the native server (#12252) 2024-07-10 04:12:57 +00:00
message.rs ruff server: Tracing system now respects log level and trace level, with options to log to a file (#11747) 2024-06-11 11:29:47 -07:00
resolve.rs Conside include, extend-include for the native server (#12252) 2024-07-10 04:12:57 +00:00
server.rs Consider --preview flag for server subcommand (#12208) 2024-07-18 11:05:01 +05:30
session.rs Add Jupyter Notebook document change snapshot test (#11944) 2024-06-21 05:29:27 +00:00
trace.rs ruff server: Support the usage of tildes and environment variables in logFile (#11945) 2024-06-20 18:51:46 +00:00