Skip to content

[Diagnostics] Use the swift-syntax formatting for invalid source locations, too #80874

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

DougGregor
Copy link
Member

The diagnostics formatter from swift-syntax previously only handled
fully-formed diagnostics anchored at a particular syntax node.
Therefore, the compiler would fall back to the existing LLVM-based
diagnostic formatter for diagnostics that had no source location.

Adopt new API in the swift-syntax diagnostics formatter that renders a
diagnostic message without requiring source location information, so
that we consistently use the swift-syntax formatter when it is
selected (which is the default).

@DougGregor
Copy link
Member Author

swiftlang/swift-syntax#3059

@swift-ci please smoke test

@DougGregor
Copy link
Member Author

Well, that ended poorly.

@DougGregor
Copy link
Member Author

I need to get rid of the unrelated changes first, and will come back with the second commit later.

…tions, too

The diagnostics formatter from swift-syntax previously only handled
fully-formed diagnostics anchored at a particular syntax node.
Therefore, the compiler would fall back to the existing LLVM-based
diagnostic formatter for diagnostics that had no source location.

Adopt new API in the swift-syntax diagnostics formatter that renders a
diagnostic message without requiring source location information, so
that we consistently use the swift-syntax formatter when it is
selected (which is the default).
@DougGregor DougGregor force-pushed the new-diagnostics-formatter-without-sourceloc branch from 82d8849 to 235242e Compare April 18, 2025 22:37
@DougGregor
Copy link
Member Author

@swift-ci please smoke test

@DougGregor DougGregor enabled auto-merge April 18, 2025 22:37
@DougGregor DougGregor merged commit 5bd782e into swiftlang:main Apr 19, 2025
3 checks passed
@DougGregor DougGregor deleted the new-diagnostics-formatter-without-sourceloc branch April 19, 2025 17:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants