From e5d573e6876d96b9de2e7b701076dd988f2c92cc Mon Sep 17 00:00:00 2001 From: Marek Date: Tue, 11 Jun 2024 17:59:30 +0200 Subject: [PATCH 1/5] Remove general conditional compilation flags See https://blog.rust-lang.org/2024/05/06/check-cfg.html The conditional compilation flags for tor were superfluous as we can make do fine with using only features. --- zebra-network/src/isolated.rs | 3 +-- zebra-network/src/lib.rs | 6 ++---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/zebra-network/src/isolated.rs b/zebra-network/src/isolated.rs index 62b3eee7a93..c6ca66d53b2 100644 --- a/zebra-network/src/isolated.rs +++ b/zebra-network/src/isolated.rs @@ -16,8 +16,7 @@ use crate::{ // Wait until `arti-client`'s dependency `x25519-dalek v1.2.0` is updated to a higher version. (#5492) // #[cfg(feature = "tor")] -#[cfg(tor)] -pub(crate) mod tor; +// pub(crate) mod tor; #[cfg(test)] mod tests; diff --git a/zebra-network/src/lib.rs b/zebra-network/src/lib.rs index 254f85cde87..9b61224dc14 100644 --- a/zebra-network/src/lib.rs +++ b/zebra-network/src/lib.rs @@ -165,13 +165,11 @@ mod protocol; // Wait until `arti-client`'s dependency `x25519-dalek v1.2.0` is updated to a higher version. (#5492) // #[cfg(feature = "tor")] -#[cfg(tor)] -pub use crate::isolated::tor::connect_isolated_tor; +// pub use crate::isolated::tor::connect_isolated_tor; // Wait until `arti-client`'s dependency `x25519-dalek v1.2.0` is updated to a higher version. (#5492) // #[cfg(all(feature = "tor", any(test, feature = "proptest-impl")))] -#[cfg(tor)] -pub use crate::isolated::tor::connect_isolated_tor_with_inbound; +// pub use crate::isolated::tor::connect_isolated_tor_with_inbound; #[cfg(any(test, feature = "proptest-impl"))] pub use crate::{ From 56d0bf966cbd6d362aadb0613a7e0dab63f21a26 Mon Sep 17 00:00:00 2001 From: Marek Date: Tue, 11 Jun 2024 18:42:39 +0200 Subject: [PATCH 2/5] Update changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ecf031ee39b..50edf28249d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,7 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org). ### Changed - We realized that a longer than `zcashd` end of support could be problematic in some cases so we reverted back from 20 to 16 weeks ([#8530](https://github.com/ZcashFoundation/zebra/pull/8530)) - +- We're no longer using general conditional compilation attributes. ## [Zebra 1.7.0](https://github.com/ZcashFoundation/zebra/releases/tag/v1.7.0) - 2024-05-07 From 58d561ca20dfc34c811a9a2bd0792aa8cb2519e6 Mon Sep 17 00:00:00 2001 From: Marek Date: Tue, 11 Jun 2024 20:07:00 +0200 Subject: [PATCH 3/5] Add `tokio_unstable` to to `unexpected_cfgs` --- tower-batch-control/Cargo.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tower-batch-control/Cargo.toml b/tower-batch-control/Cargo.toml index bfc8a4a15dc..d62a31773cc 100644 --- a/tower-batch-control/Cargo.toml +++ b/tower-batch-control/Cargo.toml @@ -47,3 +47,6 @@ tower-fallback = { path = "../tower-fallback/", version = "0.2.41-beta.13" } tower-test = "0.4.0" zebra-test = { path = "../zebra-test/", version = "1.0.0-beta.37" } + +[lints.rust] +unexpected_cfgs = { level = "warn", check-cfg = ['cfg(tokio_unstable)'] } From 433a6b69b1043bb417c71e6927e60c96be243251 Mon Sep 17 00:00:00 2001 From: Marek Date: Tue, 11 Jun 2024 20:12:42 +0200 Subject: [PATCH 4/5] Update changelog --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 50edf28249d..3f1d5c840ce 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,7 +10,8 @@ and this project adheres to [Semantic Versioning](https://semver.org). ### Changed - We realized that a longer than `zcashd` end of support could be problematic in some cases so we reverted back from 20 to 16 weeks ([#8530](https://github.com/ZcashFoundation/zebra/pull/8530)) -- We're no longer using general conditional compilation attributes. +- We're no longer using general conditional compilation attributes for `tor`, + but only feature flags instead. ## [Zebra 1.7.0](https://github.com/ZcashFoundation/zebra/releases/tag/v1.7.0) - 2024-05-07 From 405a44f8e04abb1b1cfc8c37aaf50a22f4e48ecb Mon Sep 17 00:00:00 2001 From: Marek Date: Tue, 11 Jun 2024 23:11:46 +0200 Subject: [PATCH 5/5] Fix `tokio_unstable` in `zebrad` --- zebrad/Cargo.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/zebrad/Cargo.toml b/zebrad/Cargo.toml index a86d2afe8a2..27bb5273959 100644 --- a/zebrad/Cargo.toml +++ b/zebrad/Cargo.toml @@ -301,3 +301,6 @@ zebra-grpc = { path = "../zebra-grpc", version = "0.1.0-alpha.4" } # https://github.com/rust-lang/cargo/issues/9096 # zebra-utils { path = "../zebra-utils", artifact = "bin:zebra-checkpoints" } zebra-utils = { path = "../zebra-utils", version = "1.0.0-beta.37" } + +[lints.rust] +unexpected_cfgs = { level = "warn", check-cfg = ['cfg(tokio_unstable)'] }