Summary of Progress (October 14 – October 20)
This week, I focused on addressing feedback and adding tests for SARIF (Static Analysis Results Interchange Format) support in the DMD compiler. The current PR introduces a --sarif
compiler flag to generate structured SARIF output for error messages.
PR: feat(errors): add SARIF report generation #16986
What I Worked On:
-
Adding Tests and Addressing Feedback
I spent time this week addressing the feedback provided on my PR, particularly refining the SARIF implementation. I added a test case to validate the output and ensure the correctness of SARIF reports. -
Handling Regex Matching for Variable Outputs
I encountered issues with matching variable outputs in test pipelines versus local outputs. After multiple attempts to resolve these through regexes, I decided to implement a simpler version of the SARIF report, excluding certain complexities such as relative paths, to avoid complications. -
Milestone 1 Report Preparation
I also dedicated time to finalizing and submitting my Milestone 1 report, which summarizes the progress from September 15 to October 14, 2024. -
Exploring Milestone 2 Tasks
I began exploring the objectives of Milestone 2, which involve enhancing error message utilities such as adding more detailed squiggles and error codes. I reviewed the existing utilities and documentation to understand how error codes and squiggles are currently implemented in the DMD compiler.
Challenges:
-
PR Merge
I had hoped my PR would be merged this week, which would allow me to start working on additional updates like usingMessageStyle
for SARIF output instead of a compiler flag. However, the merge is still pending, which is currently blocking me from making further progress on SARIF-related updates. Although the PR has been approved by one maintainer, it still needs to be merged. -
Resolving Regex Issues
The most significant challenge was handling regexes to match variable outputs between local tests and CI pipelines. Ultimately, I simplified the SARIF version to avoid complexities related to relative paths and other variable outputs.
Next Steps:
-
MessageStyle Implementation
Once the current PR is merged, I plan to work on implementing SARIF usingMessageStyle
, which will be done in a separate PR. -
Further Exploration of Milestone 2
I will continue researching the error message utilities and explore how to integrate more detailed squiggles and error codes into the compiler. Any links to existing Bugzilla issues (specifically related to this) or resources would be really helpful.