From 14a2a5aa13fdaf6fd726dec2a15f6e117aeda530 Mon Sep 17 00:00:00 2001 From: "Jamil Lambert, PhD" Date: Fri, 16 Jan 2026 14:33:45 +0000 Subject: [PATCH 1/3] Add a latest feature to node integration_test Add a feature `latest` to node and integration_test that is the most recent version of bitcoind. --- integration_test/Cargo.toml | 2 ++ node/Cargo.toml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/integration_test/Cargo.toml b/integration_test/Cargo.toml index 747e4d34..96e2e39d 100644 --- a/integration_test/Cargo.toml +++ b/integration_test/Cargo.toml @@ -13,6 +13,8 @@ edition = "2021" [features] download = ["node/download"] +latest = ["30_0"] + # Enable the same feature in `node` and the version feature here. # All minor releases of the latest four versions. 30_0 = ["v30_and_below", "node/30_0"] diff --git a/node/Cargo.toml b/node/Cargo.toml index 01f68756..60923455 100644 --- a/node/Cargo.toml +++ b/node/Cargo.toml @@ -44,6 +44,8 @@ default = ["0_17_2"] download = ["anyhow", "bitcoin_hashes", "flate2", "tar", "bitreq", "zip"] +latest = ["30_0"] + # We support all minor releases of the latest four versions. 30_0 = ["29_0"] 29_0 = ["28_2"] From c2298f1a8ebfab1ff9d29bc1ea4a11499c50b32f Mon Sep 17 00:00:00 2001 From: "Jamil Lambert, PhD" Date: Fri, 16 Jan 2026 14:48:59 +0000 Subject: [PATCH 2/3] Add all-features and specific features to justfile Change the justfile so that there are now two cases: - first are all the crates that can be build with --all-features, - second is the list of crates that cannot and are instead built only with the specified features. node and integration_test are build with the "latest" feature only. --- justfile | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/justfile b/justfile index 4849b552..30db50f8 100644 --- a/justfile +++ b/justfile @@ -2,6 +2,13 @@ set export REPO_DIR := `git rev-parse --show-toplevel` +# Targets where `--all-features` is used. +ALL_FEATURE_CRATES := "bitreq client fuzz jsonrpc types verify" + +# Targets with conflicting features and only `SPECIFIC_FEATURES` are used. +SPECIFIC_FEATURES_CRATES := "integration_test node" +SPECIFIC_FEATURES := "latest" + alias ulf := update-lock-files alias l := lint alias li := lint-integration-tests @@ -12,15 +19,21 @@ default: # Cargo build everything. build: - cargo build --workspace --all-targets --all-features + for crate in {{ALL_FEATURE_CRATES}}; do cargo build --manifest-path "$REPO_DIR/$crate/Cargo.toml" --all-targets --all-features; done + + for crate in {{SPECIFIC_FEATURES_CRATES}}; do cargo build --manifest-path "$REPO_DIR/$crate/Cargo.toml" --all-targets --no-default-features --features={{SPECIFIC_FEATURES}}; done # Cargo check everything. check: - cargo check --workspace --all-targets --all-features + for crate in {{ALL_FEATURE_CRATES}}; do cargo check --manifest-path "$REPO_DIR/$crate/Cargo.toml" --all-targets --all-features; done + + for crate in {{SPECIFIC_FEATURES_CRATES}}; do cargo check --manifest-path "$REPO_DIR/$crate/Cargo.toml" --all-targets --no-default-features --features={{SPECIFIC_FEATURES}}; done # Lint everything. lint: lint-verify lint-integration-tests - cargo +$(cat ./nightly-version) clippy --workspace --all-targets --all-features -- --deny warnings + for crate in {{ALL_FEATURE_CRATES}}; do cargo +$(cat ./nightly-version) clippy --manifest-path "$REPO_DIR/$crate/Cargo.toml" --all-targets --all-features -- --deny warnings; done + + for crate in {{SPECIFIC_FEATURES_CRATES}}; do cargo +$(cat ./nightly-version) clippy --manifest-path "$REPO_DIR/$crate/Cargo.toml" --all-targets --no-default-features --features={{SPECIFIC_FEATURES}} -- --deny warnings; done lint-verify: $REPO_DIR/contrib/lint-verify.sh @@ -40,7 +53,9 @@ format: # Generate documentation. docsrs *flags: - RUSTDOCFLAGS="--cfg docsrs -D warnings -D rustdoc::broken-intra-doc-links" cargo +$(cat ./nightly-version) doc --all-features {{flags}} + for crate in {{ALL_FEATURE_CRATES}}; do RUSTDOCFLAGS="--cfg docsrs -D warnings -D rustdoc::broken-intra-doc-links" cargo +$(cat ./nightly-version) doc --manifest-path "$REPO_DIR/$crate/Cargo.toml" --all-features {{flags}}; done + + for crate in {{SPECIFIC_FEATURES_CRATES}}; do RUSTDOCFLAGS="--cfg docsrs -D warnings -D rustdoc::broken-intra-doc-links" cargo +$(cat ./nightly-version) doc --manifest-path "$REPO_DIR/$crate/Cargo.toml" --no-default-features --features={{SPECIFIC_FEATURES}} {{flags}}; done # Update the recent and minimal lock files. update-lock-files: From 7607b0a25fd3b4de0cda3889a5ad0c0f310f8db6 Mon Sep 17 00:00:00 2001 From: "Jamil Lambert, PhD" Date: Fri, 16 Jan 2026 15:52:46 +0000 Subject: [PATCH 3/3] update-lock-files with all or specific features Change update-lock-file script so that there are now two cases: - first are all the crates that can be build with --all-features, - second is the list of crates that cannot and are instead built only with the specified features. node and integration_test are build with the "latest" feature only. --- contrib/update-lock-files.sh | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/contrib/update-lock-files.sh b/contrib/update-lock-files.sh index 4c8b861e..f0a68c90 100755 --- a/contrib/update-lock-files.sh +++ b/contrib/update-lock-files.sh @@ -4,8 +4,27 @@ set -euo pipefail +REPO_DIR="$(git rev-parse --show-toplevel)" + +# Targets where `--all-features` is used. +ALL_FEATURE_CRATES=(bitreq client fuzz jsonrpc types verify) + +# Targets with conflicting features and only speficic features are used. +SPECIFIC_FEATURES_CRATES=(integration_test node) +SPECIFIC_FEATURES=(latest) + +update_lock_files() { + for crate in "${ALL_FEATURE_CRATES[@]}"; do + cargo check --manifest-path "$REPO_DIR/$crate/Cargo.toml" --all-features + done + + for crate in "${SPECIFIC_FEATURES_CRATES[@]}"; do + cargo check --manifest-path "$REPO_DIR/$crate/Cargo.toml" --no-default-features --features="${SPECIFIC_FEATURES[*]}" + done +} + for file in Cargo-minimal.lock Cargo-recent.lock; do cp --force "$file" Cargo.lock - cargo check --all-features + update_lock_files cp --force Cargo.lock "$file" done