Commit Graph

43 Commits

Author SHA1 Message Date
Pig Fang 12279f83a8
docs: remove sentence about `cargo-edit` (#198) 2022-08-21 08:33:51 -07:00
Kat Marchán e286c705fd
fix(docs): readme was getting cut off during generation
Fixes: https://github.com/zkat/miette/issues/174
2022-07-24 10:24:07 -07:00
Kat Marchán 0a4cf4ad24
fix(tests): add Display impl to diagnostic_source example 2022-05-05 12:44:49 -07:00
Kat Marchán a03bfe2e1b
docs: document new diagnostic_source feature 2022-05-05 08:56:27 -07:00
Kat Marchán 45093c2f58
feat(help): update macro to allow optional help text (#152)
Fixes: https://github.com/zkat/miette/issues/148
2022-04-17 18:19:28 -07:00
Dylan Anthony 126ffc5834
docs(readme): Fix a couple links (#141) 2022-03-27 15:07:28 -07:00
Moritz Mœller 5d23c0d61d
fix(docs): Docs overhaul (#124)
* Fixed/formatted all intradoc links. Various other small doc fixes/typography/etc.

* Clarified semantic similarity with anyhow/eyre types/macros.

* Removed unused MietteError::SetPrinterFailure.

* README now generaed from lib.rs via `cargo readme`.

* More doc fixes, made ErrorHook type public.

* Indentation (docs).
2022-02-25 08:39:18 -08:00
Paul Colomiets 9d50daf351 docs: Add an example of delayed source code 2022-02-19 16:58:48 -08:00
Kirill Vasiltsov 1f70140c2e
feat(tabs): Add replace tabs with spaces option (#82)
Fixes: https://github.com/zkat/miette/issues/73
2021-10-05 21:05:57 -07:00
Coenen Benjamin ebdee4f455
docs: fix set_reporter to set_hook (#79)
* docs: fix set_reporter to set_hook

Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>

* docs: rename MietteHandlerOptions to MietteHandlerOpts

Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
2021-10-01 12:08:28 -07:00
Kat Marchán 50e82199e6
docs: oops wrong name 2021-09-26 13:11:45 -07:00
Kat Marchán bb25edf019
docs: fix doctests 2021-09-26 13:00:39 -07:00
Kat Marchán c337e2759f
docs: add docs for #[related] 2021-09-26 12:55:30 -07:00
Kat Marchán 47e4d4d05c
docs: add docs for handler options 2021-09-26 12:45:18 -07:00
Kat Marchán f92c75f176
docs: update readme with info about fancy feature 2021-09-22 16:36:41 -07:00
Kat Marchán 468843aa5c docs: update readme a bit more 2021-09-22 16:34:21 -07:00
Kat Marchán 2bbac6c2a7 docs: update readme with latest screenshots 2021-09-22 16:34:21 -07:00
Kat Marchán b10693a91c tests: fix doctests and such 2021-09-22 16:34:21 -07:00
Kat Marchán 247e8f8b39 feat(deps): move fancy reporter (and its deps) to a feature
BREAKING CHANGE: The default fancy reporter is no longer available unless you enable the "fancy" feature. This also means you will not be pulling in a bunch of deps if you are using miette for a library

Fixes: https://github.com/zkat/miette/issues/25
2021-09-22 16:34:21 -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
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