From b088f395dc9ba327050428e606acb7ec4256e44c Mon Sep 17 00:00:00 2001 From: Stefan Holderbach Date: Thu, 18 Apr 2024 16:33:41 +0200 Subject: [PATCH] Update crate feature flags (#12566) # Description Remove unused/effect-less features, make sure we show all relevant features in `version` # User-Facing Changes - **Remove unused feature `wasi`** - will cause failure to build should you enable it. Otherwise no effect - **Include feat `system-clipboard` in `version`** --- Cargo.toml | 7 +++++-- crates/nu-cmd-lang/Cargo.toml | 2 +- crates/nu-cmd-lang/src/core_commands/version.rs | 4 ++-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index ee4062fcb9..bd616d8b3e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -239,7 +239,6 @@ default-no-clipboard = [ "mimalloc", ] stable = ["default"] -wasi = ["nu-cmd-lang/wasi"] # NOTE: individual features are also passed to `nu-cmd-lang` that uses them to generate the feature matrix in the `version` command # Enable to statically link OpenSSL (perl is required, to build OpenSSL https://docs.rs/openssl/latest/openssl/); @@ -247,7 +246,11 @@ wasi = ["nu-cmd-lang/wasi"] static-link-openssl = ["dep:openssl", "nu-cmd-lang/static-link-openssl"] mimalloc = ["nu-cmd-lang/mimalloc", "dep:mimalloc"] -system-clipboard = ["reedline/system_clipboard", "nu-cli/system-clipboard"] +system-clipboard = [ + "reedline/system_clipboard", + "nu-cli/system-clipboard", + "nu-cmd-lang/system-clipboard", +] # Stable (Default) which-support = ["nu-command/which-support", "nu-cmd-lang/which-support"] diff --git a/crates/nu-cmd-lang/Cargo.toml b/crates/nu-cmd-lang/Cargo.toml index 8030986671..843dfd557f 100644 --- a/crates/nu-cmd-lang/Cargo.toml +++ b/crates/nu-cmd-lang/Cargo.toml @@ -30,4 +30,4 @@ trash-support = [] sqlite = [] dataframe = [] static-link-openssl = [] -wasi = [] +system-clipboard = [] diff --git a/crates/nu-cmd-lang/src/core_commands/version.rs b/crates/nu-cmd-lang/src/core_commands/version.rs index a8d6c4f21f..ae70ec0dd8 100644 --- a/crates/nu-cmd-lang/src/core_commands/version.rs +++ b/crates/nu-cmd-lang/src/core_commands/version.rs @@ -180,9 +180,9 @@ fn features_enabled() -> Vec { names.push("static-link-openssl".to_string()); } - #[cfg(feature = "wasi")] + #[cfg(feature = "system-clipboard")] { - names.push("wasi".to_string()); + names.push("system-clipboard".to_string()); } names.sort();