Skip to content

Commit b8b7fdf

Browse files
committed
Fix build to avoid conflicting version features
The previous build configuration used `--all-features` at the workspace level, which caused conflicts with mutually exclusive version features in the node and integration_test crates (e.g., v29_0, v28_2, etc.).
1 parent 3565c7f commit b8b7fdf

File tree

2 files changed

+28
-5
lines changed

2 files changed

+28
-5
lines changed

contrib/update-lock-files.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@ set -euo pipefail
66

77
for file in Cargo-minimal.lock Cargo-recent.lock; do
88
cp --force "$file" Cargo.lock
9-
cargo check --all-features
9+
# Build each crate individually to avoid conflicting features
10+
(cd client && cargo check --all-features)
11+
(cd types && cargo check --all-features)
12+
(cd jsonrpc && cargo check --all-features)
13+
(cd node && cargo check --features=29_0)
14+
# verify crate is excluded from workspace, handle separately
15+
(cd verify && cargo check)
16+
# Skip integration_test as it cannot use --all-features
1017
cp --force Cargo.lock "$file"
1118
done

justfile

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,27 @@ default:
1212

1313
# Cargo build everything.
1414
build:
15-
cargo build --workspace --all-targets --all-features
15+
cargo build -p corepc-client --all-targets --all-features
16+
cargo build -p corepc-types --all-targets --all-features
17+
cargo build -p jsonrpc --all-targets --all-features
18+
cargo build -p corepc-node --all-targets --features=29_0
19+
(cd verify && cargo build --all-targets)
1620

1721
# Cargo check everything.
1822
check:
19-
cargo check --workspace --all-targets --all-features
23+
cargo check -p corepc-client --all-targets --all-features
24+
cargo check -p corepc-types --all-targets --all-features
25+
cargo check -p jsonrpc --all-targets --all-features
26+
cargo check -p corepc-node --all-targets --features=29_0
27+
(cd verify && cargo check --all-targets)
2028

2129
# Lint everything.
2230
lint: lint-verify lint-integration-tests
23-
cargo +$(cat ./nightly-version) clippy --workspace --all-targets --all-features -- --deny warnings
31+
cargo +$(cat ./nightly-version) clippy -p corepc-client --all-targets --all-features -- --deny warnings
32+
cargo +$(cat ./nightly-version) clippy -p corepc-types --all-targets --all-features -- --deny warnings
33+
cargo +$(cat ./nightly-version) clippy -p jsonrpc --all-targets --all-features -- --deny warnings
34+
cargo +$(cat ./nightly-version) clippy -p corepc-node --all-targets --features=29_0 -- --deny warnings
35+
(cd verify && cargo +$(cat ../nightly-version) clippy --all-targets -- --deny warnings)
2436

2537
lint-verify:
2638
$REPO_DIR/contrib/lint-verify.sh
@@ -40,7 +52,11 @@ format:
4052

4153
# Generate documentation.
4254
docsrs *flags:
43-
RUSTDOCFLAGS="--cfg docsrs -D warnings -D rustdoc::broken-intra-doc-links" cargo +$(cat ./nightly-version) doc --all-features {{flags}}
55+
RUSTDOCFLAGS="--cfg docsrs -D warnings -D rustdoc::broken-intra-doc-links" cargo +$(cat ./nightly-version) doc -p corepc-client --all-features {{flags}}
56+
RUSTDOCFLAGS="--cfg docsrs -D warnings -D rustdoc::broken-intra-doc-links" cargo +$(cat ./nightly-version) doc -p corepc-types --all-features {{flags}}
57+
RUSTDOCFLAGS="--cfg docsrs -D warnings -D rustdoc::broken-intra-doc-links" cargo +$(cat ./nightly-version) doc -p jsonrpc --all-features {{flags}}
58+
RUSTDOCFLAGS="--cfg docsrs -D warnings -D rustdoc::broken-intra-doc-links" cargo +$(cat ./nightly-version) doc -p corepc-node --features=29_0 {{flags}}
59+
(cd verify && RUSTDOCFLAGS="--cfg docsrs -D warnings -D rustdoc::broken-intra-doc-links" cargo +$(cat ../nightly-version) doc {{flags}})
4460

4561
# Update the recent and minimal lock files.
4662
update-lock-files:

0 commit comments

Comments
 (0)