-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[GSoC] Refactor DiagnosticEngine to use YAML
files
#32239
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
[GSoC] Refactor DiagnosticEngine to use YAML
files
#32239
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks great, definitely heading in the right direction! I have left some comments inline which we need to tackle before merging.
@xedin I renamed the |
85dc806
to
4e29883
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, thank you!
@swift-ci please smoke test |
Co-authored-by: Suyash Srijan <suyashsrijan@outlook.com>
Co-authored-by: Suyash Srijan <suyashsrijan@outlook.com>
@swift-ci please smoke test |
@xedin Tests passed! 🥳 |
This pull request is using undefined behavior. Can we fix this any time soon?
|
@davezarzycki I'll fix it in the upcoming PR if that's okay? |
This seems to have caused other issues. This breaks when building with lld due to multiple definitions of the data types. |
In this PR, I modified the current
DiagnosticEngine
class to be able to parse diagnostic messages fromYAML
files in the future.Summary of changes:
DiagnosticNode
struct
to hold the objects of theYAML
files.YAML
format forDiagnosticNode
CMakeLists.txt
file to handle where theYAML
diagnostic files will be in the toolchain.DiagnosticEngine::diagnosticStringFor
to handle returning the diagnostics messages fromYAML
files and handle fall-backs if the diagnostic message isn't present in the currentYAML
file.Next steps after this PR gets merged:
-locale
compiler frontend flag for choosing the language.-diagnostic-messages-path
compiler frontend flag to provide a path for theYAML
files (to use in testing).cc @xedin