<#17642 Inconsistency between how fs watcher ingor...
# github-notifications
q
#17642 Inconsistency between how fs watcher ingores gitignore vs pants_ignore New issue created by jriddy Describe the bug There's an inconsistency between patterns defined in .gitignore and patterns defined in pants_ignore for how the filesystem watcher is invalidating ignored paths. For paths only in .gitignore, if you touch that node, and the parent directory is not ignored, it still invalidates ongoing build graph steps. However, if this path is in pants_ignore, it is ignored properly. Checking
.pants.d/pants.log
shows messages like
Copy code
06:50:26.74 [INFO] notify invalidation: cleared 1 and dirtied 26 nodes for: {"", "ignored_dir"}
06:50:26.74 [INFO] notify invalidation: cleared 1 and dirtied 5192 nodes for: {"ignored_dir", ""}
I've created a fake PR #17641 to reproduce this exact issue I'd argue that the
pants_ignore
behavior seems to be correct. Even though "touch" actually changes the directory above, it's affecting a path we explicitly don't care about. Pants version Found on 2.13.0 but can repro on current main (ede74f2) OS Only tested on Linux pantsbuild/pants