-
Notifications
You must be signed in to change notification settings - Fork 66
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
All dirs in the watch dir are opened, easily causing too many open files #23
Comments
+1 |
@nicolasartman I understand where you're going and agree that it's a useful feature, though why don't you have two watches, one for each glob? |
I thought I'd replied here, must've been another thread. If sane where to predict what could be watched or not, it needs a much deeper understanding of globs, which is probably doable. Are you actively hitting this problem? Also have you looked into the WatchmanWatcher, I recommend it for larger projects because there is no way to prevent #25 |
@amasad if Im understanding this correctly, basically if we made I did something I believe is the same with minimatch to ensure node-walk-sync wouldn't traverse directories it should not traverse. I'll try and poke around sometime, and see if micromatch exposes similar capability. |
I noticed from #3 that there's a deliberate design decision to watch all dirs in case any new files appear that might match the glob. I can see why this would be helpful in some cases, but it breaks things in others, so a choice would be excellent.
As far as I can tell, there's no reasonable way to prevent that from crashing, because there are simply too many dirs opened for watching at once (even with a massive ulimit increase).
My request is that a flag be added to make only files matching the glob on startup get watched. My core use case is for fb-flo, where I want to watch
projectdir/static/minified/js/**/*.js
andprojectdir/static/templates/**/*.html
, but there are simply too many dirs under projectdir/static to open them all at once.Thanks!
The text was updated successfully, but these errors were encountered: