0.2.0
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:
- Use Reporter (as the old Logger): its API is biased towards free-form explanations.
- 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 andmessage
was renamed toloctext
- The LSP handler is separated out as a new package (not published yet)