Skip to content

Commit

Permalink
Fix(filewatcher): handle removed directories #8800 (#9406)
Browse files Browse the repository at this point in the history
  • Loading branch information
krlvi authored Nov 14, 2024
1 parent 5108eab commit ab1596c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
14 changes: 12 additions & 2 deletions crates/turborepo-filewatch/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -271,8 +271,18 @@ async fn watch_events(
if event.kind == EventKind::Create(CreateKind::Folder) {
for new_path in &event.paths {
if let Err(err) = manually_add_recursive_watches(new_path, &mut watcher, Some(&broadcast_sender)) {
warn!("encountered error watching filesystem {}", err);
break 'outer;
match err {
WatchError::WalkDir(err) => {
// Likely the path no longer exists
debug!("encountered error watching filesystem {}", err);
continue;
},
_ => {
warn!("encountered error watching filesystem {}", err);
break 'outer;
}

}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion crates/turborepo-lib/src/daemon/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,7 @@ impl proto::turbod_server::Turbod for TurboGrpcServiceInner {
.package_changes()
.await;

let (tx, rx) = mpsc::channel(1024);
let (tx, rx) = mpsc::channel(4096);

tx.send(Ok(proto::PackageChangeEvent {
event: Some(proto::package_change_event::Event::RediscoverPackages(
Expand Down

0 comments on commit ab1596c

Please sign in to comment.