From 4a34076b2f2e632cbfa508bf0a2a92d52daa2518 Mon Sep 17 00:00:00 2001 From: Shun Kakinoki Date: Tue, 7 Apr 2026 01:21:41 +0800 Subject: [PATCH 1/3] fix: build --lib only for .rlib targets to skip harness binaries --- scripts/update-local-binaries.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/scripts/update-local-binaries.sh b/scripts/update-local-binaries.sh index bab836014..6cd27b105 100755 --- a/scripts/update-local-binaries.sh +++ b/scripts/update-local-binaries.sh @@ -172,7 +172,14 @@ build_repo() { fi if [ -f "$build_dir/Cargo.toml" ]; then - if (cd "$build_dir" && cargo +nightly build --release 2>&1); then + # If the target is a .rlib, only build the library (avoids compiling all + # test/harness binaries in large workspaces like frankensqlite). + local cargo_flags="--release" + local expanded_bin="${binary_path/#\~/$HOME}" + if [[ "$expanded_bin" == *.rlib ]]; then + cargo_flags="--release --lib" + fi + if (cd "$build_dir" && cargo +nightly build $cargo_flags 2>&1); then return 0 else return 1 From 1bd0516ec2a9d0fc09f10f3a4ad9324b1e57225f Mon Sep 17 00:00:00 2001 From: Shun Kakinoki Date: Tue, 7 Apr 2026 01:26:03 +0800 Subject: [PATCH 2/3] fix: use array for cargo extra flags to satisfy shellcheck and shell-test --- scripts/update-local-binaries.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/update-local-binaries.sh b/scripts/update-local-binaries.sh index 6cd27b105..353287557 100755 --- a/scripts/update-local-binaries.sh +++ b/scripts/update-local-binaries.sh @@ -174,12 +174,12 @@ build_repo() { if [ -f "$build_dir/Cargo.toml" ]; then # If the target is a .rlib, only build the library (avoids compiling all # test/harness binaries in large workspaces like frankensqlite). - local cargo_flags="--release" local expanded_bin="${binary_path/#\~/$HOME}" + local extra_flags=() if [[ "$expanded_bin" == *.rlib ]]; then - cargo_flags="--release --lib" + extra_flags=(--lib) fi - if (cd "$build_dir" && cargo +nightly build $cargo_flags 2>&1); then + if (cd "$build_dir" && cargo +nightly build --release "${extra_flags[@]}" 2>&1); then return 0 else return 1 From fea46287a774bd2c2e8edb7b00e7551487f1d985 Mon Sep 17 00:00:00 2001 From: Shun Kakinoki Date: Tue, 7 Apr 2026 01:45:01 +0800 Subject: [PATCH 3/3] chore: apply formatter --- scripts/update-local-binaries.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/update-local-binaries.sh b/scripts/update-local-binaries.sh index 353287557..982357cf9 100755 --- a/scripts/update-local-binaries.sh +++ b/scripts/update-local-binaries.sh @@ -176,7 +176,7 @@ build_repo() { # test/harness binaries in large workspaces like frankensqlite). local expanded_bin="${binary_path/#\~/$HOME}" local extra_flags=() - if [[ "$expanded_bin" == *.rlib ]]; then + if [[ $expanded_bin == *.rlib ]]; then extra_flags=(--lib) fi if (cd "$build_dir" && cargo +nightly build --release "${extra_flags[@]}" 2>&1); then