You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was looking into the behaviour of parcel watcher and noticed a difference between macOS (FSEvents) and Linux (inotify). I believe Linux is correct in this one, as it behaves identically as the WASM version.
You will not receive events for either foo, or any of it's children like foo/bar if they are created in the current working directory. This behaves identical on both macOS, Linux, and WASM.
However, if we change the ignore from foo to **/foo, things get interesting.
On macOS, Linux, and WASM, you will not receive events for foo. On Linux and WASM, you will also not receive events for children like foo/bar. However, on macOS, you do receive events for children of foo.
This is also the case for the parcel watcher in VSCode where I used a file system watcher to subscribe to events on a directory.
I don't know if this is expected, but I assume the idea behind parcel-watcher is to have something which works identically on all platforms?
The text was updated successfully, but these errors were encountered:
I think the main difference is that (to my knowledge) on Linux recursive file watching requires to install a watcher per folder, so you need to recursively go down the watch path and install watchers on each node. I think the ignore pattern is applied during that phase, such as **/foo will match on a path bar/foo and then stop events. But on platforms with good file watching support (macOS and Windows), the glob pattern is tested on the full path and that will not match the glob pattern.
Hey 👋
I was looking into the behaviour of parcel watcher and noticed a difference between macOS (FSEvents) and Linux (inotify). I believe Linux is correct in this one, as it behaves identically as the WASM version.
Let's assume the following code
You will not receive events for either
foo
, or any of it's children likefoo/bar
if they are created in the current working directory. This behaves identical on both macOS, Linux, and WASM.However, if we change the ignore from
foo
to**/foo
, things get interesting.On macOS, Linux, and WASM, you will not receive events for
foo
. On Linux and WASM, you will also not receive events for children likefoo/bar
. However, on macOS, you do receive events for children offoo
.This is also the case for the parcel watcher in VSCode where I used a file system watcher to subscribe to events on a directory.
I don't know if this is expected, but I assume the idea behind
parcel-watcher
is to have something which works identically on all platforms?The text was updated successfully, but these errors were encountered: