fix(taskfiles): Always default to a special JOBS variable for concurrency related variables to simplify user control; Tasks that run the concurrent tools default to nprocs.#117
Conversation
… set by a user for concurrency related variables; Tasks that use the concurrency value default to nprocs.
WalkthroughThis PR adds a ChangesJOBS Concurrency Defaulting
Sequence Diagram(s)sequenceDiagram
participant Caller
participant DownloadAndInstall
participant BuildAndInstall
participant InstallRemoteTar
participant BuildTask
participant GNPROCS
Caller->>DownloadAndInstall: invoke (JOBS optional)
DownloadAndInstall->>BuildAndInstall: forward JOBS
BuildAndInstall->>GNPROCS: default JOBS to G_NPROCS if unset
BuildAndInstall->>BuildAndInstall: run build with resolved JOBS
Caller->>InstallRemoteTar: invoke (CMAKE_JOBS optional)
InstallRemoteTar->>BuildTask: default CMAKE_JOBS to JOBS if unset
BuildTask->>GNPROCS: default JOBS to G_NPROCS if unset
BuildTask->>BuildTask: run cmake build with resolved jobs
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
exports/taskfiles/utils/boost.yaml (1)
154-160: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick winKeep a local
JOBSdefault here.download-and-installnow passes{{.JOBS}}straight through tobuild-and-install; if it’s unset, Task will expand that to<no value>, which prevents the child task’sdefault .G_NPROCS .JOBSfallback from doing its job and can surface as an invalid-jvalue on the default path.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@exports/taskfiles/utils/boost.yaml` around lines 154 - 160, The boost task variables block is missing a local JOBS default, so when download-and-install forwards {{.JOBS}} into build-and-install it can expand to <no value> and bypass the child task’s fallback. Update the variables section in boost.yaml near BUILD_DIR and BUILD_AND_INSTALL_ARGS to define JOBS with a default that falls back to .G_NPROCS when .JOBS is unset, so build-and-install can safely receive a valid jobs value.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In `@exports/taskfiles/utils/boost.yaml`:
- Around line 154-160: The boost task variables block is missing a local JOBS
default, so when download-and-install forwards {{.JOBS}} into build-and-install
it can expand to <no value> and bypass the child task’s fallback. Update the
variables section in boost.yaml near BUILD_DIR and BUILD_AND_INSTALL_ARGS to
define JOBS with a default that falls back to .G_NPROCS when .JOBS is unset, so
build-and-install can safely receive a valid jobs value.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 22618304-b326-4ec4-9998-487ac7d8c79e
📒 Files selected for processing (3)
exports/taskfiles/utils/boost.yamlexports/taskfiles/utils/cmake.yamlexports/taskfiles/utils/misc.yaml
Description
Currently, concurrency variables are not handled consistently so a user cannot easily control the concurrency from the command line. The goal of this PR is to create a consistent flow for users to easily control concurrency in resource limited scenarios.
For example, most tasks use the variable
JOBS, but cmake also has a task that usesCMAKE_JOBSand passes that value as aJOBSargument. If the user setsJOBSit will not be respected by the task usingCMAKE_JOBS. This is further complicated as top-level projects (e.g. CLP) end up using their own ad-hoc variables to control concurrency.With this PR, we define how the default behaviour (no explicit value set) should work for concurrency related variables.
JOBSto respect the user's value.If the concurrency level is explicitly set by a task it will take priority over any user overrides, but this should only be used in niche cases.
Checklist
breaking change.
Validation performed
Manually tested with the boost test and prints.
Summary by CodeRabbit
New Features
Bug Fixes