-
Notifications
You must be signed in to change notification settings - Fork 620
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TreeFS: Return traversed symlinks and first missing segments in looku…
…p results (#1217) Summary: Pull Request resolved: #1217 A module resolution should be invalidated whenever the (non-)existence of a path checked during resolution may have changed. To implement this, we'll need more information from the `FileSystem` APIs. ## Existence A positive existence check is straightforwardly invalidated when either: - The resolved `realPath` is deleted (we already watch for this), or - Any symlink traversed on the way to the real path is deleted or modified. We will need to track symlinks traversed by their real paths. ## Non-existence For non-existence, note that it is not sufficient to simply watch for file events whose path matches the path originally looked up, because file events are emitted for real paths, and the checked path may resolve through one or more symlinks. We will require: - The first missing *real* path segment encountered (because we can watch for additions at this path, but not necessarily any of its descendants, should a symlink be created at this path), *and* - The symlinks traversed to get to that first missing segment (because changes to these invalidate which real path we should watch for an addition). ## This diff This adds `links`, the set of traversed links by their canonical paths, and `missing` (for non-existence) - the first non-navigable path segment by its canonical path. Changelog: Internal Reviewed By: huntie Differential Revision: D52391404 fbshipit-source-id: 40ec2717df6a4f5837832d789e3a6a80a2178c83
- Loading branch information
1 parent
6338512
commit 451e2a1
Showing
3 changed files
with
167 additions
and
33 deletions.
There are no files selected for viewing
This file contains 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 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 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