Last active
December 23, 2015 09:59
-
-
Save dlmanning/6618028 to your computer and use it in GitHub Desktop.
Possible regression between 0.10.16 and 0.10.17 related to libuv patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Running watch.js on node 0.10.17 and OS X 10.8.5 gives the following when editing (in Sublime Text) and saving file in the same directory: | |
change : a.txt | |
rename : .subl319.tmp | |
change : a.txt | |
rename : .subl69d.tmp | |
etc... | |
Doing the same on 0.10.18 gives: | |
rename : .subl738.tmp | |
rename : .sublade.tmp | |
The same issue occurs between 0.11.6 and 0.11.7. Based on the commit log I think it's related to the following change in libuv: | |
https://github.com/joyent/libuv/commit/9bae606d413327187828155b61babcd52b2d2517 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fs = require('fs'); | |
fs.watch(__dirname, function (evt, filename) { | |
console.log(evt + ' : ' + filename); | |
}) |
Filed an issue: nodejs/node-v0.x-archive#6375
Turns out this was "fixed" when libuv 0.10.18 was rolled into node 0.10.21
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For posterity, it seems to me that any change that occurs within ~200ms of another does not get emitted.. writing a test.