www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - [SAOC 2024] Improve D Error Messages - Weekly Update #7



This week, I focused on improving SARIF support and 
documentation, along with exploring options for enhanced error 
reporting visuals in the DMD compiler.



- **Key PRs:**
   1. docs(errors): Added Ddoc comments and README entry 
https://github.com/dlang/dmd/pull/17040)
   2. refactor(errors): Improved SARIF serialization 
https://github.com/dlang/dmd/pull/17042)
   3. enhance(errors): Set dynamic `ruleId` based on 
https://github.com/dlang/dmd/pull/17045)
   4. Learning from- feat(errors): Enabled stateful `ErrorSinks` 
to react to compilation ending 
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)



- Adjusting SARIF serialization (for multiple errors and 
successful executions) while ensuring compatibility with the 
error reporting structure required careful reorganization.



- 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.
Nov 04