-
Notifications
You must be signed in to change notification settings - Fork 46
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
Cache does not work with multiple jest workers #82
Comments
Not sure how to best deal with this. Neither Jest nor this plugin writes to the cache directly, so maybe it makes sense to fix this in eslint? I'm not sure we can do anything here. Eslint would need some kind of lock or something similar. Possibly related to eslint/rfcs#4, eslint/rfcs#11 and eslint/rfcs#42 |
eslint isn't designed to be run in more than one process at a time, so i'm not sure if this can really be avoided if it's eslint itself doing the cache writing. |
Each worker may receive own cache sub-directory, but then there would be a problem to merge all caches back to one (option 3, basically). And on subsequent runs single cache has to be provided to workers (probably just copy-paste before run). The problem with ESLint is that it is synchronous, it only received async APIs in version 7, as mentioned here eslint/eslint#3565, comment eslint/eslint#3565 (comment). |
When using jest with multiple workers the
.eslintcache
looks like it is being overwritten by every worker. Hence adding the cache option makes no difference to performance.Happy to try work on a PR to fix the cache overwriting issue but would need some guidance on what kind of approach would be appropriate.
My initial ideas would be:
Do any of these ideas seem appropriate? In the meantime will do some more digging around the code base.
The text was updated successfully, but these errors were encountered: