Replies: 2 comments
-
Apologies for the delayed response. I converted this to a discussion and will bring this up with the team. I think the chances of this being prioritised in the near future are low given the relative obscurity of worktrees but it is something we'd like to be aware of. Thanks for taking the time to write this up! |
Beta Was this translation helpful? Give feedback.
0 replies
-
Would creating a symbolic link at |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
What version of Turborepo are you using?
1.10.1
What package manager are you using / does the bug impact?
npm, pnpm, Yarn v1, Yarn v2/v3 (node_modules linker only)
What operating system are you using?
Mac
Describe the Bug
When using git worktree workflows, any packages built in a linked worktree will produce an initial cache miss, even if the package has previously been built & cached in the main worktree, despite the hashing being exactly the same.
Git worktrees allows multiple branches to be simultaneously checked out--and even running servers--all within the same repo, which can be critically important to an optimized CICD workflow, or even a multi-user cloud IDE environment. They do require different pathing from the main worktree, which is likely causing the cache miss.
We consider this critical functionality, because every branch created as a linked worktree cannot leverage turbo repo. The work around is creating multiple clones of a single repo for every active branch that requires work or running servers.
Expected Behavior
After packages have been successfully cached from a linked or main worktree, further package builds with matching hashes should produce hits.
To Reproduce
Create Turborepo & Link Remote Cache:
Build twice to produce a cache hit:
Output on second build:
Checkout the current branch as a linked worktree:
Build from the linked worktree:
Output:
Reproduction Repo
No response
Beta Was this translation helpful? Give feedback.
All reactions