Skip to content

Commit

Permalink
Rollup merge of #135146 - Zalathar:anyhow-backtrace, r=jieyouxu
Browse files Browse the repository at this point in the history
Don't enable anyhow's `backtrace` feature in opt-dist

As of the stabilization of `std::backtrace` in Rust 1.65, this package flag has no effect other than to enable an unused dependency on the `backtrace` crate.

(See <https://github.com/dtolnay/anyhow/blob/af0937ef72fbaf9784a6c991e029738728d025e2/Cargo.toml#L18-L23>.)

While the presence of this feature in opt-dist doesn't cause other tools (which use anyhow) to actually *build* backtrace, it does affect the global crate graph used for dependency version resolution. After removing this feature, we can use `cargo tree --invert --package backtrace` to see that the only remaining reverse-dependency of backtrace is `color-eyre`, which is used by `ui_test`.
  • Loading branch information
matthiaskrgr authored Jan 6, 2025
2 parents c31a4b9 + 85e0d42 commit 8e2631b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
3 changes: 0 additions & 3 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,6 @@ name = "anyhow"
version = "1.0.95"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "34ac096ce696dc2fcabef30516bb13c0a68a11d30131d3df6f04711467681b04"
dependencies = [
"backtrace",
]

[[package]]
name = "ar_archive_writer"
Expand Down
2 changes: 1 addition & 1 deletion src/tools/opt-dist/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ edition = "2021"
build_helper = { path = "../../build_helper" }
env_logger = "0.11"
log = "0.4"
anyhow = { version = "1", features = ["backtrace"] }
anyhow = "1"
humantime = "2"
humansize = "2"
sysinfo = { version = "0.31.2", default-features = false, features = ["disk"] }
Expand Down

0 comments on commit 8e2631b

Please sign in to comment.