Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
f24f3fe
WIP
maurizi Jun 7, 2015
79b8785
Windows: use SleepEx to allow completion routine to fire. Fix bad tr…
jmquigs Nov 17, 2015
d92ea4d
Merge branch 'master' of https://github.com/passcod/rsnotify into win…
jmquigs Nov 17, 2015
1592724
Windows: use full paths in reported events
jmquigs Nov 17, 2015
124652c
Windows: use try_recv instead of select!, process all actions in loop
jmquigs Nov 17, 2015
be214c8
Windows: fix watch_dir_recommended test by not panicking if channel i…
jmquigs Nov 17, 2015
1764e37
Windows: don't need to free overlapped/request in handler
jmquigs Nov 17, 2015
8d2167f
Windows: convert watch/unwatch send errors to Error::Generic
jmquigs Nov 17, 2015
12f0ae4
Windows: change test to give windows a little time to start watcher b…
jmquigs Nov 18, 2015
108e08c
Windows: allow write on the monitored directory
jmquigs Nov 18, 2015
549da9f
Windows: implement single file watch
jmquigs Nov 18, 2015
7e3ead6
Windows: implement test for single file watcher
jmquigs Nov 18, 2015
8f00aa1
Add appveyor file
jmquigs Nov 18, 2015
c536e64
appveyor: don't build the gnu targets
jmquigs Nov 18, 2015
34b9c75
Windows: fix some winapi imports
jmquigs Nov 19, 2015
672072a
Windows: remove needless return (clippy)
jmquigs Nov 19, 2015
6c658c6
Windows: wait in alertable sleep on shutdown
jmquigs Nov 19, 2015
3c309b7
Add me to contributors
jmquigs Nov 19, 2015
e6434a4
Windows: add a failing test that shows the shutdown leak
jmquigs Nov 19, 2015
02bca44
Windows: fix shutdown leak
jmquigs Nov 19, 2015
7dc1f55
Windows: increase watcher test wait time to 50ms
jmquigs Nov 19, 2015
ad5e274
Windows: eliminate warning in test
jmquigs Nov 20, 2015
99a6fde
Windows: replace transmute with Box::from_raw
jmquigs Nov 20, 2015
506de31
Merge branch 'win-shutdown-leak' into windows2
jmquigs Nov 21, 2015
e717093
Windows: wait for reply in watch()
jmquigs Nov 21, 2015
50af1c6
Windows: fix atom indent fail
jmquigs Nov 21, 2015
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@ authors = [
"Antti Keränen <[email protected]>",
"Gilbert Röhrbein <[email protected]>",
"Jorge Israel Peña <[email protected]>",
"Michael Maurizi <mmaurizi@azavea.com>",
"Michael Maurizi <michael.maurizi@gmail.com>",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add yourself in there, too :)

"Pierre Baillet <[email protected]>",
"ShuYu Wang <[email protected]>",
"Jimmy Lu <[email protected]>",
"Francisco Giordano <[email protected]>",
"Jake Kerr",
"Ty Overby <[email protected]>",
"John Quigley <[email protected]>"
]

description = "Cross-platform filesystem notification library"
Expand Down Expand Up @@ -45,6 +46,18 @@ version = "^0.2.11"
[target.x86_64-apple-darwin.dependencies.fsevent-sys]
version = "^0.1"

[target.i686-pc-windows-gnu]
dependencies = { winapi = "0.2", kernel32-sys = "0.2.1" }

[target.x86_64-pc-windows-gnu]
dependencies = { winapi = "0.2", kernel32-sys = "0.2.1" }

[target.i686-pc-windows-msvc]
dependencies = { winapi = "0.2", kernel32-sys = "0.2.1" }

[target.x86_64-pc-windows-msvc]
dependencies = { winapi = "0.2", kernel32-sys = "0.2.1" }

[dev-dependencies]
tempfile = "^1.1.0"
tempdir = "^0.3.4"
19 changes: 19 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
environment:
matrix:
- TARGET: x86_64-pc-windows-msvc
- TARGET: i686-pc-windows-msvc
# skip the gnu targets to reduce build time
#- TARGET: x86_64-pc-windows-gnu
#- TARGET: i686-pc-windows-gnu
install:
- ps: Start-FileDownload "https://static.rust-lang.org/dist/rust-nightly-${env:TARGET}.exe"
- rust-nightly-%TARGET%.exe /VERYSILENT /NORESTART /DIR="C:\Program Files (x86)\Rust"
- SET PATH=%PATH%;C:\Program Files (x86)\Rust\bin
- SET PATH=%PATH%;C:\MinGW\bin
- rustc -V
- cargo -V

build: false

test_script:
- cargo test --verbose
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add a badge to the readme for this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can add the badge, but I think it will be broken until you set up the project there.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've just added it, so it should work :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see the CI build, but there is a project ID that I can't see that is needed to add the badge. So I guess you'll have to add it :( Also if you like, you can remove #4 from the todo list on the readme.
http://www.appveyor.com/docs/status-badges

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will do :)

6 changes: 5 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#[macro_use] extern crate log;
#[macro_use] extern crate bitflags;
#[cfg(target_os="macos")] extern crate fsevent_sys;
#[cfg(target_os="windows")] extern crate winapi;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this both here and in windows.rs?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed the one from windows.rs

extern crate libc;
extern crate filetime;

Expand All @@ -12,11 +13,13 @@ use std::convert::AsRef;

#[cfg(target_os="macos")] pub use self::fsevent::FsEventWatcher;
#[cfg(target_os="linux")] pub use self::inotify::INotifyWatcher;
#[cfg(target_os="windows")] pub use self::windows::ReadDirectoryChangesWatcher;
pub use self::null::NullWatcher;
pub use self::poll::PollWatcher;

#[cfg(target_os="linux")] pub mod inotify;
#[cfg(target_os="macos")] pub mod fsevent;
#[cfg(target_os="windows")] pub mod windows;
pub mod null;
pub mod poll;

Expand Down Expand Up @@ -57,7 +60,8 @@ pub trait Watcher: Sized {

#[cfg(target_os = "linux")] pub type RecommendedWatcher = INotifyWatcher;
#[cfg(target_os = "macos")] pub type RecommendedWatcher = FsEventWatcher;
#[cfg(not(any(target_os = "linux", target_os = "macos")))] pub type RecommendedWatcher = PollWatcher;
#[cfg(target_os = "windows")] pub type RecommendedWatcher = ReadDirectoryChangesWatcher;
#[cfg(not(any(target_os = "linux", target_os = "macos", target_os = "windows")))] pub type RecommendedWatcher = PollWatcher;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is becoming a bit cumbersome... if anyone has an idea to make it so that we don't have to add to the attribute each time, please have a go :)


pub fn new(tx: Sender<Event>) -> Result<RecommendedWatcher, Error> {
Watcher::new(tx)
Expand Down
Loading