Kat Marchán
6422f82174
fix(report): don't color error message text to draw eyes back to it
2021-09-08 18:29:41 -07:00
Kat Marchán
10255304c4
(cargo-release) start next development iteration 2.1.1-alpha.0
2021-09-07 17:51:49 -07:00
Kat Marchán
c049b04289
(cargo-release) version 2.1.0
2021-09-07 17:50:24 -07:00
Kat Marchán
1e0e3f5910
(cargo-release) version 2.1.0
2021-09-07 17:50:23 -07:00
Kat Marchán
9523c04913
docs: update changelog
2021-09-07 17:48:08 -07:00
Kat Marchán
ffe1b558d0
feat(derive): make #[diagnostic] optional for enums, too
2021-09-07 17:45:30 -07:00
Kat Marchán
824cd8bebe
feat(printer): use uparrow for empty highlights and fix 0-offset display bug
2021-09-07 17:41:28 -07:00
Kat Marchán
d5bb6f5eab
(cargo-release) start next development iteration 2.0.1-alpha.0
2021-09-04 21:55:32 -07:00
Kat Marchán
b71b583d27
(cargo-release) start next development iteration 2.0.1-alpha.0
2021-09-04 21:55:32 -07:00
Kat Marchán
52c98da590
(cargo-release) version 2.0.0
2021-09-04 21:54:48 -07:00
Kat Marchán
16bd3d21de
(cargo-release) version 2.0.0
2021-09-04 21:54:47 -07:00
Kat Marchán
b5db701fce
docs: update changelog
2021-09-04 21:49:10 -07:00
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
Sean Olson
0427c9f966
feat(source): Remove bound `T: Clone` from `Source` implementation for `Cow`. ( #42 )
...
This change removes the bound `T: Clone` in the implementation of
`Source` for `Cow<'_, T>`. This expands the implementation of `Source`
to include types like `Cow<'_, str>`. Importantly, `Cow` always requires
the bound `T: ToOwned` and uses `ToOwned` to implement `Clone` rather
than forwarding to `T::clone`.
2021-08-30 18:41:27 -07:00
Cormac Relf
84219f6c80
fix(printer): Show snippet message for unnamed sources ( #39 )
...
Fixes: https://github.com/zkat/miette/issues/38
2021-08-29 19:28:17 -07:00
Cormac Relf
50c7a88360
feat(Source): impl Source for str, &str (make &'static str usable for testing) ( #40 )
2021-08-29 19:07:07 -07:00
Kat Marchán
5d5e33d108
(cargo-release) version 1.1.0
2021-08-29 12:49:33 -07:00
Kat Marchán
6a3a6eb280
(cargo-release) version 1.1.0
2021-08-29 12:49:33 -07:00
Kat Marchán
7d67c7666d
docs: update changelog
2021-08-29 12:47:16 -07:00
Felipe Seré
5a474370dd
fix(reporter): Only inc the line count if we haven't already done so with '\n' or '\r\n' ( #37 )
2021-08-29 12:33:45 -07:00
Cormac Relf
53f5d6d1d6
feat(derive): Add `#[diagnostic(transparent,forward)]` ( #36 )
...
Fixes: https://github.com/zkat/miette/issues/16
2021-08-29 12:33:16 -07:00
Kat Marchán
2009ab238c
meta: new release/make/changelog stuff
2021-08-24 14:29:56 -07:00
Tobias Bieniek
d6eda1e11c
docs: Fix typo in readme ( #33 )
2021-08-23 07:46:06 -07:00
Kat Marchán
96ca3cc85b
1.0.1
2021-08-22 21:53:44 -07:00
Kat Marchán
5f74da671f
fix(crate): reduce crate size by removing images
2021-08-22 21:51:01 -07:00
Kat Marchán
aa755bfb4d
1.0.0
...
🎉
2021-08-22 19:36:59 -07:00
Kat Marchán
a2b6ab4e3e
docs: update changelog
2021-08-22 19:35:28 -07:00
Kat Marchán
a05a6c519a
test: update tests to fit new api stuff
2021-08-22 19:31:03 -07:00
Tyler Bindon
9d6015996b
fix(printer): clamp highlight length to at least 1 ( #32 )
...
Fixes: https://github.com/zkat/miette/issues/31
2021-08-22 19:30:21 -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
2d886c06a3
docs: dogfood url(docsrs)
2021-08-22 15:59:27 -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
3546dcec98
feat(theme): Add an initial `rgb` style with nicer colors
2021-08-22 10:56:10 -07:00
Kat Marchán
eb4ea3423a
docs: add error code aliases
...
miette can't do this yet, but I can still do it by hand!
2021-08-22 00:22:38 -07:00
Kat Marchán
196ef51417
1.0.0-beta.1
2021-08-21 23:32:26 -07:00
Kat Marchán
df617fc43c
docs: update changelog
2021-08-21 23:29:58 -07:00
Kat Marchán
0fecc42f76
fmt: cargo fmt --all
2021-08-21 23:24:45 -07:00
Kat Marchán
949174e598
misc: more aggressive linting for quality~
2021-08-21 23:13:25 -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
c1da4a0d27
feat(into_diagnostic): .into_diagnostic() is now generic across any impl fmt::Display instead of expecting a `dyn`
2021-08-21 22:55:45 -07:00
Kat Marchán
5c077d30a4
fix(protocol): oops, missed a spot after a rename
2021-08-21 22:54:59 -07:00
Kat Marchán
aafa4a3de1
feat(printer): rename default printer and consistify some naming conventions with printing
...
BREAKING CHANGE: This is a significant API break.
2021-08-21 22:52:06 -07:00
Kat Marchán
e980b72373
feat(error): diagnostic-ify MietteError
2021-08-21 22:49:00 -07:00
Kat Marchán
adf0bc933f
fix(derive): #[diagnosic(severity)] works for named and unnamed variants/structs now
...
Fixes: https://github.com/zkat/miette/issues/26
2021-08-21 17:18:12 -07:00
Kat Marchán
729ccd32da
0.13.0
2021-08-21 15:35:40 -07:00
Kat Marchán
213ef9da7e
docs: update changelog
2021-08-21 15:33:35 -07:00
Kat Marchán
fe3abdc64d
docs: add narratable printouts to README
2021-08-21 15:32:50 -07:00
Kat Marchán
5369a9424e
feat(printer): added (and hooked up) an accessible report printer
...
Fixes: https://github.com/zkat/miette/issues/28
2021-08-21 15:32:31 -07:00
Kat Marchán
a65cfc7e05
0.12.0
2021-08-21 00:20:16 -07:00