From 9fac53236f137af29b4ba9fbb75cc5b1948aad3a Mon Sep 17 00:00:00 2001 From: Michal Nazarewicz Date: Fri, 13 Oct 2023 03:07:51 +0200 Subject: [PATCH] Avoid enabling flex-error/eyre_tracer feature MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Don’t enable flex-error/eyre_tracer feature in crates which don’t use eyre directly. This allows customers depend on say tendermint crate without having to pull in eyre crate. This is useful because eyre uses mutable static variables (specifically HOOK variable) which is incompatible with some blockchain runtimes. --- .changelog/unreleased/breaking-changes/eyre_tracer.md | 4 ++++ abci/Cargo.toml | 2 +- light-client-verifier/Cargo.toml | 2 +- light-client/Cargo.toml | 2 +- tendermint/Cargo.toml | 2 +- tools/abci-test/Cargo.toml | 2 +- 6 files changed, 9 insertions(+), 5 deletions(-) create mode 100644 .changelog/unreleased/breaking-changes/eyre_tracer.md diff --git a/.changelog/unreleased/breaking-changes/eyre_tracer.md b/.changelog/unreleased/breaking-changes/eyre_tracer.md new file mode 100644 index 000000000..1f2d36762 --- /dev/null +++ b/.changelog/unreleased/breaking-changes/eyre_tracer.md @@ -0,0 +1,4 @@ +- Don’t enable `flex-error/eyre_tracer` feature in crates which don’t + use eyre directly. If you’re using eyre, and no other crate enables + it, you may need to enable that explicitly. + ([\#1371](https://github.com/informalsystems/tendermint-rs/pull/1371)) diff --git a/abci/Cargo.toml b/abci/Cargo.toml index e2d658bcf..0ae0072fb 100644 --- a/abci/Cargo.toml +++ b/abci/Cargo.toml @@ -21,7 +21,7 @@ path = "src/application/kvstore/main.rs" required-features = [ "binary", "client", "kvstore-app" ] [features] -default = ["flex-error/std", "flex-error/eyre_tracer"] +default = ["flex-error/std"] client = [] echo-app = [] kvstore-app = [] diff --git a/light-client-verifier/Cargo.toml b/light-client-verifier/Cargo.toml index 84150c7ef..ae46d809f 100644 --- a/light-client-verifier/Cargo.toml +++ b/light-client-verifier/Cargo.toml @@ -23,7 +23,7 @@ all-features = true rustdoc-args = ["--cfg", "docsrs"] [features] -default = ["rust-crypto", "flex-error/std", "flex-error/eyre_tracer"] +default = ["rust-crypto", "flex-error/std"] rust-crypto = ["tendermint/rust-crypto"] [dependencies] diff --git a/light-client/Cargo.toml b/light-client/Cargo.toml index 069eaf23a..3acaf1ddd 100644 --- a/light-client/Cargo.toml +++ b/light-client/Cargo.toml @@ -25,7 +25,7 @@ all-features = true rustdoc-args = ["--cfg", "docsrs"] [features] -default = ["rpc-client", "flex-error/std", "flex-error/eyre_tracer"] +default = ["rpc-client", "flex-error/std"] rpc-client = ["tokio", "rust-crypto", "tendermint-rpc/http-client"] rust-crypto = ["tendermint/rust-crypto", "tendermint-light-client-verifier/rust-crypto"] secp256k1 = ["tendermint/secp256k1", "tendermint-rpc/secp256k1"] diff --git a/tendermint/Cargo.toml b/tendermint/Cargo.toml index 489a56cb4..a5754b519 100644 --- a/tendermint/Cargo.toml +++ b/tendermint/Cargo.toml @@ -55,7 +55,7 @@ ripemd = { version = "0.1.3", optional = true, default-features = false } [features] default = ["std", "rust-crypto"] -std = ["flex-error/std", "flex-error/eyre_tracer", "clock"] +std = ["flex-error/std", "clock"] clock = ["time/std"] secp256k1 = ["k256", "ripemd"] rust-crypto = ["sha2", "ed25519-consensus"] diff --git a/tools/abci-test/Cargo.toml b/tools/abci-test/Cargo.toml index a64d03eec..6d3a680a4 100644 --- a/tools/abci-test/Cargo.toml +++ b/tools/abci-test/Cargo.toml @@ -11,7 +11,7 @@ description = """ # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -flex-error = { version = "0.4.4", default-features = false, features = ["std", "eyre_tracer"] } +flex-error = { version = "0.4.4", default-features = false, features = ["std"] } futures = "0.3" structopt = "0.3" tendermint = { version = "0.34.0", path = "../../tendermint" }