Tasks should run dependsOn
before hashing inputs
#8051
Labels
kind: bug
Something isn't working
needs: team input
Filter for core team meetings
owned-by: turborepo
Verify canary release
Link to code that reproduces this issue
https://github.com/JavaScriptBach/turbo-caching-bug
What package manager are you using / does the bug impact?
Yarn v2/v3/v4 (node_modules linker only)
What operating system are you using?
Linux
Which canary version will you have in your reproduction?
1.13.3-canary.4
Describe the Bug
If I have a task A whose input is a generated file produced by another task B, I have to Turbo task A twice before it gets cached.
What I think is happening
I think it's because on the first invocation:
On second invocation:
Why I think it's a bug
In order to obtain correct caching behavior, I currently have to exclude all generated files from the input. This is non-intuitive because the generated files are conceptually inputs to my task. Furthermore, I've already told Turbo that it depends on my codegen task.
It would be nice for Turbo to handle this, perhaps by running all dependsOn tasks before hashing the inputs to the original task?
Expected Behavior
Everything is cached after running Turbo once.
To Reproduce
See the linked repo.
Additional context
No response
The text was updated successfully, but these errors were encountered: