Skip to content
This repository was archived by the owner on Jan 22, 2025. It is now read-only.

Commit eff2c65

Browse files
committed
Move cargo hack check to proper place
1 parent e0b0759 commit eff2c65

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

ci/test-checks.sh

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -31,21 +31,6 @@ EOF
3131

3232
_ cargo "+${rust_nightly}" install cargo-hack --locked
3333

34-
# Detect possible compilation errors of problematic usage of `dev-utils`-gated code
35-
# without being explicitly declared as such in respctive workspace member
36-
# `Cargo.toml`s. This cannot be detected with `--workspace --all-targets`, due
37-
# to unintentional `dev-utils` feature activation by cargo's feature
38-
# unification mechanism.
39-
# So, we use `cargo hack` to exhaustively build each individual workspace
40-
# members in isolation to work aournd.
41-
42-
# Check implicit usage of `dev-utils`-gated code in non-dev (= production) code by
43-
# buidling without dev dependencies (= tests/benches) for each crate
44-
_ cargo "+${rust_nightly}" hack check --bins
45-
# Check implicit usage of `dev-utils`-gated code in dev (= test/benches) code by
46-
# building in isolation from other crates, which might happen to enable `dev-utils`
47-
_ cargo "+${rust_nightly}" hack check --all-targets
48-
4934
echo --- build environment
5035
(
5136
set -x
@@ -129,6 +114,21 @@ else
129114
_ scripts/cargo-for-all-lock-files.sh -- "+${rust_nightly}" sort --workspace --check
130115
fi
131116

117+
# Detect possible compilation errors of problematic usage of `dev-utils`-gated code
118+
# without being explicitly declared as such in respctive workspace member
119+
# `Cargo.toml`s. This cannot be detected with `--workspace --all-targets`, due
120+
# to unintentional `dev-utils` feature activation by cargo's feature
121+
# unification mechanism.
122+
# So, we use `cargo hack` to exhaustively build each individual workspace
123+
# members in isolation to work aournd.
124+
125+
# Check implicit usage of `dev-utils`-gated code in non-dev (= production) code by
126+
# buidling without dev dependencies (= tests/benches) for each crate
127+
_ cargo "+${rust_nightly}" hack check --bins
128+
# Check implicit usage of `dev-utils`-gated code in dev (= test/benches) code by
129+
# building in isolation from other crates, which might happen to enable `dev-utils`
130+
_ cargo "+${rust_nightly}" hack check --all-targets
131+
132132
_ scripts/cargo-for-all-lock-files.sh -- "+${rust_nightly}" fmt --all -- --check
133133

134134
_ ci/do-audit.sh

0 commit comments

Comments
 (0)