Skip to content

[NFC] [DiagnosticEngine] Improve output for malformed diagnostic messages #28177

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

Merged

Conversation

beccadax
Copy link
Contributor

@beccadax beccadax commented Nov 9, 2019

This change modifies the DiagnosticEngine so that, if we discover a mis-formatted diagnostic, we insert a hard-to-miss string into the message and continue. The idea here is to (a) make the location in the string and nature of the bug more obvious, and (b) make sure users clearly perceive the diagnostics as erroneous rather than misunderstanding them when information is missing.

This change is NFC as long as you assume there are no bad diagnostics. We don't currently test the compiler's behavior for malformed diagnostics; I suppose we could.

…ages

This is NFC as long as you assume there are no bad diagnostics.
@beccadax
Copy link
Contributor Author

beccadax commented Nov 9, 2019

@swift-ci please smoke test

@beccadax beccadax requested review from slavapestov and CodaFi and removed request for slavapestov November 9, 2019 03:56
@beccadax beccadax merged commit 37d3ce7 into swiftlang:master Nov 9, 2019
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