Replies: 5 comments 3 replies
-
|
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.
-
|
Would creating a symbolic link at |
Beta Was this translation helpful? Give feedback.
-
|
I'd like to bump this discussion. Worktrees are basically an impossible-to-ignore part of my workflow now with claude code and I'd really like a workaround. I haven't tried symbolic linking but I'd worry about conflicts as I work on multiple worktrees at a time. |
Beta Was this translation helpful? Give feedback.
-
|
This should be solvable by using a global cache in the user's directory. Even though turbo really doesn't want me to use a |
Beta Was this translation helpful? Give feedback.
-
|
Just want to drop a line to say this will be somewhere in the next handful of releases. I will notify here when folks can try it out. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
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