Skip to content

Commit 5b0c86a

Browse files
committed
Downgrade notify and use RecommendedWatcher
1 parent df0936b commit 5b0c86a

File tree

3 files changed

+8
-28
lines changed

3 files changed

+8
-28
lines changed

Cargo.lock

Lines changed: 2 additions & 23 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/vfs-notify/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ rustc-hash = "1.0"
1414
jod-thread = "0.1.0"
1515
walkdir = "2.3.1"
1616
crossbeam-channel = "0.5.0"
17-
notify = "=5.0.0-pre.11"
17+
notify = "=5.0.0-pre.10" # check that it builds on NetBSD before upgrading
1818

1919
vfs = { path = "../vfs", version = "0.0.0" }
2020
paths = { path = "../paths", version = "0.0.0" }

crates/vfs-notify/src/lib.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,10 @@ impl NotifyActor {
8383
self.watcher = None;
8484
if !config.watch.is_empty() {
8585
let (watcher_sender, watcher_receiver) = unbounded();
86-
let watcher = log_notify_error(RecommendedWatcher::new(move |event| {
87-
watcher_sender.send(event).unwrap()
88-
}));
86+
let watcher =
87+
log_notify_error(RecommendedWatcher::new_immediate(move |event| {
88+
watcher_sender.send(event).unwrap()
89+
}));
8990
self.watcher = watcher.map(|it| (it, watcher_receiver));
9091
}
9192

@@ -214,7 +215,7 @@ impl NotifyActor {
214215

215216
fn watch(&mut self, path: AbsPathBuf) {
216217
if let Some((watcher, _)) = &mut self.watcher {
217-
log_notify_error(watcher.watch(path.as_ref(), RecursiveMode::NonRecursive));
218+
log_notify_error(watcher.watch(&path, RecursiveMode::NonRecursive));
218219
}
219220
}
220221
fn send(&mut self, msg: loader::Message) {

0 commit comments

Comments
 (0)