Repository navigation
v1.0.1 - Recovery Fixes
error-forge v1.0.1 - Recovery Fixes
Date: 2026-10-08
Compare: v1.0.0...v1.0.1
Headline
A patch release for error-forge and error-forge-derive (both
1.0.1). Bug fixes and documentation corrections only: no public
item was added, removed or renamed (cargo semver-checks against
1.0.0: 222 checks pass). Upgrading needs no code changes.
Fixed
Recovery
CircuitBreakerpanic.executepanicked with "overflow when
subtracting duration from instant" whenfailure_window_msreached
back past the start of the monotonic clock (for exampleu64::MAX).- Half-open probing.
CircuitBreakernow admits a single probe
call once the reset timeout elapses, as documented; concurrent calls
fail fast until the probe resolves. A panicking probe reopens the
circuit instead of leaving it stuck half-open. CircuitBreaker::statereportsHalfOpenonce the reset timeout
has elapsed (it kept reportingOpenuntil the nextexecute).LinearBackoff::next_delaysaturates atmax_delayinstead of
overflowing on large values.ExponentialBackoff::next_delayclamps very large attempts
instead of returning a zero delay, caps the first attempt at
max_delay, applies jitter to the first attempt, and never lets
jitter exceedmax_delay.
Macros
define_errors!now works when invoked by path
(error_forge::define_errors! { ... }) without importing it.#[derive(ModError)]now compiles variants with fields that have
no#[error_display], or whose display string does not use every
field, and reports acompile_error!on unions instead of panicking
inside the macro (error-forge-derive1.0.1).
Console and docs
NO_COLORhandling follows the no-color.org spec: colour is disabled
only when the variable is present and non-empty.- The
group!rustdoc, README,docs/API.mdanddocs/migration.mdno
longer claimdefine_errors!implementsForgeError; they show the
delegating impl instead. docs/API.mdhad about 800 stale lines documenting APIs that do not
exist. They are replaced with working examples, compiled as doctests
in CI.ErrorLogger::log_panicdocs state it is a helper you call from your
own panic hook; the crate never calls it.
Maintenance
- CI:
actions/checkout@v7(Node 24), prebuiltcargo-audit, clippy
on all targets, and tests with--all-features(theasync,log,
tracingandjitterpaths previously never ran in CI). - Clippy 1.99 compatibility (
double_must_useon code generated by
async_trait). Cargo.lockrefreshed (Dependabot PRs #12 and #15).
Installation
[dependencies]
error-forge = "1.0.1"MSRV: Rust 1.81 (unchanged).