fix(tasks): resolve :task patterns in run blocks for monorepo tasks #6682
+42
β2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Ref: #6681
Fixes issue where tasks using
run = { task = ":hello" }syntax would fail to resolve local task references in monorepo projects.Problem:
When a monorepo project task used
:tasksyntax in arunblock to reference another local task, the pattern wasn't being resolved before execution, causing the error:For example:
Root Cause:
The
exec_task_run_entriesfunction inrun.rswas not resolving:taskpatterns before callinginject_and_wait. While theresolve_task_patternfunction existed and was used fordependsblocks, it wasn't being applied torunblocks.Solution:
Apply
resolve_task_pattern()to task references in bothRunEntry::SingleTaskandRunEntry::TaskGroupvariants before injecting them into the task scheduler. This resolves:taskpatterns relative to the parent task's monorepo path.Changes:
src/cli/run.rs: Updatedexec_task_run_entries()to resolve patterns in both single task and task group run entriese2e/tasks/test_task_monorepo_run_project_local_tasks: New test validating :task resolution in run blocksTest plan
test_task_monorepo_run_project_local_tasksvalidates the fixFixes: #6681
π€ Generated with Claude Code