[SAOC 2024] Improve D Error Messages - Weekly Update #7
Royal Simpson Pinto
royalpinto007 at gmail.com
Mon Nov 4 11:05:01 UTC 2024
## Summary of Progress (October 28 – November 03)
This week, I focused on improving SARIF support and
documentation, along with exploring options for enhanced error
reporting visuals in the DMD compiler.
### What I Worked On:
- **Key PRs:**
1. docs(errors): Added Ddoc comments and README entry
[#17040](https://github.com/dlang/dmd/pull/17040)
2. refactor(errors): Improved SARIF serialization
[#17042](https://github.com/dlang/dmd/pull/17042)
3. enhance(errors): Set dynamic `ruleId` based on
`ErrorKind`[#17045](https://github.com/dlang/dmd/pull/17045)
4. Learning from- feat(errors): Enabled stateful `ErrorSinks`
to react to compilation ending
[#17051](https://github.com/dlang/dmd/pull/17051)
- **Exploring Enhanced Error Reporting with Visual Indicators:**
I began investigating options for integrating more detailed
visual indicators like squiggles and carets in error reporting.
Specifically, I reviewed how GCC and Rust compilers implement
these features to make error messages more intuitive.
- **File:**
[utilities.d](https://github.com/royalpinto007/d-drafts/blob/main/utilities.d)
- **Documentation:**
[utilities.md](https://github.com/royalpinto007/d-drafts/blob/main/utilities.md)
### Challenges:
- Adjusting SARIF serialization (for multiple errors and
successful executions) while ensuring compatibility with the
error reporting structure required careful reorganization.
### Next Steps:
- I’ll further explore integrating squiggles and caret markers
for error messages, drawing inspiration from GCC and Rust's
implementations.
- I’ll keep refining SARIF serialization and error message
structuring, as well as exploring additional utilities for
enhanced error details.
More information about the Digitalmars-d
mailing list