What package manager are you using / does the bug impact?
Yarn v1
What operating system are you using?
Mac
Describe the Bug
When running a command like turbo run test, I would expect it to build the graph of tasks to run based on packages that actually define a test task. Instead, it seems like it assumes that all packages contain that task which results in needlessly running all tasks that would be dependencies.
In the case of the reproducer below, only the bar package contains a test script with a dependency on foo. The build task in baz was executed despite the output of it not being required for executing the requested tasks.
Expected Behavior
Only packages that actually contain the tasks to run should be considered when building the task graph.
Since only bar has a test script, I expected to see the build task from foo and bar run followed by the test task from bar. The build task of baz runs despite it having no test task and it not being a dependency of either of the other packages.
Here's an image of the graph that's generated from running turbo run test --graph
Note that the both the foo and baz tasks contain a node for the test task despite not actually defining a test task in package.json.
What version of Turborepo are you using?
1.1.9
What package manager are you using / does the bug impact?
Yarn v1
What operating system are you using?
Mac
Describe the Bug
When running a command like
turbo run test
, I would expect it to build the graph of tasks to run based on packages that actually define atest
task. Instead, it seems like it assumes that all packages contain that task which results in needlessly running all tasks that would be dependencies.In the case of the reproducer below, only the
bar
package contains atest
script with a dependency onfoo
. Thebuild
task in baz was executed despite the output of it not being required for executing the requested tasks.Expected Behavior
Only packages that actually contain the tasks to run should be considered when building the task graph.
To Reproduce
yarn install
yarn reproduce
Since only
bar
has atest
script, I expected to see thebuild
task fromfoo
andbar
run followed by thetest
task frombar
. Thebuild
task ofbaz
runs despite it having notest
task and it not being a dependency of either of the other packages.Here's an image of the graph that's generated from running
turbo run test --graph
Note that the both the
foo
andbaz
tasks contain a node for thetest
task despite not actually defining atest
task in package.json.