-
Notifications
You must be signed in to change notification settings - Fork 222
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add refined debouncer #480
Conversation
FYI: I'll have time to look at this after the 12th may |
I also want to throw another idea at you: I was thinking about whether we could make a "fat" debouncer that also detects filesystems that require usage of pollwatcher. It could then automatically use the pollwatcher backend in addition to the native one. (See #475 ) This would of course mean detecting the added path in the mount section for linux. A simple approach* would already help with missing events for WSL environments that watch windows host folders. * just checking at the time of adding the path, not later on or for sub folders |
Meanwhile, could you split #458 as a separate PR? It's essentially unrelated to the debouncer change here and it's worth releasing it as v5.2.0. |
@0xpr03
@JohnTitor |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks overall pretty good. A ton more logic in the debouncer now, but this will give a much better user experience.
As noted I would suggest renaming to -debouncer-full.
Fat is also an option, but sounds more negative than it has to.
I would drop 1.56 compatibility and move on, as for the crossbeam things we could really need some functionality from 1.60+
I really like the testing harness.
Thanks for the effort!
If you have something you want to merge pre 6.0 release leave me comment, otherwise I'd publish a v6 + deboncer-full tomorrow. |
Yeah I'll try to do that as well.
We could do a RC (but this time not for 2 years) |
😄 I'll leave that decision to you. |
Ah yeah I meant RC for v6 of notify. But I guess we'll skip that. And for the debouncer-full a 0.1.0 is fine. |
This got a little bit hairy (apart from me not noticing that the updated versions weren't all correct), crates.io does require publishing file-id. So that's now also up there.
But notify v6.0.0, v5.2.0, debouncer-mini v0.3.0 and debouncer-full v0.1.0 are now on crates.io |
This is another take at event debouncing.
Unlike the
mini
debouncer, therefined
debouncer is much more opinionated.It tries its best to simplify event handling and in particular can use file system ids to stitch together rename events in case the notification back-end doesn't support cookies.
Features:
Rename
event if the renameFrom
andTo
events can be matchedRename
eventsRemove
event when deleting a directory (inotify)Modify
events after aCreate
eventThis PR also removes the
rename
thread from the inotify back-end and simplifies the rename event handling.Because of that I bumped the version number to 6.0.0.
I haven't done much testing, yet. But it works well on Linux so far.
This PR also implements
Copy
forEventKind
andModifyKind
(#458).And I changed the dependency declarations to use workspace dependencies.(Requires Cargo 1.64)