ruff/crates/ruff_server/src/server
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
..
api Do not bail code action resolution when a quick fix is requested (#12462) 2024-07-23 10:30:03 +05:30
schedule `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
api.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
client.rs `ruff server` no longer hangs after shutdown (#11222) 2024-05-03 01:09:42 +00:00
connection.rs `ruff server` no longer hangs after shutdown (#11222) 2024-05-03 01:09:42 +00:00
schedule.rs `ruff server` no longer hangs after shutdown (#11222) 2024-05-03 01:09:42 +00:00