-
Notifications
You must be signed in to change notification settings - Fork 630
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Watcher - don't emit symlink events if
enableSymlinks: false
Summary: D42454225 (b1bef3d) introduced whole-graph invalidation on symlink changes, with the intention being that this would only occur if `resolver.unstable_enableSymlinks` was `true`. Unfortunately the event suppression added alongside it in D42454225 (b1bef3d) was broken, due to use of `type` (change type) vs `metadata.type` (file type). Additionally, the previous suppression came too late in file processing - so that even if it had used `metadata.type`, a symlink would be added to the `FileSystem` instance even though no change would be emitted to Metro. This could've caused existence checks to succeed that should fail with `enableSymlinks: false` (and would fail after a recrawl, because crawlers exclude symlinks). This diff moves symlink event detection up to the start of `onChange` processing, and returns early. Changelog: * **Fix**: Don't over-invalidate on symlink changes if resolution through symlinks is not enabled Reviewed By: motiz88 Differential Revision: D43620608 fbshipit-source-id: 4e63258b246308766adf97beef3f7082caab6269
- Loading branch information
1 parent
b422ed6
commit 2303c10
Showing
2 changed files
with
71 additions
and
6 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