-
-
Notifications
You must be signed in to change notification settings - Fork 636
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
Evaluate removing the invalidation of parent directories when files change #11707
Comments
I've played with this a bit, and will post it soon. But unfortunately it's not quite as effective as we might have hoped.
...and I expect that this kind of behavior is fairly common. |
stuhood
added a commit
that referenced
this issue
Nov 10, 2021
…3566) We have avoided fine grained interaction with the `notify` crate so far, but now that we've seen that `notify` is reliable, we can slowly introduce more logic around event types. This change skips invalidating the parent of a path when the event type is file-data-only (`Modify(Data(Content))`). As mentioned in #11707 though, it's not as effective as we might have hoped, since editors tend to write to temp files and then rename them. It might still have a positive impact in some cases, and seems like a relatively safe first step. Fixes #11707.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Since using
watchman
(which was deprecated in favor ofnotify
in #9714), we have had a special case in place to invalidate the parent directory of a changed file, because in some cases we would not be notified about parent directory changes when a file was created or removed.pants/src/rust/engine/watch/src/lib.rs
Lines 191 to 196 in 5d9d725
It's possible that we could remove this case for some file change events: for example, if we can tell from the type of an event that only the content has changed.
The text was updated successfully, but these errors were encountered: