Negated globs in input
property not working when task depends on a same package relationship
#9218
Open
1 task done
Labels
Verify canary release
Link to code that reproduces this issue
https://github.com/breadadams/turborepo-input-negate-bug
What package manager are you using / does the bug impact?
npm
What operating system are you using?
Mac
Which canary version will you have in your reproduction?
2.1.4-canary.1
Describe the Bug
When a task's
dependsOn
includes a "same package relationship", negated globs in theinputs
property don't work - resulting in a cache miss when the negated files are touched.Expected Behavior
If a negated file is touched I'd expect to get a cache hit.
To Reproduce
turbo build
, result: 3 successful | 0 cached.turbo build
, result: 3 successful | 3 cached | FULL TURBO.apps/apps-a/src/foo/bar.test.js
, for example increment the number on L2.turbo build
, result: 3 successful | 1 cached.turbo build
, result: 3 successful | 3 cached | FULL TURBO.In step 4 I'd expect to get 2 cached (
pkg-a
'sbuild
andapp-a
'sbuild
tasks) instead of just 1 (pkg-a
'sbuild
task).I can "solve" it by copying the same
inputs
property from thebuild
task to theprebuild
task (or removing theprebuild
task frombuild
'sdependsOn
property). Although that doesn't seem correct, as it could be that thisprebuild
task depends on the negated files.If the result of
prebuild
were to have changed, thenbuild
should be a cache miss, however that isn't the case.Additional context
No response
The text was updated successfully, but these errors were encountered: