Summary
Track a follow-up refactor to move build parallelism computation into a dedicated script instead of routing Taskfile evaluation through components/core/tools/scripts/utils/build-and-run-unit-tests.py.
Rationale
The current implementation works, but the parallelism calculation logic is being reused outside the unit-test utility. Keeping that computation in a dedicated script should make the ownership clearer, reduce coupling between unrelated build paths, and make future updates easier.
Affected areas
taskfile.yaml
components/core/tools/scripts/utils/build-and-run-unit-tests.py
- Any shared build helper introduced for computing max parallel jobs
Proposed changes
- Extract the max-parallelism calculation into a dedicated script with a narrow, reusable interface.
- Update Taskfile and other build entry points to call the dedicated script instead of the unit-test utility.
- Keep the precedence rules and behaviour unchanged unless a deliberate follow-up change is proposed.
Acceptance criteria
- A dedicated script is the single source of truth for computing C++ build parallelism.
taskfile.yaml no longer depends on build-and-run-unit-tests.py for G_CPP_MAX_PARALLELISM_PER_BUILD_TASK.
- Existing override behaviour for
CLP_CPP_MAX_PARALLELISM_PER_BUILD_TASK is preserved.
- Existing memory-aware parallelism behaviour remains covered by validation or tests.
Backlinks
Requested by @jackluo923.
Summary
Track a follow-up refactor to move build parallelism computation into a dedicated script instead of routing Taskfile evaluation through
components/core/tools/scripts/utils/build-and-run-unit-tests.py.Rationale
The current implementation works, but the parallelism calculation logic is being reused outside the unit-test utility. Keeping that computation in a dedicated script should make the ownership clearer, reduce coupling between unrelated build paths, and make future updates easier.
Affected areas
taskfile.yamlcomponents/core/tools/scripts/utils/build-and-run-unit-tests.pyProposed changes
Acceptance criteria
taskfile.yamlno longer depends onbuild-and-run-unit-tests.pyforG_CPP_MAX_PARALLELISM_PER_BUILD_TASK.CLP_CPP_MAX_PARALLELISM_PER_BUILD_TASKis preserved.Backlinks
Requested by @jackluo923.