Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore!: remove anyhow from default features #180

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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
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 Expand Up @@ -330,7 +330,7 @@
//! [`color-backtrace`]: https://github.com/athre0z/color-backtrace
#![doc(html_root_url = "https://docs.rs/eyre/0.6.11")]
#![cfg_attr(
nightly,

Check warning on line 333 in eyre/src/lib.rs

View workflow job for this annotation

GitHub Actions / Test Suite (beta, --no-default-features --features auto-install)

unexpected `cfg` condition name: `nightly`

Check warning on line 333 in eyre/src/lib.rs

View workflow job for this annotation

GitHub Actions / Test Suite (beta)

unexpected `cfg` condition name: `nightly`

Check warning on line 333 in eyre/src/lib.rs

View workflow job for this annotation

GitHub Actions / Test Suite (beta, --no-default-features)

unexpected `cfg` condition name: `nightly`

Check warning on line 333 in eyre/src/lib.rs

View workflow job for this annotation

GitHub Actions / Test Suite (beta, --all-features)

unexpected `cfg` condition name: `nightly`

Check warning on line 333 in eyre/src/lib.rs

View workflow job for this annotation

GitHub Actions / Test Suite (beta, --features pyo3)

unexpected `cfg` condition name: `nightly`

Check warning on line 333 in eyre/src/lib.rs

View workflow job for this annotation

GitHub Actions / Test Suite (beta, --no-default-features --features track-caller)

unexpected `cfg` condition name: `nightly`

Check warning on line 333 in eyre/src/lib.rs

View workflow job for this annotation

GitHub Actions / Miri

unexpected `cfg` condition name: `nightly`

Check warning on line 333 in eyre/src/lib.rs

View workflow job for this annotation

GitHub Actions / Miri

unexpected `cfg` condition name: `nightly`

Check warning on line 333 in eyre/src/lib.rs

View workflow job for this annotation

GitHub Actions / Test Suite (nightly)

unexpected `cfg` condition name: `nightly`

Check warning on line 333 in eyre/src/lib.rs

View workflow job for this annotation

GitHub Actions / Test Suite (nightly, --features pyo3)

unexpected `cfg` condition name: `nightly`

Check warning on line 333 in eyre/src/lib.rs

View workflow job for this annotation

GitHub Actions / Test Suite (nightly, --no-default-features --features track-caller)

unexpected `cfg` condition name: `nightly`

Check warning on line 333 in eyre/src/lib.rs

View workflow job for this annotation

GitHub Actions / Test Suite (nightly, --all-features)

unexpected `cfg` condition name: `nightly`

Check warning on line 333 in eyre/src/lib.rs

View workflow job for this annotation

GitHub Actions / Test Suite (nightly, --no-default-features --features auto-install)

unexpected `cfg` condition name: `nightly`

Check warning on line 333 in eyre/src/lib.rs

View workflow job for this annotation

GitHub Actions / Test Suite (nightly, --no-default-features)

unexpected `cfg` condition name: `nightly`
feature(rustdoc_missing_doc_code_examples),
warn(rustdoc::missing_doc_code_examples)
)]
Expand All @@ -355,8 +355,8 @@
unused_parens,
while_true
)]
#![cfg_attr(backtrace, feature(backtrace))]

Check warning on line 358 in eyre/src/lib.rs

View workflow job for this annotation

GitHub Actions / Test Suite (beta, --no-default-features --features auto-install)

unexpected `cfg` condition name: `backtrace`

Check warning on line 358 in eyre/src/lib.rs

View workflow job for this annotation

GitHub Actions / Test Suite (beta)

unexpected `cfg` condition name: `backtrace`

Check warning on line 358 in eyre/src/lib.rs

View workflow job for this annotation

GitHub Actions / Test Suite (beta, --no-default-features)

unexpected `cfg` condition name: `backtrace`

Check warning on line 358 in eyre/src/lib.rs

View workflow job for this annotation

GitHub Actions / Test Suite (beta, --all-features)

unexpected `cfg` condition name: `backtrace`

Check warning on line 358 in eyre/src/lib.rs

View workflow job for this annotation

GitHub Actions / Test Suite (beta, --features pyo3)

unexpected `cfg` condition name: `backtrace`

Check warning on line 358 in eyre/src/lib.rs

View workflow job for this annotation

GitHub Actions / Test Suite (beta, --no-default-features --features track-caller)

unexpected `cfg` condition name: `backtrace`

Check warning on line 358 in eyre/src/lib.rs

View workflow job for this annotation

GitHub Actions / Miri

unexpected `cfg` condition name: `backtrace`

Check warning on line 358 in eyre/src/lib.rs

View workflow job for this annotation

GitHub Actions / Miri

unexpected `cfg` condition name: `backtrace`

