Unverified Commit 6a8cec78 authored by Benjamin Woodruff ‮'s avatar Benjamin Woodruff Committed by GitHub

Turbopack: Don't force non-recursive watcher for additional roots (#99396)

I was forcing non-recursive mode here because I imagined it might be
better for the GVS use-case where we only care about relatively few
files, but apparently setting up new fsevents watches on macOS is very
slow, which caused this to effectively hang the compiler for any project
with many dependencies on macOS.
parent 664b9bb5
...@@ -13,8 +13,7 @@ use turbo_tasks::{ ...@@ -13,8 +13,7 @@ use turbo_tasks::{
FxIndexMap, NonLocalValue, OperationValue, OperationVc, ReadRef, ResolvedVc, Vc, FxIndexMap, NonLocalValue, OperationValue, OperationVc, ReadRef, ResolvedVc, Vc,
}; };
use turbo_tasks_fs::{ use turbo_tasks_fs::{
DiskFileSystem, DiskFileSystemMap, DiskWatcherConfig, DiskWatcherRecursiveMode, FileSystemPath, DiskFileSystem, DiskFileSystemMap, DiskWatcherConfig, FileSystemPath, canonicalize_to_rcstr,
canonicalize_to_rcstr,
}; };
use turbopack_core::issue::{Issue, IssueSeverity, IssueStage, PlainIssue, StyledString}; use turbopack_core::issue::{Issue, IssueSeverity, IssueStage, PlainIssue, StyledString};
...@@ -194,12 +193,7 @@ pub(crate) async fn create_additional_root_file_systems( ...@@ -194,12 +193,7 @@ pub(crate) async fn create_additional_root_file_systems(
RcStr::from(format!("@{}", additional_root.key)), RcStr::from(format!("@{}", additional_root.key)),
canonical_root, canonical_root,
Vec::new(), Vec::new(),
DiskWatcherConfig { watcher_config,
// we assume that most files in an additional root won't be read, so a recursive
// watcher may be more expensive than we'd like, always use a non-recursive watcher.
recursive_mode: Some(DiskWatcherRecursiveMode::NonRecursive),
..watcher_config
},
map, map,
); );
roots_by_name.insert( roots_by_name.insert(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment