Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have some concerns with this approach. First, I think it might be cleaner (since it would be stateless) to pull up the
mtimecheck from below. Bothcurrandprevhave timestamp 0, so it would succeed and suppress the callback.Second, I'm concerned that this only addresses the symptoms of the problem. Why are we getting a fileChanged notification that has never existed and continues not to exist? My limited debugging suggests that this used to be suppressed when
oldStatus === -1andnewStatus === -1(somewhere in sys or fs) but that we are now seeingnewStatus === -4058. If this is a Node limitation, then I think we need a big comment here explaining that we're working around a library limitation.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My breakpoint was at line 1448 of
fs.js, but I can't get it to load the text without debugging the issue again, which I'm not currently set up to do.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/nodejs/node/blob/52e869bee8f639fb2b256efa814446d0c325a4ac/lib/fs.js#L1435