ruff/crates/ruff_server/src
Brent Westbrook 981bd70d39
Convert Message::SyntaxError to use Diagnostic internally (#17784)
## Summary

This PR is a first step toward integration of the new `Diagnostic` type
into ruff. There are two main changes:
- A new `UnifiedFile` enum wrapping `File` for red-knot and a
`SourceFile` for ruff
- ruff's `Message::SyntaxError` variant is now a `Diagnostic` instead of
a `SyntaxErrorMessage`

The second of these changes was mostly just a proof of concept for the
first, and it went pretty smoothly. Converting `DiagnosticMessage`s will
be most of the work in replacing `Message` entirely.

## Test Plan

Existing tests, which show no changes.

---------

Co-authored-by: Carl Meyer <carl@astral.sh>
Co-authored-by: Micha Reiser <micha@reiser.io>
2025-05-08 12:45:51 -04:00
..
edit Use #[expect(lint)] over #[allow(lint)] where possible (#17822) 2025-05-03 21:20:31 +02:00
server Use #[expect(lint)] over #[allow(lint)] where possible (#17822) 2025-05-03 21:20:31 +02:00
session Use #[expect(lint)] over #[allow(lint)] where possible (#17822) 2025-05-03 21:20:31 +02:00
edit.rs Split SourceLocation into LineColumn and SourceLocation (#17587) 2025-04-27 11:27:33 +01:00
fix.rs Server: Allow FixAll action in presence of version-specific syntax errors (#16848) 2025-03-20 05:09:14 -05:00
format.rs Add per-file-target-version option (#16257) 2025-02-24 08:47:13 -05:00
lib.rs Refactor workspace logic into workspace.rs (#16295) 2025-02-21 08:37:29 +00:00
lint.rs Convert Message::SyntaxError to use Diagnostic internally (#17784) 2025-05-08 12:45:51 -04:00
logging.rs Use #[expect(lint)] over #[allow(lint)] where possible (#17822) 2025-05-03 21:20:31 +02:00
message.rs Fix LSP show message macro to allow format args (#15487) 2025-01-15 08:11:49 +00:00
resolve.rs Root exclusions in the server to project root (#16043) 2025-02-10 04:57:14 +00:00
server.rs Use #[expect(lint)] over #[allow(lint)] where possible (#17822) 2025-05-03 21:20:31 +02:00
session.rs Refactor workspace logic into workspace.rs (#16295) 2025-02-21 08:37:29 +00:00
workspace.rs Refactor workspace logic into workspace.rs (#16295) 2025-02-21 08:37:29 +00:00