From 3b917a87e12c8ef97bc52afd3903ac22c082f7b1 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Sun, 16 Nov 2025 03:23:47 -0500 Subject: Fix repl.sh and typecheck.sh to properly parse bild --plan JSON MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The issue was that bild --plan outputs progress indicators before the JSON, causing jq to fail parsing. Fixed by: - Using grep to extract only lines starting with '{' (the JSON output) - This filters out progress lines like '[…] target' - Restored typecheck.sh to use repl.sh for proper environment setup Now typecheck.sh correctly provisions the environment via repl.sh instead of trying to use bild or raw python. --- Omni/Ide/repl.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Omni/Ide/repl.sh') diff --git a/Omni/Ide/repl.sh b/Omni/Ide/repl.sh index d4ff200..ad6bc02 100755 --- a/Omni/Ide/repl.sh +++ b/Omni/Ide/repl.sh @@ -30,7 +30,8 @@ fi shift fi targets="${*:?}" - json=$(bild --plan "${targets[@]}") + # Extract only the JSON line from bild --plan output (skip progress indicators) + json=$(bild --plan "${targets[@]}" 2>&1 | grep -E '^\{') mapfile -t langdeps < <(jq --raw-output '.[].langdeps | select(length > 0) | join("\n")' <<< "$json") mapfile -t sysdeps < <(jq --raw-output '.[].sysdeps | select(length > 0) | join("\n")' <<< "$json") mapfile -t rundeps < <(jq --raw-output '.[].rundeps | select(length > 0) | join("\n")' <<< "$json") -- cgit v1.2.3