You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
0 commit comments