Closed anagrius closed 5 years ago
Hi @anagrius, have you tried it with smaller Elm 0.18/0.19 projects?
@halohalospecial It does not happen on smaller projects. Just checked. We don't get any:
Uncaught Error: Error watching file for changes: EMFILE
at _errnoException (util.js:1024:11)
at FSEvent.FSWatcher._handle.onchange (fs.js:1363:9)
I am trying to figure out how to see in the exceptions exactly which file/files it is trying to watch and fails
@halohalospecial What exactly are you watching file changes for? I see it looks like e.g. all files in node_modules are also observed.
@anagrius, you can check it here:
Can you also check with just Elmjutsu installed? Maybe another Atom package is also watching files?
Sure, I will. But the hanging only occurs with Elmjutsu installed
How about adding 'node_modules/**'
to ignored
?
Well, if you don't need to know about Elm files in there, then I would say go for it. I mean there is no need having chokidar run through all those files for nothing.
I just wiped node_modules and everything is working until I do npm install, then it hangs again. So that seems to be it.
Can you can modify your ~/.atom/packages/elmjutsu/lib/core.js
to test? :grin:
Yeah, I did right after actually. No change :( But keeping node_modules empty does the trick. (Not a very long term solution though.
Have you tried adding node_modules
or node_modules/**/*
to ignored
? Apparently, it's still traversing the node_modules directory with node_modules/**
.
node_modules/*/ seems to do the trick!
I have two colleagues that complained that they could not get elm working in Atom. Both machines hung after a few seconds when Elmjutsu was installed and opening Atom.
I tried to upgrade from 8.6.4 -> 9.0.1 and the same happened to me. I will try to get some profiling out, but it is hard since it hangs that too.
Out project is ~80klogs of Elm so it might be a problem on larger projects only. The project is Elm 0.18, if that makes a difference.
In the console it spams:
many thousands times.
Downgrading also no longer works. Atom will still lock up if 8.6.4 is reinstalled.
EDIT:
Ok, the profile file got too big 150MB so, not going to post it here. It is indeed the fs.js module spending all the time on error processing.
See image.