Skip to content

Commit 75f2a5b

Browse files
bors[bot]xanderio
andauthored
Merge #9934
9934: Revert "Downgrade notify and use RecommendedWatcher" r=lnicola a=xanderio This reverts commit 5b0c86a. The pre-5.0.12 release of notify fixed this issue. `@lnicola` Could you verify that this now works on NetBSD? Co-authored-by: Alexander Sieg <[email protected]> Co-authored-by: Alexander Sieg <[email protected]>
2 parents 8d7eea9 + 7bf19f9 commit 75f2a5b

File tree

3 files changed

+28
-8
lines changed

3 files changed

+28
-8
lines changed

Cargo.lock

Lines changed: 23 additions & 2 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.10" # check that it builds on NetBSD before upgrading
17+
notify = "=5.0.0-pre.12"
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: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,9 @@ impl NotifyActor {
8383
self.watcher = None;
8484
if !config.watch.is_empty() {
8585
let (watcher_sender, watcher_receiver) = unbounded();
86-
let watcher =
87-
log_notify_error(RecommendedWatcher::new_immediate(move |event| {
88-
watcher_sender.send(event).unwrap()
89-
}));
86+
let watcher = log_notify_error(RecommendedWatcher::new(move |event| {
87+
watcher_sender.send(event).unwrap()
88+
}));
9089
self.watcher = watcher.map(|it| (it, watcher_receiver));
9190
}
9291

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

216215
fn watch(&mut self, path: AbsPathBuf) {
217216
if let Some((watcher, _)) = &mut self.watcher {
218-
log_notify_error(watcher.watch(&path, RecursiveMode::NonRecursive));
217+
log_notify_error(watcher.watch(path.as_ref(), RecursiveMode::NonRecursive));
219218
}
220219
}
221220
fn send(&mut self, msg: loader::Message) {

0 commit comments

Comments
 (0)