]> Untitled Git - bdk/commitdiff
chore(just): Add `verify-standalone-all` recipe
author志宇 <hello@evanlinjin.me>
Thu, 17 Sep 2026 04:24:09 +0000 (04:24 +0000)
committer志宇 <hello@evanlinjin.me>
Mon, 19 Oct 2026 03:51:19 +0000 (14:51 +1100)
Runs `verify-standalone` with `--all-features` on every publishable
workspace crate, so feature-gated uses of unreleased workspace APIs are
also caught. Stops at the first failure.

Added alias `vsa` for quick access.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
justfile

index 17043f254d75d93b0b9e2cd9a638a25a4ab7200f..e0b1bdbb3213443fde2ec7775d1e39c951908cb2 100644 (file)
--- a/justfile
+++ b/justfile
@@ -5,6 +5,7 @@ alias t := test
 alias p := pre-push
 alias d := doc
 alias vs := verify-standalone
+alias vsa := verify-standalone-all
 
 _default:
   @just --list
@@ -118,3 +119,44 @@ verify-standalone crate *args:
     cargo build --locked "$@"
 
     echo "✅ $CRATE builds successfully in isolation!"
+
+# Verify all publishable crates can be built standalone (with --all-features)
+[positional-arguments]
+verify-standalone-all *args:
+    #!/usr/bin/env bash
+    set -euo pipefail
+
+    command -v jq >/dev/null 2>&1 || { echo "Error: jq is required but not installed" >&2; exit 1; }
+
+    # Get all publishable workspace crates (examples should set `publish = false`)
+    CRATES=$(cargo metadata --format-version 1 --no-deps | jq -r '.packages[] | select(.publish != []) | .name' | sort)
+
+    if [ -z "$CRATES" ]; then
+        echo "Error: no publishable crates found via cargo metadata" >&2
+        exit 1
+    fi
+
+    echo "Verifying all publishable crates can build standalone..."
+    echo "Crates to verify:"
+    echo "$CRATES" | sed 's/^/  - /'
+    echo
+
+    for crate in $CRATES; do
+        echo "========================================="
+        echo "Verifying $crate..."
+        echo "========================================="
+
+        if ! "{{just_executable()}}" verify-standalone "$crate" --all-features "$@"; then
+            echo "❌ $crate: FAILED"
+            echo "========================================="
+            echo "❌ VERIFICATION FAILED for: $crate"
+            echo "========================================="
+            exit 1
+        fi
+        echo "✅ $crate: SUCCESS"
+        echo
+    done
+
+    echo "========================================="
+    echo "✅ All crates build successfully in isolation!"
+    echo "========================================="