Skip to content

Conversation

@AprilNEA
Copy link
Contributor

Previously, --watch-exclude only filtered paths when registering them with the OS file watcher. When a directory was watched recursively (e.g. --watch=.), the OS reported changes to all files within it, including excluded ones, because the exclude check was never applied to incoming change notifications.

This fix passes the exclude set into the new_watcher() callback and filters changed paths before they enter the debounce channel, ensuring excluded files never trigger a restart.

Closes #26217

@AprilNEA AprilNEA force-pushed the fix/watch-exclude-filter branch from 39e0613 to 84d9495 Compare January 29, 2026 03:15
Previously, `--watch-exclude` only filtered paths when registering them
with the OS file watcher. When a directory was watched recursively
(e.g. `--watch=.`), the OS reported changes to all files within it,
including excluded ones, because the exclude check was never applied to
incoming change notifications.

This fix passes the exclude set into the `new_watcher()` callback and
filters changed paths before they enter the debounce channel, ensuring
excluded files never trigger a restart.

Closes denoland#26217
@AprilNEA AprilNEA force-pushed the fix/watch-exclude-filter branch from 84d9495 to 97fcc11 Compare January 29, 2026 03:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

--watch-exclude doesn't work

1 participant