-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inconsistent "cache hit" (regression) on v1.6.0+ #2307
Comments
Just thinking out loud here, but Vite generates a temporary file called I wonder if/how this is handled by turbo, and if it could be interfering with the caching fingerprint. By default (i.e. the Are there scenarios that could make this file end up in the caching fingerprint? I don't really know anything about turbo's internals besides what's in the docs, so I can't really answer this. Some discussion on the generated vite file here: vitejs/vite#9470 |
@Joroze can you try adding the Vite file from the previous comment into your |
@ambiguous48 @nathanhammond I don't believe this is the culprit. I don't even see that file getting generated. |
The file is deleted immediately after it's creation. You wouldn't see it unless you're looking for it. If you actually want to see it, run this command, then in another terminal run for i in {1..240}; do ls -lA | grep "vite"; sleep 0.25; done I'm not at all saying this is the actual cause of the issue, just replying as to why you're not seeing the file. |
Thanks! Good to know. Anyways, I already tried including something like |
Are you sure the files get generated in the root? Maybe it needs to be |
Nope, that also does not work. |
Can confirm, rolled back to 1.5.* and caching started working |
What version of Turborepo are you using?
1.6.1
What package manager are you using / does the bug impact?
npm
What operating system are you using?
Mac
Describe the Bug
Figured I'd just report this bug that is occurring again sooner than later.
#2004 (comment)
TLDR: Sporadic cache misses that I've noticed when using Vite with the React Plugin on NPM.
package.json
NPM v8.11.0 (Node v16)
OS/Chip - M2 macOS Monterey v12.6
Expected Behavior
Caching should be 'ol reliable
To Reproduce
Two ways to reproduce:
npm run build
against this kitchen sink example https://github.com/vercel/turborepo/tree/main/examples/kitchen-sink, and you'll notice caching is inconsistent-- (admin workspace specifically because it's already using vite + react plugin)
npm run build
against this vite example but add the react plugin to it beforehand https://github.com/vercel/turborepo/tree/main/examples/with-vite, and you'll notice caching is inconsistentThe text was updated successfully, but these errors were encountered: