miette icon indicating copy to clipboard operation
miette copied to clipboard

Fancy extension for std::error::Error with pretty, detailed diagnostic printing.

Results 105 miette issues
Sort by recently updated
recently updated
newest added

Ideally, this PR would just be commit d63b2bb and c7cbb07[^1] stacked on top of PR #354, but Github doesn't support PR stacking, so this also contains the commits from #354....

breaking

It looks like there is currently a test matrix that's testing the `fancy` and `syntect-highlighter` features as part of the CI, but out of curiosity I ran `cargo test --all-features`...

## Code ```rust #[derive(Debug, Diagnostic, Error)] #[error("oops!")] #[diagnostic(code(oops::my::bad), help("try doing it better next time?"))] struct MyBad { #[source_code] src: NamedSource, #[label("this bit here")] highlight: SourceSpan, } let src = "one\ntwoo\nthree".to_string();...

There are more and more language support tree-sitter. neovim using it for code highlight. So why don't add tree-sitter highlight support for miette? If this idea can be approve, I...

Say I have a user editing a file and if it doesn’t parse to the correct format I want to display the error and ask if they’d like to try...

question

I've been working with some code that looks like this: ```rust trait DiagnosticTryFrom: Sized { type Error: Diagnostic; fn try_from_diagnostic(input: Input) -> Result; } ``` And so logically it makes...

At the moment outer source code is supplied to inner related errors but not to causes. This PR changes that. This allows late-supplied source code to be supplied using concrete...

This prevents creating implicit features for them which can be confusing (and duplicates features).