Skip to content

0.2.0

Compare
Choose a tag to compare
@favonia favonia released this 23 Oct 15:28
· 64 commits to main since this release
0.2.0
2283755

This is a major release with many backward incompatible changes.

The most significant change is the introduction of StructuredReporter. The library can thus be used in two different modes:

  1. Use Reporter (as the old Logger): its API is biased towards free-form explanations.
  2. Use StructuredReporter: its API is biased towards fully structured messages.

Both modes share the same type of diagnostics, and thus, an application using structured messages can adopt a library using free-form explanations and vice versa. Great care has been taken to make sure the two modes can work together. The current tutorial focuses on Reporter and free-form explanations because we think that mode is slightly easier to set up.

The second most significant change is that the TTY handler got an overhaul. The output is now more concise, informational, and beautiful.

Thanks to @mikeshulman for many valuable suggestions.

BREAKING CHANGES

  • Span is renamed to Range
  • Logger is renamed to Reporter and Reporter.Code is renamed to Reporter.Message
  • Range: the type position was changed to allow string (in-memory) sources
  • Diagnostic: the type diagnostic was changed and message was renamed to loctext
  • The LSP handler is separated out as a new package (not published yet)

Bug Fixes

Features