Same cache dir between multiple projects errors with parallel usage
See original GitHub issueMy build system creates 3 bundles with rollup. If I build each bundle serially, it succeeds. However, if I build them concurrently (e.g. with make -j4
, gulp
, …), it fails like this:
[19:54:40] Using gulpfile client/gulpfile.js
[19:54:40] Starting 'scripts.foo'...
[19:54:42] Starting 'scripts.bar'...
[19:54:44] Starting 'scripts.baz'...
Error: ENOENT: no such file or directory, open 'client/.rpt2_cache/c96394021b516827cdd67f325bc8e31a9c85a68e/code/cache_/c25c849c2122f988238ef5fb3159bccdcf3167ca'
at error (client/node_modules/rollup/dist/rollup.js:170:12)
at client/node_modules/rollup/dist/rollup.js:8926:6
at process._tickCallback (internal/process/next_tick.js:109:7)
at Module.runMain (module.js:607:11)
at run (bootstrap_node.js:423:7)
at startup (bootstrap_node.js:147:9)
at bootstrap_node.js:538:3
Error: ENOENT: no such file or directory, open 'client/.rpt2_cache/c96394021b516827cdd67f325bc8e31a9c85a68e/code/cache_/fe9b01c7ea2aa0c98e1433b824f39491fdead469'
at error (client/node_modules/rollup/dist/rollup.js:170:12)
at client/node_modules/rollup/dist/rollup.js:8926:6
at process._tickCallback (internal/process/next_tick.js:109:7)
at Module.runMain (module.js:607:11)
at run (bootstrap_node.js:423:7)
at startup (bootstrap_node.js:147:9)
at bootstrap_node.js:538:3
[19:54:49] Finished 'scripts.bar' after 6.27 s
[19:54:49] Finished 'scripts.foo' after 8.97 s
[19:54:49] Finished 'scripts.baz' after 5.65 s
[19:54:49] Starting 'scripts'...
[19:54:49] Finished 'scripts' after 67 μs
I can try to provide a reproducer, if needed.
These are the relevant package versions:
$ npm ls --depth=0
├── resolve@1.3.2
├── rollup@0.41.6
├── rollup-plugin-typescript2@0.4.0
├── tslib@1.6.0
└── typescript@2.2.2
Thanks.
Issue Analytics
- State:
- Created 6 years ago
- Comments:10 (8 by maintainers)
Top Results From Across the Web
CI pipeline with parallel jobs sharing the same cache can ...
A pipeline which runs jobs in parallel which share the same cache can produce non deterministic results in the cache resp. some files...
Read more >Parallel Docker build with dotnet restore thrashes each other's ...
The exact issue seems to be that NuGet uses the temp directory for a locking mechanism between restore processes, mounting the temp directory...
Read more >Caching Strategies - CircleCI
This document is a guide to the various caching strategies available for managing dependency caches in CircleCI.
Read more >Caching dependencies to speed up workflows - GitHub Docs
Multiple workflow runs in a repository can share caches. A cache created for a branch in a workflow run can be accessed and...
Read more >Configuration cache - Gradle User Manual
The configuration cache does not support all core Gradle plugins and and features. ... in the root directory of the Gradle build in...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ok, 0.4.1 should behave better in this case out of the box (if contents of your rollup configs actually differ).
Cool, I’ll add hash of rollup config itself to the cache path, should handle a number of possible conflicts.