-
Notifications
You must be signed in to change notification settings - Fork 229
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
Remake PollWatcher #12
Comments
Hello, Two ideas for that:
Without poll, the lib seems to compile pretty much ok (cf https://github.com/octplane/rsnotify/tree/fsevent_integration ) and there doesn't seem to be any outdated package. |
I think most of the flack could come from Windows users who'll be left out, but that's better than nothing working at all. |
I'm going to rip out Poll straight up, though. It will make this library not much more than an inotify wrapper until fsevent lands, but that's how it was for a while before, too. Then the work will be to rebuild a polling implementation or two. I'm thinking of applying some actual CS theory to the problem, when I have time. |
I've ripped out Poll and released a 2.0.0-pre1 with a NullWatcher that… does nothing. That should at least help things along, something that compiles but does nothing on unsupported platforms is still better than something that just fails. |
@octplane I copied your fsevent code and made some changes. Now its works. ( |
@andelf indeed! I think the merge is not too difficult to perform. The unwatch/drop might be more complicated. I had to fight against threads to make things work correctly. I will not be available until tomorrow morning CET, so go ahead if you have some cycles. |
I have been using the poll backend on Windows, so I'll be sad to see it go. |
For getting the file modified time on Windows call |
@retep998 I was looking at using That said, I need to get a directory handle to use |
let x: Vec<_> = somepath.as_os_str().encode_wide().chain(Some(0)).collect();
CreateFileW(x.as_ptr(), ...); |
Nevermind! You don't need the |
Just published v2.0.0, breaking change is the removal of PollWatcher. Keeping this issue to track progress on re-crafting a polling implementation. |
I think once rust-lang/rust#25844 lands, you should be able to use crate |
Yes indeed. Ok, so putting this on hold until Rust 1.1 lands. Just a few more weeks, hopefully! |
I think @alexcrichton managed to make this (file modified time access) work on stable, in part thanks to his |
Nevermind, it's once 1.1 is released, like we already knew. At least we know what the solution will look like :) |
So 1.1 is out, we can move forward on this. |
Heads up I'm working on this. I got it working already, but gonna go over it one more time to make sure everything's correct. |
That's great ! |
For those not familiar with the background who want to help:
What was done:
mtime
of a file, which cannot currently be done in stable Rust, so it was dropped.What is needed:
stat.modified()
.The text was updated successfully, but these errors were encountered: