Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions rust-features.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ function feature_does_not_imply() {
echo "📏 Checking that $ENABLED does not imply $STAYS_DISABLED ..."

# Check if the forbidden feature is enabled anywhere in the workspace.
if cargo tree --no-default-features --locked --workspace -e features --features "$ENABLED" | grep -qF "feature \"$STAYS_DISABLED\""; then
# But only check "normal" dependencies, so no "dev" or "build" dependencies.
if cargo tree --no-default-features --locked --workspace -e features,normal --features "$ENABLED" | grep -qF "feature \"$STAYS_DISABLED\""; then
echo "❌ $ENABLED implies $STAYS_DISABLED in the workspace"
else
echo "✅ $ENABLED does not imply $STAYS_DISABLED in the workspace"
Expand All @@ -61,7 +62,7 @@ function feature_does_not_imply() {
echo "🔍 Checking all $NUM_CRATES crates - this takes some time."

for CARGO in $CARGOS; do
OUTPUT=$(cargo tree --no-default-features --locked --offline -e features --features $ENABLED --manifest-path $CARGO 2>&1 || true)
OUTPUT=$(cargo tree --no-default-features --locked --offline -e features,normal --features $ENABLED --manifest-path $CARGO 2>&1 || true)

if echo "$OUTPUT" | grep -qF "not supported for packages in this workspace"; then
# This case just means that the pallet does not support the
Expand Down