Iām excited to announce the release of grace 0.3.0, an OCaml library for building, reporting and rendering beautiful compiler diagnostics
. Now available on opam-repository.
This release includes:
-
Windows support: Grace now works on Windows, a long-awaited feature since its 0.1.0 release! 
-
TTY auto-detection: Grace_ansi_renderercan now automatically configure itself based on whether the output channel is a TTY. New functions:pr_diagnostic,epr_diagnostic, andoutput_diagnostic. -
Line elision: Grace_ansi_renderernow elides unnecessary lines in diagnostics, producing more focused output. -
Zero-width ranges: Grace_ansi_renderercan now handle zero-width ranges within lines, as well as at end-of-line (EOL) and end-of-file (EOF) positions.
Many thanks to @giltho for their contributions to this release! ![]()
CHANGES
- feat(renderer): add breaks in large diagnostics (#63)
- feat(renderer): check for tty when rendering (#60)
- fix(renderer): off-by-one in
lines_of_labels(#65) - fix(renderer): create 0-sized segment on empty label range (#64)
- fix(renderer): renderer multi-line labels when message is empty (#53)
- fix(renderer): fix errors that occur with special zero-width segments (#41)
- fix(renderer): use
Format.pp_infinityinMessage.to_stringfor OCaml >5.2 (#40) - refactor!: removes base/core dependency (#58)
BREAKING CHANGE
- Many base/core interfaces from
Gracehave been replaced with custom ones. Source.readerhas been removed. UseSource.Reader.tinstead.