Skip to content

Commit 805d758

Browse files
lukesandbergbgw
authored andcommitted
Turbopack: fix filesystem watcher config not applying follow_symlinks(false) (#92631)
## Summary - The notify `Config` uses a builder pattern where `with_follow_symlinks()` consumes `self` and returns a new `Config`, but the return value was being discarded — so `follow_symlinks` remained at its default (`true`). - The `RecommendedWatcher` branch was also passing `Config::default()` instead of the configured `config` object, ignoring the config entirely. ## Test plan - [x] `cargo check -p turbo-tasks-fs` passes - Behavioral: symlinks under the watched root will now trigger events for the symlink itself rather than the target, matching the intent of the existing comment. <!-- NEXT_JS_LLM_PR -->
1 parent 1056fae commit 805d758

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

turbopack/crates/turbo-tasks-fs/src/watcher.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -380,13 +380,13 @@ impl DiskWatcher {
380380
let config = Config::default();
381381
// we should track and invalidate each part of a symlink chain ourselves in
382382
// turbo-tasks-fs
383-
config.with_follow_symlinks(false);
383+
let config = config.with_follow_symlinks(false);
384384

385385
let mut notify_watcher = if let Some(poll_interval) = poll_interval {
386386
let config = config.with_poll_interval(poll_interval);
387387
NotifyWatcher::Polling(PollWatcher::new(tx, config)?)
388388
} else {
389-
NotifyWatcher::Recommended(RecommendedWatcher::new(tx, Config::default())?)
389+
NotifyWatcher::Recommended(RecommendedWatcher::new(tx, config)?)
390390
};
391391

392392
// TOCTOU: we must watch `root_path` before calling any invalidators and setting up the

0 commit comments

Comments
 (0)