ruff/crates
Dhruv Manilawala aa429b413f
Check diagnostic refresh support from client capability (#15014)
## Summary

Per the LSP spec, the property name is `workspace.diagnostics` with an
`s` at the end but the `lsp-types` dependency uses
`workspace.diagnostic` (without an `s`). Our fork contains this fix
(0f58d62879)
so we should avoid the hardcoded value.

The implication of this is that the client which doesn't support
workspace refresh capability didn't support the [dynamic
configuration](https://docs.astral.sh/ruff/editors/features/#dynamic-configuration)
feature because the server would _always_ send the workspace refresh
request but the client would ignore it. We have a fallback logic to
publish the diagnostics instead:


5f6fc3988b/crates/ruff_server/src/server/api/notifications/did_change_watched_files.rs (L28-L40)

fixes: #15013 

## Test Plan

### VS Code


https://github.com/user-attachments/assets/61ac8e6f-aa20-41cc-b398-998e1866b5bc

### Neovim



https://github.com/user-attachments/assets/4131e13c-3fba-411c-9bb7-478d26eb8d56
2024-12-16 16:26:40 +05:30
..
red_knot Rename custom-typeshed-dir, target-version and current-directory CLI options (#14930) 2024-12-13 08:21:52 +00:00
red_knot_python_semantic [red-knot] Emit an error if a bare Annotated or Literal is used in a type expression (#14973) 2024-12-15 02:00:52 +00:00
red_knot_server [red-knot] Typed diagnostic id (#14869) 2024-12-10 15:58:07 +00:00
red_knot_test [red-knot] Error out when an mdtest code block is unterminated (#14965) 2024-12-13 21:51:21 -08:00
red_knot_vendored Sync vendored typeshed stubs (#14977) 2024-12-15 01:02:41 +00:00
red_knot_wasm Rename custom-typeshed-dir, target-version and current-directory CLI options (#14930) 2024-12-13 08:21:52 +00:00
red_knot_workspace Add tracing support to mdtest (#14935) 2024-12-13 09:10:01 +00:00
ruff Bump version to 0.8.3 (#14937) 2024-12-12 14:13:06 +00:00
ruff_benchmark Rename custom-typeshed-dir, target-version and current-directory CLI options (#14930) 2024-12-13 08:21:52 +00:00
ruff_cache Fix cache key collisions for paths with separators (#12159) 2024-07-03 07:36:46 -05:00
ruff_db Add tracing support to mdtest (#14935) 2024-12-13 09:10:01 +00:00
ruff_dev Alternate quotes for strings inside f-strings in preview (#13860) 2024-10-23 07:57:53 +02:00
ruff_diagnostics Upgrade Rust toolchain to 1.83 (#14677) 2024-11-29 12:05:05 +00:00
ruff_formatter More typos found by codespell (#14880) 2024-12-09 22:47:34 +00:00
ruff_graph Rename custom-typeshed-dir, target-version and current-directory CLI options (#14930) 2024-12-13 08:21:52 +00:00
ruff_index [red-knot] small efficiency improvements and bugfixes to use-def map building (#12373) 2024-07-18 09:24:58 -07:00
ruff_linter [perflint] Fix panic in perf401 (#14971) 2024-12-15 16:22:04 +01:00
ruff_macros [red-knot] Add infrastructure to declare lints (#14873) 2024-12-10 16:14:44 +00:00
ruff_notebook Bump MSRV to Rust 1.80 (#13826) 2024-10-20 10:55:36 +02:00
ruff_python_ast [ruff_python_ast] Add name and default functions to TypeParam. (#14964) 2024-12-15 12:04:51 +00:00
ruff_python_ast_integration_tests Update insta snapshots (#14366) 2024-11-15 19:31:15 +01:00
ruff_python_codegen ruff_python_ast: Make Singleton Copy (#14943) 2024-12-12 20:49:54 +01:00
ruff_python_formatter Add tests demonstrating f-strings with debug expressions in replacements that contain escaped characters (#14929) 2024-12-12 09:33:20 +00:00
ruff_python_index Extract LineIndex independent methods from Locator (#13938) 2024-10-28 07:53:41 +00:00
ruff_python_literal Upgrade Rust toolchain to 1.83 (#14677) 2024-11-29 12:05:05 +00:00
ruff_python_parser Raise syntax error for mixing except and except* (#14895) 2024-12-10 17:50:55 -06:00
ruff_python_resolver Update insta snapshots (#14366) 2024-11-15 19:31:15 +01:00
ruff_python_semantic [ruff] Do not simplify round() calls (RUF046) (#14832) 2024-12-09 16:51:27 +01:00
ruff_python_stdlib [ruff] Implemented used-dummy-variable (RUF052) (#14611) 2024-12-03 08:36:16 +01:00
ruff_python_trivia Extract LineIndex independent methods from Locator (#13938) 2024-10-28 07:53:41 +00:00
ruff_python_trivia_integration_tests Update insta snapshots (#14366) 2024-11-15 19:31:15 +01:00
ruff_server Check diagnostic refresh support from client capability (#15014) 2024-12-16 16:26:40 +05:30
ruff_source_file [pyupgrade] Do not report when a UTF-8 comment is followed by a non-UTF-8 one (UP009) (#14728) 2024-12-11 10:30:41 +00:00
ruff_text_size Extract LineIndex independent methods from Locator (#13938) 2024-10-28 07:53:41 +00:00
ruff_wasm Bump version to 0.8.3 (#14937) 2024-12-12 14:13:06 +00:00
ruff_workspace [flake8-import-conventions] Improve syntax check for aliases supplied in configuration for unconventional-import-alias (ICN001) (#14745) 2024-12-02 22:41:47 -06:00