Commit Graph

24 Commits

Author SHA1 Message Date
Kat Marchán 3f9da04b86
feat(report): anyhow-ify DiagnosticReport (#35)
This PR overhauls the toplevel/main experience for `miette`. It adds a new `Report` type based on `eyre::Report` and overhauls various types to fit into this model, as well as prepare for some [future changes in Rust](https://github.com/nrc/rfcs/pull/1) that will make it possible to integrate `miette` directly with crates like `eyre` instead of having to use this specific `Report`.

As such, this PR is a major breaking change, especially for anyone using `DiagnosticReport` and company.

BREAKING CHANGES:
* `DiagnosticReport` is now just `Report`, and is a different, `eyre::Report`-like type.
* `DiagnosticResult` is now just `Result`.
* `.into_diagnostic()` now just transforms the error into a `Report`.
* `DiagnosticReportPrinter` has been replaced with `ReportHandler`
* `set_printer` has been replaced by `set_hook`
* `code` is now optional.
* `.into_diagnostic()` no longer takes a `code` argument.
* `#[diagnostic]` is now optional when deriving `Diagnostic`.
2021-09-04 21:22:46 -07:00
Tobias Bieniek d6eda1e11c
docs: Fix typo in readme (#33) 2021-08-23 07:46:06 -07:00
Kat Marchán 61283e9efe
feat(snippets): Overhauled how snippets handle labels, sources, and messages, including the derive macro
BREAKING CHANGE: this will probably break a lot of your stuff. hopefully rustc helps
2021-08-22 19:06:47 -07:00
Kat Marchán 7e76e2dea4
feat(links): added URL linking support and automatic docs.rs link generation
Fixes: https://github.com/zkat/miette/issues/17
2021-08-22 15:42:08 -07:00
Kat Marchán ffee3753f0
docs: add acknowledgements section
Fixes: https://github.com/zkat/miette/issues/24
2021-08-21 23:08:11 -07:00
Kat Marchán 20bb3db3fa
docs: overhaul readme and make sure everything is documented
Fixes: https://github.com/zkat/miette/issues/15
2021-08-21 22:57:16 -07:00
Kat Marchán fe3abdc64d
docs: add narratable printouts to README 2021-08-21 15:32:50 -07:00
Kat Marchán 5fd2765bf0
docs: update readme with new stuff 2021-08-21 00:11:40 -07:00
Kat Marchán d675334e48
feat(reporter): fancy new reporter with unicode, colors, and multiline (#23)
Fixes: https://github.com/zkat/miette/issues/3
Fixes: https://github.com/zkat/miette/issues/5
2021-08-20 20:09:23 -07:00
Kat Marchán 8fbad1b1cd
feat(derive): format string support for help()
Fixes: https://github.com/zkat/miette/issues/7
2021-08-18 19:59:50 -07:00
Kat Marchán 29c1403efd
feat(reporter): Overhauled return type/main/DiagnosticReport experience.
Fixes: https://github.com/zkat/miette/issues/13
2021-08-17 23:41:03 -07:00
Kat Marchán f390520b45
feat(protocol): reference-based DiagnosticReport! 2021-08-17 15:30:52 -07:00
Kat Marchán b7deb2d002
docs: update readme oops 2021-08-17 09:05:53 -07:00
Kat Marchán acfeb9c5b0
feat(protocol): new SourceSpans with labels 2021-08-17 08:41:20 -07:00
Kat Marchán 36b86df9f5
feat(protocol): implement From<(usize, usize)> for SourceSpan 2021-08-16 23:46:32 -07:00
Kat Marchán 698bb0eff5
docs: update readme 2021-08-16 22:41:40 -07:00
Kat Marchán d201dde4b5
fix(reporter): fix reporter and tests... again 2021-08-10 22:47:28 -04:00
Kat Marchán 60bdf47e29
fix(tests): updating tests 2021-08-07 23:04:04 -04:00
Kat Marchán e955321cbd
fix(protocol): protocol improvements after getting feedback 2021-08-05 09:12:41 -07:00
Kat Marchán 9ba2389f48
docs: better pun imo 2021-08-04 23:17:18 -07:00
Kat Marchán e1ef944689
docs: rewrite readme 2021-08-04 21:19:20 -07:00
Kat Marchán 6b51694733
feat(protocol) overhauled entire protocol to be based on byte offsets (#1)
Includes other improvements!

BREAKING CHANGE: Yeah this is pretty much a rewrite.
2021-08-04 20:27:12 -07:00
Kat Marchán 3b3a07bcb5
docs: add thisdiagnostic example 2021-08-03 12:57:20 -07:00
Kat Marchán 457849721f
initial commit 2021-08-02 19:36:02 -07:00