Check warning on line 358 in eyre/src/lib.rs

View workflow job for this annotation

GitHub Actions / Test Suite (nightly)

unexpected `cfg` condition name: `backtrace`

Check warning on line 358 in eyre/src/lib.rs

View workflow job for this annotation

GitHub Actions / Test Suite (nightly, --features pyo3)

unexpected `cfg` condition name: `backtrace`

Check warning on line 358 in eyre/src/lib.rs

View workflow job for this annotation

GitHub Actions / Test Suite (nightly, --no-default-features --features track-caller)

unexpected `cfg` condition name: `backtrace`

Check warning on line 358 in eyre/src/lib.rs

View workflow job for this annotation

GitHub Actions / Test Suite (nightly, --all-features)

unexpected `cfg` condition name: `backtrace`

Check warning on line 358 in eyre/src/lib.rs

View workflow job for this annotation

GitHub Actions / Test Suite (nightly, --no-default-features --features auto-install)

unexpected `cfg` condition name: `backtrace`

Check warning on line 358 in eyre/src/lib.rs

View workflow job for this annotation

GitHub Actions / Test Suite (nightly, --no-default-features)

unexpected `cfg` condition name: `backtrace`
#![cfg_attr(doc_cfg, feature(doc_cfg))]

Check warning on line 359 in eyre/src/lib.rs

View workflow job for this annotation

GitHub Actions / Test Suite (beta, --no-default-features --features auto-install)

unexpected `cfg` condition name: `doc_cfg`

Check warning on line 359 in eyre/src/lib.rs

View workflow job for this annotation

GitHub Actions / Test Suite (beta)

unexpected `cfg` condition name: `doc_cfg`

Check warning on line 359 in eyre/src/lib.rs

View workflow job for this annotation

GitHub Actions / Test Suite (beta, --no-default-features)

unexpected `cfg` condition name: `doc_cfg`

Check warning on line 359 in eyre/src/lib.rs

View workflow job for this annotation

GitHub Actions / Test Suite (beta, --all-features)

unexpected `cfg` condition name: `doc_cfg`

Check warning on line 359 in eyre/src/lib.rs

View workflow job for this annotation

GitHub Actions / Test Suite (beta, --features pyo3)

unexpected `cfg` condition name: `doc_cfg`

Check warning on line 359 in eyre/src/lib.rs

View workflow job for this annotation

GitHub Actions / Test Suite (beta, --no-default-features --features track-caller)

unexpected `cfg` condition name: `doc_cfg`

Check warning on line 359 in eyre/src/lib.rs

View workflow job for this annotation

GitHub Actions / Miri

unexpected `cfg` condition name: `doc_cfg`

Check warning on line 359 in eyre/src/lib.rs

View workflow job for this annotation

GitHub Actions / Miri

unexpected `cfg` condition name: `doc_cfg`

Check warning on line 359 in eyre/src/lib.rs

View workflow job for this annotation

GitHub Actions / Test Suite (nightly)

unexpected `cfg` condition name: `doc_cfg`

Check warning on line 359 in eyre/src/lib.rs

View workflow job for this annotation

GitHub Actions / Test Suite (nightly, --features pyo3)

unexpected `cfg` condition name: `doc_cfg`

Check warning on line 359 in eyre/src/lib.rs

View workflow job for this annotation

GitHub Actions / Test Suite (nightly, --no-default-features --features track-caller)

unexpected `cfg` condition name: `doc_cfg`

Check warning on line 359 in eyre/src/lib.rs

View workflow job for this annotation

GitHub Actions / Test Suite (nightly, --all-features)

unexpected `cfg` condition name: `doc_cfg`

Check warning on line 359 in eyre/src/lib.rs

View workflow job for this annotation

GitHub Actions / Test Suite (nightly, --no-default-features --features auto-install)

unexpected `cfg` condition name: `doc_cfg`

Check warning on line 359 in eyre/src/lib.rs

View workflow job for this annotation

GitHub Actions / Test Suite (nightly, --no-default-features)

unexpected `cfg` condition name: `doc_cfg`
#![allow(
clippy::needless_doctest_main,
clippy::new_ret_no_self,
Expand Down Expand Up @@ -599,8 +599,8 @@
HOOK.set(hook).map_err(|_| InstallError)
}

#[cfg_attr(track_caller, track_caller)]

Check warning on line 602 in eyre/src/lib.rs

View workflow job for this annotation

GitHub Actions / Test Suite (beta, --no-default-features --features auto-install)

unexpected `cfg` condition name: `track_caller`

Check warning on line 602 in eyre/src/lib.rs

View workflow job for this annotation

GitHub Actions / Test Suite (beta)

unexpected `cfg` condition name: `track_caller`

Check warning on line 602 in eyre/src/lib.rs

