-
-
Notifications
You must be signed in to change notification settings - Fork 31.6k
--watch
combined with --watch-path
results in duplicate restart events/logs
#57124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Ping @nodejs/libuv macOS is quite messy with the watcher 🫠💔 |
Libuv passes on the events it receives from FSEvents more or less verbatim, it doesn't do debouncing. If node needs that, it needs to implement it itself. |
I'm reopening this since the PR that fixed this issue (#57936) unfortunately needed to be reverted I will look soon into reintroducing the fix 😓 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Version
22.13.1
Platform
Subsystem
No response
What steps will reproduce the bug?
Full reduced test case: https://github.com/OliverJAsh/node-watch-bug
src/server.js
:node --watch --watch-path=./src/ ./src/server.js
touch ./src/server.js
.How often does it reproduce? Is there a required condition?
Every time.
What is the expected behavior? Why is that the expected behavior?
1 restart event/log:
This is what we get when we remove
--watch
and only specify--watch-path
:Curiously, this is also the behaviour we get if we add
--watch-preserve-output
:What do you see instead?
2 restart events/logs:
Additional information
This part of the docs seems relevant:
https://nodejs.org/docs/latest-v22.x/api/cli.html#--watch-path
Potentially related: #55189
The text was updated successfully, but these errors were encountered: