Repository navigation
feat(pi-fff): expose followSymlinks option #818
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
dmtrKovalenko
merged 2 commits into
dmtrKovalenko:main
from
ohlulu:feat/pi-fff-follow-symlinks
Aug 30, 2026
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
Repository: dmtrKovalenko/fff
Length of output: 12788
🏁 Script executed:
Repository: dmtrKovalenko/fff
Length of output: 2932
🏁 Script executed:
Repository: dmtrKovalenko/fff
Length of output: 17385
🏁 Script executed:
Repository: dmtrKovalenko/fff
Length of output: 50376
🏁 Script executed:
Repository: dmtrKovalenko/fff
Length of output: 50375
🏁 Script executed:
Repository: dmtrKovalenko/fff
Length of output: 9794
🏁 Script executed:
Repository: dmtrKovalenko/fff
Length of output: 50373
🏁 Script executed:
Repository: dmtrKovalenko/fff
Length of output: 48024
🌐 Web query:
notify-rs Config with_follow_symlinks false recursive watcher symlink documentation💡 Result:
In the
notifycrate, theConfigstruct provides thewith_follow_symlinks(bool)method to determine whether symbolic links are followed when performing a recursive watch [1][2]. This setting is enabled by default [1][2]. To disable symlink following, you can initialize yourConfigwithwith_follow_symlinks(false)before creating your watcher [3][2]:rust use notify::{Config, RecommendedWatcher, Result, Watcher}; fn main() -> Result<()> { // Disable symlink following let config = Config::default().with_follow_symlinks(false); let mut watcher = RecommendedWatcher::new( |res| { if let Ok(event) = res { println!("{:?}", event); } }, config, )?; // ... proceed to watch paths Ok(()) }Key points regarding this configuration: * Backend Support: Thewith_follow_symlinkssetting applies to theINotifyWatcher,KqueueWatcher, andPollWatcherbackends [1][2]. * Immutability: This configuration cannot be changed at runtime; it must be set when creating the watcher backend [1][2]. * Default Behavior: It is enabled by default (true) [1][2]. * Effect: Whenwith_follow_symlinks(false)is set, the watcher is intended to avoid following symbolic links to directories during recursive traversal [1][2]. Note that historical discussions have pointed out that platform-specific behavior (particularly with inotify) can sometimes lead to perceived symlink following depending on how paths are passed to the underlying OS APIs [4].Citations:
🏁 Script executed:
Repository: dmtrKovalenko/fff
Length of output: 4902
Align watcher symlink handling with
followSymlinks.BackgroundWatcherhard-codeswith_follow_symlinks(false), while indexing follows symlinks. Recursive macOS and Windows watches can miss edits in external directory targets and leave results stale. Pass the picker setting to the watcher. Add target-file edit tests on both platforms.🤖 Prompt for AI Agents