From 8838815737076323eda79296b976f9c186da15b5 Mon Sep 17 00:00:00 2001 From: Stefan Holderbach Date: Fri, 28 Oct 2022 01:07:13 +0200 Subject: [PATCH] Update `nix` crate to `0.25` and narrow features (#6924) Avoids compiling the crate twice due to incompatible versions from dependencies. This avoids binary bloat before linking as well. Narrow our feature selection to the used modules/functions to save compile time. On my machine reduces `nix` crate compile time from around 9 secs to 0.9 secs. --- Cargo.lock | 18 +++--------------- Cargo.toml | 2 +- crates/nu-system/Cargo.toml | 2 +- 3 files changed, 5 insertions(+), 17 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 87a2a7a054..6d46eb1dcc 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -891,7 +891,7 @@ version = "3.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1d91974fbbe88ec1df0c24a4f00f99583667a7e2e6272b2b92d294d81e462173" dependencies = [ - "nix 0.25.0", + "nix", "winapi 0.3.9", ] @@ -2408,18 +2408,6 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e4a24736216ec316047a1fc4252e27dabb04218aa4a3f37c6e7ddbf1f9782b54" -[[package]] -name = "nix" -version = "0.24.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "195cdbc1741b8134346d515b3a56a1c94b0912758009cfd53f99ea0f57b065fc" -dependencies = [ - "bitflags", - "cfg-if 1.0.0", - "libc", - "memoffset", -] - [[package]] name = "nix" version = "0.25.0" @@ -2517,7 +2505,7 @@ dependencies = [ "itertools", "log", "miette", - "nix 0.24.2", + "nix", "nu-ansi-term", "nu-cli", "nu-color-config", @@ -2811,7 +2799,7 @@ dependencies = [ "libproc", "log", "mach2", - "nix 0.24.2", + "nix", "ntapi 0.3.7", "once_cell", "procfs", diff --git a/Cargo.toml b/Cargo.toml index bec98450df..d1e3763d59 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -69,7 +69,7 @@ signal-hook = { version = "0.3.14", default-features = false } winres = "0.1" [target.'cfg(target_family = "unix")'.dependencies] -nix = "0.24" +nix = { version = "0.25", default-features = false, features = ["signal", "process", "fs", "term"]} atty = "0.2" [dev-dependencies] diff --git a/crates/nu-system/Cargo.toml b/crates/nu-system/Cargo.toml index f0885f96fb..9e28195820 100644 --- a/crates/nu-system/Cargo.toml +++ b/crates/nu-system/Cargo.toml @@ -18,7 +18,7 @@ libc = "0.2" log = "0.4" [target.'cfg(target_family = "unix")'.dependencies] -nix = "0.24" +nix = { version = "0.25", default-features = false, features = ["fs", "term", "process", "signal"]} atty = "0.2" [target.'cfg(any(target_os = "linux", target_os = "android"))'.dependencies]