-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Watching doesn't work properly on Linux #1030
Comments
On the flip-side, AVA tests are an order of magnitude faster (~2s instead of ~20s) on my Linux laptop (i5 x 4 @ 2.2Ghz \w 8GB RAM & SSD) than they are on my Mac laptop (i7 x 2 @ 2.2Ghz \w 8GB RAM & SSD) 😄 I'm guessing this is either as result of me using Babel or because Node’s |
We're using chokidar, whose README does imply watching should work recursively. Does anybody else have experience with this? |
So I just now debugged this, and I noticed that chokidar was being asked to observe changes on these paths:
So I tried changing the middle one to limit it to only watch my
and it started working! I was able to permanently effect this change by adding this to my
I've had experience with watching very large directories on Linux before, and depending on how the distro is configured you can easily run out of watch handles if you watch too many directories, so I'm guessing chokidar is swallowing errors about running out of handles so it just silently fails to report on some directories instead. You need one watch handle per directory, and you can see how many handles you have available on your distro like this (for me it was set to
Hopefully that helps the next guy! |
@dchambers interesting! We can definitely do better in reporting these issues, I've just opened #1071 for that. |
On my Linux laptop,
--watch
only re-runs your tests when you edit code that happens to be in the same directory as one of your tests. Is this maybe because Inotify doesn't support recursive watch handles?The text was updated successfully, but these errors were encountered: