- Make spin a required dependency for no_std hook support (OnceLock unavailable)
- Simplify cfg guards: not(std) instead of not(std) && spin
- Change clippy alloc/std lints from warn to deny
- Remove no_std stub for from_current_location (compile-time vs runtime error)
- Fix is_graphical cfg logic for fancy-base without fancy-no-backtrace
- Add cargo-hack feature powerset CI job to verify all 56 combinations
- spin is now optional, only needed for no_std (provides Once)
- std builds use OnceLock, avoiding unnecessary dependency
- Restore unicode-width default features (keeps CJK support)
- Remove rustc_version build dependency that was no longer needed
- Remove nightly detection since nightly cfg flag wasn't used anywhere
- Simplify build.rs to only set track_caller cfg flag
- Add #[allow(unused_assignments)] to test structs/enums with unused fields
- Fix Miri test failures caused by derive macro feature interactions
- Miri tests now pass: 52 passed, 0 failed, 6 ignored
- Issue occurs when fancy feature changes how derive macros process fields
- Suppression is appropriate as fields are only unused under specific feature combinations
- Add dedicated no-std CI job that builds for wasm32-unknown-unknown target
- Fix Infallible StdError implementation for no-std environments
The CI job validates:
1. Core no-std functionality (no default features)
2. fancy-no-syscall feature set compatible with no-std environments
* style(clippy): quickly fix up clippy lints
* refactor(miette): remove `thiserror` from `error.rs`
* fix(fancy): `fancy` no longer depends on `derive`
Before this change, the `fancy` feature required the `derive` feature to
compile. Despite this, `derive` was not listed as a required feature to
use `fancy`. This meant that building with:
`cargo build --no-default-features --features fancy` would result in a
compilation error!
Now `fancy` can be used without `derive` enabled, and another use of
`thiserror` has been removed!
* refactor(miette): remove `thiserror` from `into_diagnostic.rs`
* refactor(miette): reuse `DiagnosticError` in `protocol.rs`
* refactor(miette): make `thiserror` a dev-dependency
* fix(miette): correctly forward error sources
* fix(miette): match `TestError` visibility with `mod tests`
* fix(miette): maintain 1.70 MSRV
* fix(miette): another fix for MSRV 1.70
* docs(miette): sync README and `rustdoc`
Fixes: https://github.com/zkat/miette/issues/408
Implement `WrapError` for `Option<T>`. This is inline with `anyhow` that
also implements `Context` for `Option<T>`.
The implementation requires us to introduce a `DisplayError` internal
only type, that creates an error from a type that only implements
`Display` (`Report::from_adhoc` requires the type to also implement
`Debug`, but `WrapError` only requires it to implement `Display`).
For this I copied `MessageError` and adapted it to implement `Debug`
using the underlying type's `Display` impl. This is a bit of a hack, but
anyhow does [something similar][1].
[1]: https://docs.rs/anyhow/latest/src/anyhow/wrapper.rs.html#34
* Fix `clippy::doc_lazy_continuation` lints
* Fix `dead_code` warnings in tests.
Protect code used in some tests based on features with feature
checks.
* Fix `clippy::needless_borrows_for_generic_args` lints
* Remove a useless conversion
* Remove a cfg_attr check for `track_caller`
This shouldn't be needed here as the test is already ignored.
Fixes: https://github.com/zkat/miette/issues/369
Diagnostic impls are no longer reset to default when converting a
`Report` into a `Box<dyn Diagnostic>`. Also prevented `Report` vtables
and handlers from being kept around on the heap after conversion.