Skip to content

Conversation

DougGregor
Copy link
Member

  • Explanation: 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). This provides more consistency among emitted diagnostics.
  • Scope: Only affects printing of diagnostics at <unknown>:0:.
  • Original PRs: [Diagnostics] Use the swift-syntax formatting for invalid source locations, too #80874
  • Risk: Very low; it's the diagnostic printer.
  • Testing: CI.

…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).

(cherry picked from commit 235242e)
@DougGregor DougGregor requested a review from a team as a code owner April 22, 2025 14:02
@DougGregor
Copy link
Member Author

swiftlang/swift-syntax#3063

@swift-ci please test

@DougGregor
Copy link
Member Author

@swift-ci please test platform Windows

1 similar comment
@DougGregor
Copy link
Member Author

@swift-ci please test platform Windows

@DougGregor
Copy link
Member Author

@swift-ci please test Windows

@DougGregor DougGregor merged commit 172229e into swiftlang:release/6.2 Apr 23, 2025
5 checks passed
@DougGregor DougGregor deleted the new-diagnostics-formatter-without-sourceloc-6.2 branch April 23, 2025 03:39
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