Open ryandesign opened 11 years ago
I should add this is on OS X 10.8.4.
Do you have a "default" task to run?
On Tue, Jul 23, 2013 at 2:04 PM, Ryan Schmidt notifications@github.comwrote:
I should add this is on OS X 10.8.4.
— Reply to this email directly or view it on GitHubhttps://github.com/mde/jake/issues/206#issuecomment-21445919 .
Certainly! And just running jake
runs it just fine.
Ah, here we go: https://github.com/joyent/node/issues/2479
Looks like it's a problem with the number of files in the directory.
Apparently there's a possible workaround which involves switching to fs.watchFile in this case, but I'd have to do some more investigation to see how well this works.
On Tue, Jul 23, 2013 at 2:11 PM, Ryan Schmidt notifications@github.comwrote:
Certainly! And just running jake runs it just fine.
— Reply to this email directly or view it on GitHubhttps://github.com/mde/jake/issues/206#issuecomment-21446326 .
Thanks. ulimit -n 10000
before running jake watch
works fine so I can use that. There shouldn't be that many files though.
Your readme says:
By default, it will watch the current directory for these files:
[ './**/*.js' , './**/*.coffee' , './**/*.css' , './**/*.less' , './**/*.scss' ]
It will exclude these files:
[ 'node_modules/**' , '.git/**' ]
I don't have any .coffee, .less or .scss files, and only 63 .js and .css files, so I should not have been exceeding the 256 open file limit. There are about 1500 files if I include those in node_modules, but you're supposed to be ignoring those...
Ah, actually, no -- the include/exclude only tells the WatchTask what it should or should not react to changes on. It does a watch on the entire directory.
I'm not sure if there's a good fix for this, but maybe at bare minimum we can special-case the .node_modules directory.
On Tue, Jul 23, 2013 at 2:24 PM, Ryan Schmidt notifications@github.comwrote:
Thanks. ulimit -n 10000 before running jake watch works fine so I can use that. There shouldn't be that many files though.
Your readme says:
By default, it will watch the current directory for these files:
[ './/.js' , './/_.coffee' , './_/.css' , './/.less' , './/*.scss' ]
It will exclude these files:
[ 'node_modules/' , '.git/' ]
I don't have any .coffee, .less or .scss files, and only 63 .js and .css files, so I should not have been exceeding the 256 open file limit. There are about 1500 files if I include those in node_modules, but you're supposed to be ignoring those...
— Reply to this email directly or view it on GitHubhttps://github.com/mde/jake/issues/206#issuecomment-21447182 .
I don't get how I properly get jake watch
to work with version 8.0.8 on OS X 10.9:
jakefile.js:
task('default', function() {
console.log('default');
});
watchTask(['default']);
Terminal:
$ jake watch
WatchTask started for:
And it just sits there, even if I update jakefile.js
(which should get caught in my understanding).
If I add an empty anonymous function:
task('default', function() {
console.log('default');
});
watchTask(['default'], function() { });
it will actually work:
$ jake watch
WatchTask started for: default
default
But it is too laggy. I have to cause several changes (save a few times) before it triggers. (This is a directory that contains only jakefile.js.)
Yes, looks like it actually requires a definition function to be passed. That's a bug. I have filed an issue for this: https://github.com/jakejs/jake/issues/273
I cannot repro the other problem you're reporting. I am not seeing any sort of lag if I pass it the dummy function. I created a test directory with nothing in it but the Jakefile and a foo.js file. Every time I make a change to the foo.js file, I see the log appear immediately in the console.
I added this line to my Jakefile:
But with jake 0.6.7 on node 0.10.13, running
jake watch
fails: