From 3a9ae3edbf63e4aa7ee7130a1d7b58395e6c0a33 Mon Sep 17 00:00:00 2001 From: Luke Sandberg Date: Fri, 10 Apr 2026 20:20:54 +0000 Subject: [PATCH] Fix filesystem watcher config not applying follow_symlinks(false) The notify Config uses a builder pattern where with_follow_symlinks() returns a new Config, but the return value was being discarded. Additionally, the RecommendedWatcher branch was passing Config::default() instead of the configured config object. Co-Authored-By: Claude --- turbopack/crates/turbo-tasks-fs/src/watcher.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/turbopack/crates/turbo-tasks-fs/src/watcher.rs b/turbopack/crates/turbo-tasks-fs/src/watcher.rs index 77b6020425d8..322f51675bf6 100644 --- a/turbopack/crates/turbo-tasks-fs/src/watcher.rs +++ b/turbopack/crates/turbo-tasks-fs/src/watcher.rs @@ -380,13 +380,13 @@ impl DiskWatcher { let config = Config::default(); // we should track and invalidate each part of a symlink chain ourselves in // turbo-tasks-fs - config.with_follow_symlinks(false); + let config = config.with_follow_symlinks(false); let mut notify_watcher = if let Some(poll_interval) = poll_interval { let config = config.with_poll_interval(poll_interval); NotifyWatcher::Polling(PollWatcher::new(tx, config)?) } else { - NotifyWatcher::Recommended(RecommendedWatcher::new(tx, Config::default())?) + NotifyWatcher::Recommended(RecommendedWatcher::new(tx, config)?) }; // TOCTOU: we must watch `root_path` before calling any invalidators and setting up the