Skip to content

tools/run.py --parallel runs the full project list once per project #347

@aspizu

Description

@aspizu

Repro

tmp=$(mktemp -d /tmp/goboscript-run-parallel-XXXXXX)
for name in one two; do
  mkdir "$tmp/$name"
  printf 'costumes "blank.svg";\n\n' > "$tmp/$name/stage.gs"
  printf '<svg xmlns="http://www.w3.org/2000/svg" width="1" height="1"></svg>\n' > "$tmp/$name/blank.svg"
  cargo run --quiet -- build "$tmp/$name"
done

tmpbin=$(mktemp -d /tmp/goboscript-fake-parallel-XXXXXX)
log="$tmp/parallel.log"
printf '#!/bin/sh\nprintf "%%s\\n" "$*" >> %s\nexit 0\n' "$log" > "$tmpbin/parallel"
chmod +x "$tmpbin/parallel"
PATH="$tmpbin:$PATH" uv run tools/run.py --parallel "$tmp/one" "$tmp/two"
cat "$log"

Observed:

target/debug/goboscript build {} ::: /tmp/.../one /tmp/.../two
target/debug/goboscript build {} ::: /tmp/.../one /tmp/.../two

tools/run.py iterates for project in args.projects, but in parallel mode each iteration invokes GNU parallel with the entire args.projects list. With N projects, it runs N full batches, so every project is built N times.

Expected

Parallel mode should invoke GNU parallel once for the full project list.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions