From: 志宇 Date: Thu, 17 Sep 2026 04:24:09 +0000 (+0000) Subject: chore(just): Add `verify-standalone-all` recipe X-Git-Url: http://internal-gitweb-vhost/-client-interface/%22https:/src/struct.EncoderStringWriter.html?a=commitdiff_plain;h=eeb69dced18785408b735c64522430a2104b885e;p=bdk chore(just): Add `verify-standalone-all` recipe 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 --- diff --git a/justfile b/justfile index 17043f25..e0b1bdbb 100644 --- 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 "========================================="