Commit Graph

219 Commits

Author SHA1 Message Date
François Garillot f346d78d21
fix: address review feedback and add feature powerset CI
- 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
2026-01-14 16:31:42 -05:00
François Garillot c5ddfdc0be
fix: make spin dependency optional for std builds
- 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)
2026-01-14 15:45:27 -05:00
François Garillot c07cab4b60
fix: address review feedback for no_std support
- Use core::error::Error directly (MSRV 1.82 supports it)
- Remove build.rs (track_caller is always available with MSRV 1.82)
- Simplify feature detection in handler.rs syscall module
- Add clippy lints to catch std/core/alloc misuse
- Remove custom StdError trait, re-export core::error::Error
- Add __alloc module for derive macro compatibility
- Clean up verbose comments
- Remove extern crate alloc from tests (not needed with std)
- Fix derive macros to use miette::__alloc paths
2026-01-14 15:38:54 -05:00
François Garillot 9bdf23a659
fix: remove unused rustc_version dependency and simplify build.rs
- 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
2025-11-19 09:20:50 -05:00
François Garillot 359941fdef
fix: address review comments
- Fixed compilation errors in no-std mode (TestError Debug derive, ToString imports)
- Addressed consistency issues: Option qualification, StdError naming, Borrow impl
- Fixed feature flag logic for supports_color function with proper priority ordering
- Added conditional compilation for std-dependent features in panic.rs, handler.rs, theme.rs
- Made syntect-highlighter feature explicitly require std
- Consolidated duplicate Borrow implementations using core::borrow::Borrow
2025-11-16 08:59:54 -05:00
François Garillot 79fbd0a07d
feat(no_std): Implement comprehensive no_std support
This commit finishes full no_std support to miette.
2025-10-21 07:19:03 -04:00
Paul Schoenfelder 243ea534e8
fix: support no-std environments 2025-10-18 07:25:14 -04:00
cgettys-microsoft 2b79495c79
fix(ci, clippy): raise MSRV to 1.82, fix rust 1.90 warnings (#451)
* fix: remove unused code

* fix: 1.90 errors

* MSRV: 1.82.0

* fix: warnings exposed by increasing MSRV
2025-09-29 09:43:02 -07:00
Expyron 7a4d759c59
fix(deps): Use const init for Mutex (#447) 2025-09-25 21:12:37 -07:00
Louis Maddox fea8043b3e
chore: update unicode-width dependency to v0.2.0 (#439) 2025-09-25 21:11:50 -07:00
Kat Marchán 907857058d
chore: Release 2025-04-26 21:52:05 -07:00
Brooks Rady 521ef91f77
fix(deps): miette can now be used without syn (#436)
* 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`
2025-04-26 11:34:21 -07:00
nogiro 59c81617de
feat(deps): update `thiserror` from 1.0.56 to 2.0.11 (#426) 2025-03-01 18:04:51 -08:00
Kat Marchán b8c144f2a6
(cargo-release) version 7.5.0 2025-01-31 18:50:56 -08:00
Kat Marchán 429ca37d8d
(cargo-release) version 7.5.0 2025-01-31 18:50:56 -08:00
Kat Marchán b2011f693b
chore: Release 2024-11-26 20:01:39 -08:00
Kat Marchán 01564e070f
chore: Release 2024-11-26 00:44:33 -08:00
Gal Schlezinger 2902a2337c
docs(examples): add serde_json integration example (#407) 2024-11-13 09:57:24 -08:00
Bruce Mitchener 789a04e30d
fix(features): Use `dep:` syntax for dependencies in features. (#394)
This prevents creating implicit features for them which can be
confusing (and duplicates features).
2024-09-25 10:28:01 -07:00
Bruce Mitchener 21e9a70ad8
deps: Bump `terminal_size` to 0.4.0 (#404) 2024-09-25 10:14:22 -07:00
Dániel Buga edfdcb525e
fix(handlers): Disable textwrap::smawk feature (#379) 2024-06-26 09:34:30 -07:00
Kat Marchán ca646f3119
chore: Release 2024-03-07 12:21:32 -08:00
Boshen 328bf37922
feat(wasm): add feature "fancy-no-syscall" for wasm targets (#349)
Fixes: https://github.com/zkat/miette/issues/346
2024-02-23 07:42:39 -08:00
Kat Marchán a18a6444d9
chore: Release 2024-02-15 18:18:45 -08:00
Brooks Rady 6e829f8c0c
fix(tests): revert test-breaking changes of e5c7ae4 (#339)
The commit e5c7ae4 seemed to (potentially erronously?) remove a number of
spaces following the left `|` bar of some graphical report handler tests.
That change had no effect on the `syntax_highlighter_on_real_file()`
test, presumably because the trailing whitespace is removed by
`strip_ansi_escapes::strip_str()`, but it did break the
`triple_adjacent_highlight()` and `non_adjacent_hightlight()` tests.
Restoring the spaces removed in e5c7ae4 fixes the failing tests on main.

* fix(ci): move from minimal-versions to direct-minimal-versions
2024-02-07 10:17:42 -08:00
Kat Marchán ecb01022f0
chore: Release 2024-02-04 17:59:20 -08:00
Kat Marchán a4011d174c
feat(deps): bump dependencies
Fixes: https://github.com/zkat/miette/issues/336

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
2024-02-04 17:26:25 -08:00
Kat Marchán cf2d8c0b2c
chore: Release 2024-02-03 20:27:47 -08:00
Kat Marchán 5d4b262f7b
chore: Release 2024-02-03 20:01:50 -08:00
Kat Marchán ab59a7bc9b
feat(MSRV): Actually bump the MSRV to 1.70.0 2024-02-03 19:59:57 -08:00
Kat Marchán 29d000f201
feat(deps): bump some semver-breaking deps to newer versions 2024-02-03 19:50:56 -08:00
Kat Marchán 4c48584f30
feat(deps): remove once_cell dep in favor of `std::sync::OnceLock`
BREAKING CHANGE: This requires an MSRV bump to 1.70.0.
2024-02-03 19:50:33 -08:00
Kat Marchán e5c7ae469e
feat(deps): remove is-terminal dep in favor of `std::io::IsTerminal` 2024-02-03 19:50:30 -08:00
Adam Curtis e65d0a78cc
feat(highlighting): add syntax highlighting support with syntect crate (#313) 2024-02-03 19:47:46 -08:00
John Nunley c0a298e5a8
feat(deps): Bump terminal-size to v0.3.0 (#308)
BREAKING CHANGE: This requires an MSRV bump to 1.70.0.

Signed-off-by: John Nunley <dev@notgull.net>
2024-02-03 19:31:41 -08:00
ManicMarrc c7ba5b7e52
feat(derive): Make `miette-derive` be able to be turned off (#304) 2023-11-09 13:22:47 -08:00
Kat Marchán f4d056e1ff
chore: Release 2023-07-15 18:49:14 -07:00
Kat Marchán 91e5f5b7e3
chore: Release 2023-05-18 15:58:11 -07:00
Gavrilikhin Daniil c25676cb1f
feat(serde): Add `serde` support (#264)
Fixes: https://github.com/zkat/miette/issues/260
2023-05-14 01:43:40 -07:00
Gavrilikhin Daniil 024145dbdd
Add dynamic diagnostic (#262) 2023-05-13 13:59:43 -07:00
Kat Marchán 2b4d67d7cd
chore: Release 2023-04-18 08:56:10 -07:00
Kat Marchán 80c6ce805b
chore: Release 2023-03-31 17:25:26 -07:00
Kat Marchán b0453215f6
feat(panic): improved backtrace handling
Fixes: https://github.com/zkat/miette/issues/92
2023-03-31 17:08:20 -07:00
jtroo a215720576
feat(deps): update to syn2 (#247)
Fixes: https://github.com/zkat/miette/issues/243
2023-03-29 18:11:14 -07:00
Kat Marchán 78fe18e699
chore: Release 2023-03-13 21:15:55 -07:00
George Pollard 443d240f49
fix(atty): Switch out `atty` for `is-terminal` (#229) 2023-03-13 21:10:21 -07:00
Kat Marchán 14f952dc91
(cargo-release) start next development iteration 5.5.1-alpha.0 2022-11-23 16:56:53 -08:00
Kat Marchán 128c0a1fae
(cargo-release) start next development iteration 5.5.1-alpha.0 2022-11-23 16:56:52 -08:00
Kat Marchán f4dbf4e5bf
(cargo-release) version 5.5.0 2022-11-23 16:56:04 -08:00
Kat Marchán 694c7de942
(cargo-release) version 5.5.0 2022-11-23 16:56:03 -08:00