Make roaming an opt-in goose-cli feature (default-off, stays in-tree) (#11516)

Signed-off-by: Michael Neale <michael.neale@gmail.com>
Co-authored-by: Michael Neale <14976+michaelneale@users.noreply.github.com>
Co-authored-by: pstayets <philip@vulturelabs.com>
Co-authored-by: pstayet <philipstayetski2416@gmail.com>
Co-authored-by: Colin Gauvin <colin@gauvin.id>
This commit is contained in:
Michael Neale
2026-08-25 07:22:46 +00:00
committed by GitHub
parent f1d32e8dbb
commit bcbf3c7723
40 changed files with 7327 additions and 102 deletions
+24
View File
@@ -0,0 +1,24 @@
#!/usr/bin/env bash
# v8-goose downloads a prebuilt librusty_v8 archive into target/<profile>/gn_out
# and emits a rustc-link-search pointing at it. Cargo caches that build script
# output and replays it on later builds instead of re-running the script, but
# the Rust cache action prunes target/ before saving, so a restored cache can
# keep the replayed link-search while the 131MB archive is gone. Linking then
# fails with "could not find native static library `rusty_v8`".
#
# Drop the cached build script output whenever a directory it advertises is
# missing, which forces the script to re-run and download the archive again.
set -euo pipefail
[ -d target ] || exit 0
find target -type f -path '*/build/v8-goose-*/output' -print0 |
while IFS= read -r -d '' output; do
while IFS= read -r dir; do
[ -n "$dir" ] || continue
[ -d "$dir" ] && continue
echo "v8-goose build output references missing $dir; forcing a rebuild"
rm -rf "$(dirname "$output")"
break
done < <(sed -n 's/^cargo:rustc-link-search=\(.*\)$/\1/p' "$output")
done