View workflow job for this annotation

GitHub Actions / Test Suite (beta, --no-default-features)

unexpected `cfg` condition name: `track_caller`

Check warning on line 602 in eyre/src/lib.rs

View workflow job for this annotation

GitHub Actions / Test Suite (beta, --all-features)

unexpected `cfg` condition name: `track_caller`

Check warning on line 602 in eyre/src/lib.rs

View workflow job for this annotation

GitHub Actions / Test Suite (beta, --features pyo3)

unexpected `cfg` condition name: `track_caller`

Check warning on line 602 in eyre/src/lib.rs

View workflow job for this annotation

GitHub Actions / Test Suite (beta, --no-default-features --features track-caller)

unexpected `cfg` condition name: `track_caller`

Check warning on line 602 in eyre/src/lib.rs

View workflow job for this annotation

GitHub Actions / Miri

unexpected `cfg` condition name: `track_caller`

Check warning on line 602 in eyre/src/lib.rs

View workflow job for this annotation

GitHub Actions / Test Suite (nightly)

unexpected `cfg` condition name: `track_caller`

Check warning on line 602 in eyre/src/lib.rs

View workflow job for this annotation

GitHub Actions / Test Suite (nightly, --features pyo3)

unexpected `cfg` condition name: `track_caller`

Check warning on line 602 in eyre/src/lib.rs

View workflow job for this annotation

GitHub Actions / Test Suite (nightly, --no-default-features --features track-caller)

unexpected `cfg` condition name: `track_caller`

Check warning on line 602 in eyre/src/lib.rs

View workflow job for this annotation

GitHub Actions / Test Suite (nightly, --all-features)

unexpected `cfg` condition name: `track_caller`

Check warning on line 602 in eyre/src/lib.rs

View workflow job for this annotation

GitHub Actions / Test Suite (nightly, --no-default-features --features auto-install)

unexpected `cfg` condition name: `track_caller`

Check warning on line 602 in eyre/src/lib.rs

View workflow job for this annotation

GitHub Actions / Test Suite (nightly, --no-default-features)

unexpected `cfg` condition name: `track_caller`
#[cfg_attr(not(track_caller), allow(unused_mut))]

Check warning on line 603 in eyre/src/lib.rs

View workflow job for this annotation

GitHub Actions / Test Suite (beta, --no-default-features --features auto-install)

unexpected `cfg` condition name: `track_caller`

Check warning on line 603 in eyre/src/lib.rs

View workflow job for this annotation

GitHub Actions / Test Suite (beta)

unexpected `cfg` condition name: `track_caller`

Check warning on line 603 in eyre/src/lib.rs

View workflow job for this annotation

GitHub Actions / Test Suite (beta, --no-default-features)

unexpected `cfg` condition name: `track_caller`

Check warning on line 603 in eyre/src/lib.rs

View workflow job for this annotation

GitHub Actions / Test Suite (beta, --all-features)

unexpected `cfg` condition name: `track_caller`

Check warning on line 603 in eyre/src/lib.rs

View workflow job for this annotation

GitHub Actions / Test Suite (beta, --features pyo3)

unexpected `cfg` condition name: `track_caller`

Check warning on line 603 in eyre/src/lib.rs

View workflow job for this annotation

GitHub Actions / Test Suite (beta, --no-default-features --features track-caller)

unexpected `cfg` condition name: `track_caller`

Check warning on line 603 in eyre/src/lib.rs

View workflow job for this annotation

GitHub Actions / Test Suite (nightly)

unexpected `cfg` condition name: `track_caller`

Check warning on line 603 in eyre/src/lib.rs

View workflow job for this annotation

GitHub Actions / Test Suite (nightly, --features pyo3)

unexpected `cfg` condition name: `track_caller`

Check warning on line 603 in eyre/src/lib.rs

View workflow job for this annotation

GitHub Actions / Test Suite (nightly, --no-default-features --features track-caller)

unexpected `cfg` condition name: `track_caller`

Check warning on line 603 in eyre/src/lib.rs

View workflow job for this annotation

GitHub Actions / Test Suite (nightly, --all-features)

unexpected `cfg` condition name: `track_caller`

Check warning on line 603 in eyre/src/lib.rs

View workflow job for this annotation

GitHub Actions / Test Suite (nightly, --no-default-features --features auto-install)

unexpected `cfg` condition name: `track_caller`

Check warning on line 603 in eyre/src/lib.rs

View workflow job for this annotation

GitHub Actions / Test Suite (nightly, --no-default-features)

unexpected `cfg` condition name: `track_caller`
fn capture_handler(error: &(dyn StdError + 'static)) -> Box<dyn EyreHandler> {
#[cfg(not(feature = "auto-install"))]
let hook = HOOK
Expand Down
Loading