[SAOC 2024] Improve D Error Messages - Weekly Update #6
Royal Simpson Pinto
royalpinto007 at gmail.com
Mon Oct 28 04:57:28 UTC 2024
## Summary of Progress (October 21 – October 27)
This week, I focused on enhancing SARIF support by implementing
new features, adjusting formatting, and ensuring schema adherence.
#### What I Worked On:
- **Key PRs:**
1. feat(errors): implement SARIF support as a MessageStyle-
[#17016](https://github.com/dlang/dmd/pull/17016)
2. fix(errors): adhere to SARIF 2.1.0 schema-
[#17020](https://github.com/dlang/dmd/pull/17020)
3. refactor(errors): move SARIF logic to sarif.d-
[#17025](https://github.com/dlang/dmd/pull/17025)
4. fix(errors): skip normal error output when SARIF is enabled-
[#17030](https://github.com/dlang/dmd/pull/17030)
5. feat(errors): integrate warnings and enhance SARIF
formatting- [#17032](https://github.com/dlang/dmd/pull/17032)
- **Multiple Error Handling in SARIF Reporting:**
I worked on enabling SARIF to handle multiple error messages
within a single report. This involved modifying three files to
accumulate errors in `sarif.d` using a global array that captured
messages from `errors.d`. After compilation, `mars.d` called a
function in `sarif.d` to generate the final report. While the
integrated setup didn’t work as expected, a standalone version
([sarifmultiple](https://github.com/royalpinto007/d-drafts/blob/main/sarif_accumulator.d)) was successful, indicating some more adjustments are still needed in integration.
#### Challenges:
- **SARIF Report Hook Placement:**
I’m considering where best to place the final report call. Should
this function be called at the end of `createModules` in
`mars.d`, or is there a more optimal location?
#### Next Steps:
- I’ll work on ensuring consistent error accumulation across the
compiler and adding SARIF support for successful executions.
More information about the Digitalmars-d
mailing list