From ccb86ea84cc98bd4679f5e1f9a40568ae83fd01b Mon Sep 17 00:00:00 2001 From: Jake Wallin Date: Thu, 15 Oct 2026 05:47:08 +0000 Subject: [PATCH] uucore: build without default features on Unix Make nix a required Unix dependency with signal support and check uucore without default features in isolation. Closes #15339 --- .github/workflows/CICD.yml | 4 ++++ src/uucore/Cargo.toml | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/CICD.yml b/.github/workflows/CICD.yml index 4660b077cd6..6eb76443fe9 100644 --- a/.github/workflows/CICD.yml +++ b/.github/workflows/CICD.yml @@ -195,6 +195,10 @@ jobs: unset CARGO_FEATURES_OPTION if [ -n "${{ matrix.job.features }}" ]; then CARGO_FEATURES_OPTION='--features "${{ matrix.job.features }}"' ; fi outputs CARGO_FEATURES_OPTION + - name: Check uucore without default features + run: | + cargo check -p uucore --no-default-features --lib --locked + cargo check -p uucore --no-default-features --features fs --lib --locked - name: Confirm MinSRV compatible '*/Cargo.lock' shell: bash run: | diff --git a/src/uucore/Cargo.toml b/src/uucore/Cargo.toml index baa3b204cd8..f9f030b4260 100644 --- a/src/uucore/Cargo.toml +++ b/src/uucore/Cargo.toml @@ -106,9 +106,10 @@ dns-lookup = { workspace = true, optional = true } rustix = { workspace = true, optional = true } [target.'cfg(unix)'.dependencies] +# Core error conversions and signal setup use nix even without optional features. +nix = { workspace = true, features = ["signal"] } # utmpx is unix-only, so its dependencies must not be pulled into other targets # (the uptime feature enables utmpx and now builds on windows too). -nix = { workspace = true, optional = true } time = { workspace = true, optional = true, features = [ "formatting", "local-offset",