-
Notifications
You must be signed in to change notification settings - Fork 14k
Open
Labels
A-ioArea: `std::io`, `std::fs`, `std::net` and `std::path`Area: `std::io`, `std::fs`, `std::net` and `std::path`C-bugCategory: This is a bug.Category: This is a bug.O-macosOperating system: macOSOperating system: macOS
Description
I've got a bizarre behavior here. Here is the code:
#[test]
fn test() {
std::fs::copy(
"/Users/wdanilo/Dev/enso/lib/rust/ensogl/pack/js/src/wasm-pack-bundle/wasm-pack-bundle.ts",
"/tmp/out.txt",
)
.unwrap();
}I'm also running in terminal:
fswatch /Users/wdanilo/Dev/enso/lib/rust/ensogl/pack/js/src/wasm-pack-bundle/wasm-pack-bundle.ts -x -v -t
- If
/tmp/out.txtEXISTS, then running this test DOES NOT causefswatchto print anything to the console. - If
/tmp/out.txtDOES NOT EXIST, then running the test DOES causefswatchto print:
notify_events: Notifying events #: 1.
Fri Jan 20 22:16:39 2023 /Users/wdanilo/Dev/enso/lib/rust/ensogl/pack/js/src/wasm-pack-bundle/wasm-pack-bundle.ts IsFile
I discovered that when debugging why my cargo-watch loops forever on building our sources. It seems that when we are copying files, the source file triggers an event, which triggers cargo-watch ...
Please note, that this does not happen when using system's cp command. I'm wondering if this is the correct behavior and if so, it should probably be documented better.
Meta
rustc --version --verbose:
rustc 1.58.1 (db9d1b20b 2022-01-20)
robertwahler
Metadata
Metadata
Assignees
Labels
A-ioArea: `std::io`, `std::fs`, `std::net` and `std::path`Area: `std::io`, `std::fs`, `std::net` and `std::path`C-bugCategory: This is a bug.Category: This is a bug.O-macosOperating system: macOSOperating system: macOS