From e77acb8ad90c9671149cd87390e1613e513c0d7a Mon Sep 17 00:00:00 2001 From: Michael Ilyin Date: Mon, 27 Nov 2023 15:01:49 +0000 Subject: [PATCH] tests added, leaking through zenoh-ext fixed --- Cargo.toml | 2 +- zenoh-ext/Cargo.toml | 2 +- zenoh-ext/src/lib.rs | 8 ++++++++ zenohd/Cargo.toml | 2 +- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index a707ab390c..55797ab0d3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -185,7 +185,7 @@ zenoh-link-unixpipe = { version = "0.11.0-dev", path = "io/zenoh-links/zenoh-lin zenoh-link-serial = { version = "0.11.0-dev", path = "io/zenoh-links/zenoh-link-serial" } zenoh-link = { version = "0.11.0-dev", path = "io/zenoh-link" } zenoh-link-commons = { version = "0.11.0-dev", path = "io/zenoh-link-commons" } -zenoh = { version = "0.11.0-dev", path = "zenoh" } +zenoh = { version = "0.11.0-dev", path = "zenoh", default-features = false } [profile.dev] debug = true diff --git a/zenoh-ext/Cargo.toml b/zenoh-ext/Cargo.toml index 26164040db..84c6baf83c 100644 --- a/zenoh-ext/Cargo.toml +++ b/zenoh-ext/Cargo.toml @@ -38,7 +38,7 @@ flume = { workspace = true } futures = { workspace = true } log = { workspace = true } serde = { workspace = true, features = ["default"] } -zenoh = { workspace = true, features = ["unstable"] } +zenoh = { workspace = true, features = ["unstable"], default-features = false } zenoh-core = { workspace = true } zenoh-macros = { workspace = true } zenoh-result = { workspace = true } diff --git a/zenoh-ext/src/lib.rs b/zenoh-ext/src/lib.rs index dca488ba80..395ffac092 100644 --- a/zenoh-ext/src/lib.rs +++ b/zenoh-ext/src/lib.rs @@ -51,3 +51,11 @@ impl From for KeySpace { KeySpace::Liveliness } } + +#[test] +fn test_default_features() { + // make sure that when inporting zenoh-ext with default features, no unwanted features are pulled from zenoh-core + assert_eq!(zenoh::FEATURES, concat!( + " zenoh/unstable", + )); +} \ No newline at end of file diff --git a/zenohd/Cargo.toml b/zenohd/Cargo.toml index e589d1a888..b28a28331b 100644 --- a/zenohd/Cargo.toml +++ b/zenohd/Cargo.toml @@ -37,7 +37,7 @@ git-version = { workspace = true } json5 = { workspace = true } lazy_static = { workspace = true } log = { workspace = true } -zenoh = { workspace = true, features = ["unstable"] } +zenoh = { workspace = true, default-features = true, features = ["unstable"] } [dev-dependencies] rand = { workspace = true, features = ["default"] }