fs.watch should throw an exception if recursive is not supported #29901
Copy link
Copy link
Closed
Labels
fsIssues and PRs related to file-system APIs and the fs module.Issues and PRs related to file-system APIs and the fs module.
Description
- Version: 12.11
- Platform: Linux Latitude-3500 4.15.0-1056-oem stream.read(0) should not trigger the
endevent if there is no underlying data #65-Ubuntu SMP Thu Sep 12 20:31:55 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
It has been discussed in the past, that recursion watch is not implementable with good performances in Linux . And it is actually documented, But currently, the fs.watch just ignores this option without signalling the user that the recursive has been ignored. I truly believe that an exception should be thrown if recursive is ignored, as it might cause unexpected bugs while cross-platforming an app or a script, And probably most users wouldn't imagine that such incapability exists, and probably won't look it up.
Of course, this is a breaking change.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
fsIssues and PRs related to file-system APIs and the fs module.Issues and PRs related to file-system APIs and the fs module.
Activity
sam-github commentedon Oct 9, 2019
Seems reasonable to me.
exx8 commentedon Oct 9, 2019
Okay, I believe I should wait for more approvals?
Then I'll be more than happy for this to be my first contribution to the project.
BridgeAR commentedon Oct 9, 2019
@exx8 feel free to open a PR with the necessary changes. Such changes are rarely discussed in depth beforehand and the PR itself should be sufficient.
fs: watch signals for recursive incompatibility.
fs: watch signals for recursive incompatibility
fs: watch signals for recursive incompatibility