-
Couldn't load subscription status.
- Fork 249
Description
System details
- OS/Platform name and version: macOS Monterey 12.0.1 (21A559)
- Rust version (if building from source):
rustc --version: rustc 1.67.0-nightly (b7bc90fea 2022-11-21) - Notify version (or commit hash if building from git): 4.x (the same that
cargo-watchuses. According to thecargo-watchauthors, it would be best if the patch could be released for4.xversion if that possible.. - If you're coming from a project that makes use of Notify, what it is, and a link to the downstream issue if there is one: Cargo-watch reacts to
IsFileevent, while it should not. watchexec/cargo-watch#242
What you did (as detailed as you can)
I'm using cargo-watch 8.1.1 (because 8.3.0 does not work on new macOS). Recently, our build script, which uses cargo-watch under the hood, started looping indefinitely. After debugging it turned out, that when using std::fs::copy("a.txt", "b.txt") on macOS, a file system event IsFile is sometimes emitted on the source file ("a.txt"). The term "sometimes" is better explained here. Our build script is copying some files to target directory, which causes the sources to emit this event, which causes cargo-watch to re-run the whole operation again. The cargo-watch issue, where the authors asked me to post issue here can be found here: watchexec/cargo-watch#242