nix-community / lorri

Your project’s nix-env [maintainer=@Profpatsch,@nyarly]
Apache License 2.0
677 stars 24 forks source link

Improve watcher #125

Closed nyarly closed 5 months ago

nyarly commented 5 months ago

Expands on #113, fixes the Vim test by debouncing notifications internally (which is easier because we only care about touched paths.)

Profpatsch commented 5 months ago

The upstream notify library has a sister library called https://docs.rs/notify-debouncer-full/latest/notify_debouncer_full/ in its newer versions, so I rewrote some of the filter code to use that instead, and it seems to fix the vim test without any need for manual debouncing on our part! PTAL.

Profpatsch commented 5 months ago

Also lol, searching for that macos panic only brings up https://users.rust-lang.org/t/mysterious-panic-in-macos-cargo-test/77997/1

Profpatsch commented 5 months ago

Actually I think the rename_over_vim test is broken on Linux not mac; we are watching the parent dir, so I’d expect it to notify about the creation of bar! Which is the part that fails on Mac.

Profpatsch commented 5 months ago

Ah, nvm, it’s not that, it should be filtered out by the path filtering, so not generate an interesting event, which is the correct case. It’s hard to know with the panic unwinding being broken on current MacOS runners … probably relevant to that is https://github.com/rust-lang/rust/issues/113783

I’d just disable the test on macos for now and hope it fixes itself … maybe