Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
chore!: remove anyhow from default features
[#131][131] introduced a new anyhow default
feature flag to allow users to hide
aliased exports such as `eyre::Error`
and `eyre::Context`.

This changeset removes `anyhow` from the list
of default features, making the compatibility
layer with the anyhow crate opt-in.

Implements [#136][136]

[131]: #131
[136]: #136

BREAKING CHANGE: Removing a default feature is
                 a breaking change.
  • Loading branch information
LeoniePhiline committed Jul 11, 2024
commit 0eb8d50da82daea4ba4ebba348fa7e895ea5a062
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -205,12 +205,12 @@ vice-versa by `re-exporting` all of the renamed APIs with the names used in

### Disabling the compatibility layer

The `anyhow` compatibility layer is enabled by default.
If you do not need anyhow compatibility, it is advisable
to disable the `"anyhow"` feature:
The `anyhow` compatibility layer is disabled by default.
If you need anyhow compatibility, it is advisable
to enable the `"anyhow"` feature:

```toml
eyre = { version = "0.6", default-features = false, features = ["auto-install", "track-caller"] }
eyre = { version = "0.6", features = ["anyhow"] }
```

### `Context` and `Option`
Expand Down
2 changes: 1 addition & 1 deletion eyre/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ readme = { workspace = true }
rust-version = { workspace = true }

[features]
default = ["anyhow", "auto-install", "track-caller"]
default = ["auto-install", "track-caller"]
anyhow = []
auto-install = []
track-caller = []
Expand Down
8 changes: 4 additions & 4 deletions eyre/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -267,12 +267,12 @@
//!
//! ### Disabling the compatibility layer
//!
//! The `anyhow` compatibility layer is enabled by default.
//! If you do not need anyhow compatibility, it is advisable
//! to disable the `"anyhow"` feature:
//! The `anyhow` compatibility layer is disabled by default.
//! If you need anyhow compatibility, it is advisable
//! to enable the `"anyhow"` feature:
//!
//! ```toml
//! eyre = { version = "0.6", default-features = false, features = ["auto-install", "track-caller"] }
//! eyre = { version = "0.6", features = ["anyhow"] }
//! ```
//!
//! ### `Context` and `Option`
Expand Down