- graphical: Inherit source code to causes (#401) (465e6b6a)
- report: Implement
WrapError
forOption
(#409) (7fae60fd)
- SourceSpan: add impl From (#385) (73da45b6)
- Report: add
from_err()
method toReport
(#403) (93d3bd11) - Diagnostic: Implement
Diagnostic
forInfallible
(#402) (f3fb4c1e)
- handlers: optimize string-buffer reallocations (#387) (b8dfcda4)
- graphical: fix nested error wrapping (#358) (3eabbceb)
- docs: updated example image (fixes #111) (#270) (7b42b12c)
- clippy: Fix clippy lints in docs (#365) (ea4296da)
- docs:
alt
attribut forsingle-line-example.png
(#372) (b82cc81b) - color: setting NO_COLOR should not print ansi codes for non-terminals (#381) (813232ba)
- clippy: fix Rust v1.78.0 clippy warnings (#382) (e1026f75)
- perf: mark error constructors cold (#378) (9bbcf3c6)
- handlers: Disable textwrap::smawk feature (#379) (edfdcb52)
- graphical: Format entire link instead of just name (#389) (bf5aa374)
- clippy: fix
clippy::doc_lazy_continuation
lints (#395) (15beec43) - graphical: Handle invalid UTF-8 in source code (#393) (d6b45585)
- features: Use
dep:
syntax for dependencies in features. (#394) (789a04e3) - clippy: Fix
needless_return
lint. (#405) (5f441d01)
- examples: add serde_json integration example (#407) (2902a233)
- wasm: add feature "fancy-no-syscall" for wasm targets (#349) (328bf379)
- label-collections: Label collection fixes and cleanup (#343) (75fea093)
- invalid span: skip the snippet when read_span fails (#347) (7d9dfc6e)
- redundant-import: fix a warning and CI failure in nightly (#348) (6ea86a22)
- derive: enable more boxed types to be #[diagnostic_source] (#338) (c2f06f6c)
- source: derive common traits for NamedSource, SourceSpan, and SourceOffset (#340) (6f09250c)
- collection: add support for collection of labels (#341) (03060245)
- tests: revert test-breaking changes of e5c7ae4 (#339) (6e829f8c)
This is a small breaking release on the heels of 6.0 because I neglected to bump owo-colors. I figured it's a good time to do it, before 6.0 gets more widely used.
- fancy: Add option to change the link display text (#335) (c7144ee5)
- deps: bump dependencies (a4011d17)
- BREAKING CHANGE: This bumps owo-colors to 4.0, which is a breaking change because we expose its styles as part of the graphical renderer API
- graphical: oops. Fix theme issue (8b46679c)
- fmt: remove nightly-only fmt flags (1fa7f524)
- highlighter: ugh, missed another spot (ab7c066e)
The long-awaited 6.0 release of miette
is here, with TONS of goodies, not
least of which is syntax highlighting support!
It also comes with a few breaking changes so make sure to check below and update your code as needed!
- labels: Add support for primary label in specifying line/col information (#291) (db0b7e40)
- derive: Allow optional sources in derive (#301) (88d00e0e)
- derive: Make
miette-derive
be able to be turned off (#304) (c7ba5b7e) - graphical: Expose additional
textwrap
options (#321) (fd77257c) - graphical: support rendering labels that contain newlines (#318) (865d67c8)
- graphical: Add
wrap_lines: bool
option allowing wrapping be disabled entirely (#328) (b0744462) - graphical: render disjoint snippets separately for cleaner output (#324) (19c22143)
- deps: Bump terminal-size to v0.3.0 (#308) (c0a298e5)
- BREAKING CHANGE: This requires an MSRV bump to 1.70.0.
- source-code: Don't override provided source code (#300) (0d5c2ce7)
- BREAKING CHANGE: Source code is no longer overridden if it was provided by the diagnostic's own
source_code()
impl.
- BREAKING CHANGE: Source code is no longer overridden if it was provided by the diagnostic's own
- source: use
usize
for length (#265) (fad0e76a)- BREAKING CHANGE: This changes
SourceSpan
's length type tousize
.
- BREAKING CHANGE: This changes
- source: Allow inner source type of a NamedSource to be borrowed (#254) (1df3b1a5)
- BREAKING CHANGE: This makes the
NamedSource
type generic over itsSource
type, instead of boxing it.
- BREAKING CHANGE: This makes the
- highlighting: add syntax highlighting support with syntect crate (#313) (e65d0a78)
- deps: remove is-terminal dep in favor of
std::io::IsTerminal
(e5c7ae46) - deps: remove once_cell dep in favor of
std::sync::OnceLock
(4c48584f)- BREAKING CHANGE: This requires an MSRV bump to 1.70.0.
- deps: bump some semver-breaking deps to newer versions (29d000f2)
- MSRV: Actually bump the MSRV to 1.70.0 (ab59a7bc)
- misc: Improve ci and fix clippy (#290) (cc81382a)
- tests: Fix
cargo test
with default features. (#294) (1f448e47) - clippy: Add missing semicolons where nothing is returned. (#293) (06b34823)
- graphical: Extend error text span to whole code points (#312) (a8b4ae01)
- formatting: Fix formatting bug when an empty span is not aligned to a char boundary (#314) (3d6f903d)
- docs: add example to README and docs fixing #96 (#319) (251d6d59)
- graphical: rendering bug on small spans in large spans (#316) (7ff4f874)
- graphical: render cause chains for inner errors (#330) (cb2ae2e1)
- handler: remove the two extra
is_terminal
sys call fromMietteHandlerOpts::build
(#325) (f1dc89c0)
- README: Move import of
NamedResult
to where it is used (#309) (d37ada87)
- protocol: add StdError impl for Box<dyn Diagnostic + Send + Sync> (#273) (2e3e5c9d)
- serde: Add
serde
support (#264) (c25676cb) - const: Constify various functions (#263) (46adb3bc)
- nested: Render inner diagnostics (#170) (aefe3237)
- misc: Correct some typos (#255) (675f3411)
- source: Add getter for NamedSource name (#252) (be3b2547)
- narrated: put URLs in their own line (adbff65e)
While this is a semver-minor release, there's potential for it to have knock-on effects due to the syn2 upgrade. There's been issues as this new version propagates between syn/thiserror versions (for example, see a similar change in eyre).
The other thing of note is that backtrace printing is now much better! Try the hook and see for yourself!
- colors: change unicode to default to ansi (#249) (159f2b35)
- tests: disable doctest that doesn't work with default feature flags (#248) (0b445dc2)
- ci: configure clippy-specific MSRV (b658fc02)
- graphical: Fix wrong severity of related errors (#234) (3497508a)
- atty: Switch out
atty
foris-terminal
(#229) (443d240f)
- protocol: implement
Ord
forSeverity
(#240) (ed486c95)
- SourceCode: Implement SourceCode for Vec (#216) (c857595e)
- derive: elide lifetimes in derived functions (#226) (c88f0b5a)
- graphical: Fix panic with span extending past end of line (#221) (8b56d277)
- license: fix mangled license text to improve recognition (d5fbb340)
- graphical: Fix panic with zero-width span at end of line (#204) (b8810ee3)
- version: declare minimum supported rust version at 1.56.0 (#209) (ac02a124)
- report:
Report::new_boxed
(0660d2f4) - error:
impl AsRef<dyn StdError> for Report
(1a27033d)
- wrapper: complete forwarding
Diagnostic
implementations (3fc5c04c)
- miri: Resolve Miri's concerns around unsafe code (#197) (5f3429b0)
- graphical: Align highlights correctly with wide unicode characters and tabs (#202) (196c09ce)
- utils: Fix off-by-one error in SourceOffset::from_location (#190) (c3e6c983)
- graphical: Allow miette users to opt-out of the rendering of the cause chain (#192) (b9ea5871)
- json:
causes
support (#188) (c95f58c8)
- docs: readme was getting cut off during generation (e286c705)
- deps: bump minimum supports-color version (#182) (ccf1b8ad)
- graphical: handle an empty source (#183) (12dc4007)
- protocol: Implement SourceCode for Arc (and similar types) (#181) (85da6a84)
- theme: restructure automatic color selection (#177) (1816b06a)
- The default theme now prefers ANSI colors, even if RGB is supported
MietteHandlerOpts::ansi_colors
is removedMietteHandlerOpts::rgb_color
now takes an enum that controls the color format used when color support is enabled, and has no effect otherwise.
- json: Don't escape single-quotes, that's not valid json (#180) (b193d3c0)
- tests: add Display impl to diagnostic_source example (0a4cf4ad)
- diagnostic_source: add protocol method for Diagnostic-aware source chaining (#165) (bc449c84)
- IntoDiagnostic: Warn of potential data loss (#161) (2451ad6a)
- spans: add From shorthand for zero-length SourceSpans (1e1d6152)
- related: print related prefixes according to severity (#158) (084ed138)
- graphical: fix issue with duplicate labels when span len is 0 (#159) (1a36fa7e)
- spans: make SourceSpan implement Copy (#151) (5e54b29a)
- help: update macro to allow optional help text (#152) (45093c2f)
- labels: allow optional labels in derive macro (#153) (23ee3642)
- help: allow non-option values in #[help] fields (ea55f458)
- label: use macro magic instead of optional flag for optional labels (9da62cd0)
- theme: set correct field in MietteHandlerOpts::ansi_colors (#150) (97197601)
- report: Add conversion from Report to Box (#149) (b4a9d4cd)
- docsrs: use proper module names for docsrs URLs (a0b972f8)
- clippy: misc clippy fixes (b98b0982)
- fmt: cargo fmt (37cda4a3)
- reporter: Allow GraphicalReportHandler to disable url display (#137) (b6a6cc9e)
- colors: handler_opts.color(false) should disable color (#133) (209275d4)
- handler: Apply MietteHandlerOpts::graphical_theme (#138) (70e84f9a)
- readme: Fix a couple links (#141) (126ffc58)
- deps: Update textwrap to 0.15.0 (#143) (2d0054b3)
- handlers: source code propagation for JSON handler (#122) (50bcec90)
- clippy: 1.59.0 clippy fix (fa5b5fee)
- docs: Docs overhaul (#124) (5d23c0d6)
- derive: allow
Report
inrelated
(#121) (75d4505e)
.with_source_code()
is here!!
- report: add
with_source_code
(50519264) - handlers: propagate source code to related errors (3a17fcea)
- derive: absolute path references to Diagnostic (#118) (6eb3d2d8)
- graphical: boolean was messing up graphical display (5c085b39)
- colors: treat no-color mode as no-color instead of narratable (#94) (9dcce5f1)
- BREAKING CHANGE: NO_COLOR no longer triggers the narrated handler. Use NO_GRAPHICS instead.
- derive: Make derive macro
diagnostic
attribute more flexible. (#115) (5b8b5478)- BREAKING CHANGE:
diagnostic
attribute duplication will now error.
- BREAKING CHANGE:
- Report: adds
.context()
method to theReport
(#109) (2649fd27)
- handlers: Fix label position (#107) (f158f4e3)
- chain: correct
Chain
structure exported (#102) (52e5ec80) - json: proper escapes for JSON strings (#101) (645ef6a1)
- deps: switch to terminal_size (51146535)
- tabs: Add replace tabs with spaces option (#82) (1f70140c)
- read_span prevent multiline MietteSpanContents from skipping lines (#81) (cb5a919d)
- SourceSpan: add impl From (#78) (0169fe20)
No code changes this release. Just improved documentation and related tests.
It's here! Have fun!
It's a pretty significant change, so if you were using miette
's snippet
support previously, you'll need to update your code.
- report: miscellaneous, hacky tweaks to graphical rendering (80036781)
- protocol: implement source/cause for Box (c3505fac)
- derive: Code is no longer required (92a31509)
- graphical: stop rendering red vbars before the last item (e2e4027f)
- graphical: fix coalescing adjacent things when they cross boundaries (18e0ed77)
- context: get labels/snippets working when using .context() (41cb710a)
- api: put panic handler properly behind a flag (55ca8e0b)
- deps: We do not use ci_info directly anymore (8d1170e2)
- graphical: Fix off-by-one span_applies calculation (#70) (a6902042)
- theme: remove code styling (ce0dea54)
- graphical: render URLs even without a code (77c5899b)
- deps: remove dep on itertools (612967d3)
- report: make a single big MietteHandler that can switch modes (4c2463f9)
- BREAKING CHANGE: linkification option method on GraphicalReportHandler has been changed to .with_links(bool)
- deps: move fancy reporter (and its deps) to a feature (247e8f8b)
- 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
- footer: add footer support to graphical and narrated (93374173)
- theme: rename some theme items for clarity (c5c0576e)
- BREAKING CHANGE: These were part of the public API, so if you were using theming, this might have broken for you
- theme: more styling changes (2c437403)
- report: add debug report as default, instead of narrated one (9841d6fd)
- labels: replace snippet stuff with simpler labels (#62) (f87b158b)
- protocol: Make SourceCode Send+Sync (9aa8ff0d)
- handlers: Update graphical handler to use new label protocol (#66) (4bb9d121)
- report: nicer, non-overlapping same-line highlights (1a0f359e)
- panic: Add basic panic handler and installation function (c6daee7b)
- panic: add backtrace support to panic handler and move set_panic_hook into fancy features (858ac169)
- graphical: simplify graphical header and remove a dep (6c648463)
- related: Add related diagnostics (#68) (8e11baab)
- graphical: compact graphical display a bit (db637a36)
- graphical: compact even more (72c0bb9e)
- graphical: add theming customization for linums (717f8e3d)
- handler: context lines config support (b33084bd)
- narrated: updated narrated handler (fbf6664e)
- narrated: global footer and related diagnostics support (3213fa61)
Time to get ready for release!
- graphical: stop rendering red vbars before the last item (dc2635e1)
- graphical: fix coalescing adjacent things when they cross boundaries (491ce7c0)
- context: get labels/snippets working when using .context() (e0296578)
- report: nicer, non-overlapping same-line highlights (338c885a)
- panic: Add basic panic handler and installation function (11a708a2)
- panic: add backtrace support to panic handler and move set_panic_hook into fancy features (183ecb9b)
- graphical: simplify graphical header and remove a dep (9f36a4c2)
- related: Add related diagnostics (#68) (25e434a2)
- graphical: compact graphical display a bit (9d07dc5a)
- graphical: compact even more (712e75fd)
This is the first WIP alpha release of miette 3.0!
It's a MAJOR rewrite of the entire snippet definition and rendering system, and you can expect even more changes before 3.0 goes live.
In the meantime, there's this. :)
- report: miscellaneous, hacky tweaks to graphical rendering (8029f9c6)
- protocol: implement source/cause for Box (3e8a27e2)
- derive: Code is no longer required (8a0f71e6)
- report: make a single big MietteHandler that can switch modes (3d74a500)
- BREAKING CHANGE: linkification option method on GraphicalReportHandler has been changed to .with_links(bool)
- deps: move fancy reporter (and its deps) to a feature (bc495e6e)
- 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
- footer: add footer support to graphical and narrated (412436cd)
- theme: rename some theme items for clarity (12a9235b)
- BREAKING CHANGE: These were part of the public API, so if you were using theming, this might have broken for you
- theme: more styling changes (9901030e)
- report: add debug report as default, instead of narrated one (eb1b7222)
- labels: replace snippet stuff with simpler labels (#62) (0ef2853f)
- protocol: Make SourceCode Send+Sync (eb485658)
- handlers: Update graphical handler to use new label protocol (#66) (6cd44a86)
So it turns out 3.0.0
is already under way, if you didn't already hear!
It's going to be an exciting release, but we'll still be putting out bugfixes
and (backwards-compatible) features in the 2.x
line until that's ready.
And there's definitely stuff in this one to be excited about! Not least of all
the ability to forward diagnostic metadata when wrapping other
Diagnostic
s. Huge thanks to @cormacrelf for
that one!
We've also got some nice improvements to reporter formatting that should make output look at least a little nicer--most notably, we now wrap messages and footers along the appropriate column so formatting keeps looking good even when you use newlines!
Finally, huge thanks to @icewind1991 for fixing a really weird-looking bug caused by an off-by-one error. Oopsies 😅
- report: wrap multiline messages to keep formatting (f482dcec)
- report: take terminal width into account for wrapping text (bc725324)
- report: make header line as wide as terminal (eaebde92)
- derive: Add
#[diagnostic(forward(field_name), code(...))]
(#41) (2fa5551c)
- report: get rid of the weird arrow thing. it does not look good (1ba3f2f5)
- report: fix wrapping for header and add wrapping for footer (eb07d5bd)
- report: Fix end of previous line wrongly being included in highlight (#52) (d994add9)
So it turns out I forgot to make snippets and other stuff forward through when
you use .context()
&co. This should be fixed now 😅
- context: pass on diagnostic metadata when wrapping with
Report
(e4fdac38)
This is a small, but visually-noticeable bug fix. I spent some time playing with colors and styling and made some fixes that will improve where people's eyes are drawn to, and also take into account color visibility issues a bit more.
- report: don't color error message text to draw eyes back to it (6422f821)
- reporter: improve color situation and style things a little nicer (533ff5f3)
This is a small release with a handful of quality of life improvements (and a small bugfix).
- printer: use uparrow for empty highlights and fix 0-offset display bug (824cd8be)
- derive: make #[diagnostic] optional for enums, too (ffe1b558)
This release 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 that will make it possible to
integrate miette
directly with crates like eyre
instead of having to use
this specific Report
.
On top of that, it includes a couple of nice new features, such as
#[diagnostic(transparent)]
, which should be super useful when wrapping other
diagnostics with your own types!
- report: anyhow-ify DiagnosticReport (#35) (3f9da04b)
DiagnosticReport
is now justReport
, and is a different,eyre::Report
-like type.DiagnosticResult
is now justResult
..into_diagnostic()
now just transforms the error into aReport
.DiagnosticReportPrinter
has been replaced withReportHandler
set_printer
has been replaced byset_hook
code
is now optional..into_diagnostic()
no longer takes acode
argument.#[diagnostic]
is now optional when derivingDiagnostic
.
- derive: Add
#[diagnostic(transparent,forward)]
(#36) (53f5d6d1) - Source: impl Source for str, &str (make &'static str usable for testing) (#40) (50c7a883)
- source: Remove bound
T: Clone
fromSource
implementation forCow
. (#42) (0427c9f9)
- reporter: Only inc the line count if we haven't already done so with '\n' or '\r\n' (#37) (5a474370)
- printer: Show snippet message for unnamed sources (#39) (84219f6c)
This is a small release of patches entirely not my own!
The exciting new feature is the ability to do thiserror
-style
#[diagnostic(transparent)]
when using the derive macro, which will defer
diagnostics to a Diagnostic referred to by the struct/enum!
Big thanks to @cormacrelf and @felipesere for your contributions!
- derive: Add
#[diagnostic(transparent,forward)]
(#36) (53f5d6d1)
- reporter: Only inc the line count if we haven't already done so with '\n' or '\r\n' (#37) (5a474370)
This is a (literally) small release. I noticed that the crate's size had
increased significantly before I realized cargo was including the images/
folder. This is not needed, as these images are just hosted on GitHub.
miette
should be smaller now, I hope :)
- crate: reduce crate size by removing images (5f74da67)
...you know what? I'm just gonna tag 1.0.0, because I don't want sub-1.0 versions anymore, but the Cargo ecosystem buries pre-releases pretty thoroughly. Integers are cheap!
So here we are! We made it to 1.0, and with some really nice goodies to boot.
Most fun is the fact that the default printer now has clickabble url linking
support. A new Diagnostic::url()
method has been added to the protocol that,
is used to figure out what URL to send folks to! This should work on most
"modern" terminals, but more thorough support checking will be done in the
future. And of course, the narrated reporter prints them out too.
I also took the time to completely redo how messages, labels, and filenames are handled in the system, and this is a pretty big change you might run into. Godspeed!
Last but not least, we got our first external contribution! Thank you to @martica for the bug fix!
Anyway, here's to 1.0, and to many more after that. Enjoy! :)
- snippets: Overhauled how snippets handle labels, sources, and messages, including the derive macro (61283e9e
- links: added URL linking support and automatic docs.rs link generation (7e76e2de)
- theme: Add an initial
rgb
style with nicer colors (3546dcec) - @martica
- printer: clamp highlight length to at least 1 (#32) (9d601599)
It's happening, folks! miette
is now working towards stability and is now in
beta! We'll keep it like this for a little while until a few more people have
tried it out and given feedback. New features may still be added, and breaking
changes may still happen, but miette
is now considered "good enough to use",
and breaking changes are expected to be more rare.
Oh, and as part of this release, the docs were overhauled, particularly the README, so you might want to take a gander at them!
- printer: rename default printer and consistify some naming conventions with printing (aafa4a3d, breaks #)
- into_diagnostic: .into_diagnostic() is now generic across any impl fmt::Display instead of expecting a
dyn
(c1da4a0d)
- error: diagnostic-ify MietteError (e980b723)
- derive: #[diagnosic(severity)] works for named and unnamed variants/structs now (adf0bc93)
- protocol: oops, missed a spot after a rename (5c077d30)
This release includes some accessibility improvements: miette now includes a "narratable" printer that formats diagnostics like this:
Error: Received some bad JSON from the source. Unable to parse.
Caused by: missing field `foo` at line 1 column 1700
Begin snippet for https://api.nuget.org/v3/registration5-gz-semver2/json.net/index.json starting
at line 1, column 1659
snippet line 1: gs":["json"],"title":"","version":"1.0.0"},"packageContent":"https://api.nuget.o
highlight starting at line 1, column 1699: last parsing location
diagnostic help: This is a bug. It might be in ruget, or it might be in the source you're using,
but it's definitely a bug and should be reported.
diagnostic error code: ruget::api::bad_json
This style is the default in a number of situations:
- The
NO_COLOR
env var is present and set, and not0
. - The
CLICOLOR
env var is present and not set to1
. stdout
orstderr
are not TTYs.- A CI environment is detected.
You can override and customize this behavior any way you want by using the
miette::set_reporter()
function at the toplevel of your application, but we
encourage you to at least make the narratable printer an option for your
users, since miette's default printer is exceptionally bad for screen
readers.
Our hope is that this release is only the starting point towards making miette's error reporting not just really fancy and cool, but friendly and accessible to everyone.
- printer: added (and hooked up) an accessible report printer (5369a942)
This is a SUPER EXCITING release! With this, miette now has a full-featured pretty-printer that can handle cause chains, snippets, help text, and lots more!
Check out the serde_json example to see a "real-world" case!
This release also adds support for full thiserror
-style format strings to
the help()
diagnostic derive attribute!
We're rapidly approaching a 1.0-beta release. One more extra-fun treat left and we can start stabilizing!
- derive: format string support for help() (8fbad1b1)
- printer: lots of small improvements to printer (5fbcd530)
- reporter: fancy new reporter with unicode, colors, and multiline (#23) (d675334e)
BIG changes this time. The whole end-to-end experience for tossing around
Diagnostics in your code has been overhauled, printing reports is easier than
ever, and we even have an eyre::Report
-style wrapper you can pass around in
app-internal returns!
- reporter: Overhauled return type/main/DiagnosticReport experience. (29c1403e)
Lots of goodies in this release! I'm working hard on the 1.0.0 Roadmap, so things are changing pretty quick, and I thought it would be nice to release this checkpoint.
- protocol: keep the owned spans (49151bb0)
- derive: Allow anything Clone + Into to be used as a Span (385171eb)
- offsets:
- protocol:
Yay new version already! A pretty significant API change, too! ��
SourceSpan
s have changed a bit: for one, they're based on offset/length now,
instead of start/end. For two, they have a new Option<String>
field,
label
, which is meant to be used by reporters in different contexts. For
example, highlight snippets will use them as the labels for underlined
sections of code, while the snippet context will use the label as the "file
name" for the Source they point to.
- protocol: new SourceSpans with labels (acfeb9c5)
- derive: allow unused variables for the snippets method (f704d6a9)
- protocol: implement From<(usize, usize)> for SourceSpan (36b86df9)
Just a small bump to update the readme (and docs.rs in the process) with the new snippet derive stuff. No notable changes.
You can full-on use #[derive(Diagnostic)]
to define snippets now. That's a
big deal.
- derive: Support for deriving snippet method (#18) (f6e6acf2)
Welp. 0.6.0
was basically completely broken, so I tore out the
darling
-based derive macros and rewrote the whole thing using syn
, and
things are much better now!
There's still a few bits and bobs to add, like snippets (oof. big.), and full help format string support (they don't quite work in enums right now), but otherwise, this is pretty usable~
- derive: improved derive support, including partial help format string support! (9ef0dd26)
- derive: move to plain syn to fix darling issues (9a78a943)
We haz a basic derive macro now!
- derive: added basic derive macro (0e770270)
I decided to yank some handy (optional) utilities from a project I'm using
miette
in. These should make using it more ergonomic.
- utils: various convenience utilities for creating and working with Diagnostics (a9601368)
Time for another (still experimental!) change to Diagnostic
. It will
probably continue to change as miette gets experimented with, until 1.0.0
stabilizes it. But for now, expect semi-regular breaking changes of this kind.
Oh and I tracked down a rogue \n
that was messing with the default reporter
and managed to get out of it with at least some of my sanity.
This is a tiny release to fix a reporter rendering bug.
- reporter: fix missing newline before help text (9d430b6f)
This version is the result of a lot of experimentation with getting the
Diagnostic
API right, particularly Diagnostic::snippets()
, which is
something that should be writable in several different ways. As such, it
includes some breaking changes, but they shouldn't be too hard to figure out.
- tests: updating tests (60bdf47e)
I think this is the right thing to do re: From!
- protocol: fix the default From<:T Diagnostic> implementation to cover more cases. (781a51f0)
Starting to get some good feedback on the protocol and APIs, so some improvements were made.
You might need to add + Send + Sync + 'static
to your Box<dyn Diagnostic>
usages now, since Diagnostic
no longer constrains on any of them.
Additionally, Diagnostic::help()
, Diagnostic::code()
, and SpanContents
have had signature changes that you'll need to adapt to.
- protocol: protocol improvements after getting feedback (e955321c)
- protocol: Make use of ? and return types with Diagnostics more ergonomic (50238d75)
I'm really excited to put out this first release of miette
! This version
defines the current protocol and includes a basic snippet reporter. It's fully
documented and ready to be used!
Disclaimer: This library is still under pretty heavy development, and you should only use this if you're interested in using something experimental. Any and all design comments and ideas are welcome over on GitHub
- api: stop re-exporting random things wtf??? (2fb9f93c)
- protocol: use references for all return values in Diagnostic (c3f41b97)
- protocol: sketched out a basic protocol (e2387ce2)
- reporter: dummy reporter implementation + tests (a437f445)
- span: make span end optional (1cb0ad38)
Don't mind me, just parking this crate name.