Repository navigation
Conversation
Fixes three regressions since 0.87.1: - #2064 drops cached files outside the roots on a warm start. Watchman lists a symlinked root's files under its real path, so they're all dropped, and imports into it fail until `--reset-cache`: ```js watchFolders: [path.resolve(__dirname, 'node_modules/my-linked-lib')] ``` Real paths of roots now count too (built-in crawlers only). - #1946 broke `hierarchicalLookup` through a symlink in a root to its parent: ``` app/monorepo -> .. (watchFolders: ['/repo']) import './monorepo/shared' -> ENOENT: /repo/app/mo/package.json ``` - #1677 stopped the Node crawler normalising roots: ``` roots: ['/proj/sub/'] -> 'sub//a.js' roots: ['/proj/other/../shared'] -> blockList for '/shared/dist' ignored ``` Changelog: Internal Test plan: - New unit tests for each, failing without this change. - Real Watchman, watch folder linked from `node_modules`: 3/3 files on a warm start (`main`: 1/3). - `hierarchicalLookup` fuzz, 50k lookups in random symlinked trees: every difference from before #1946 matches a real-path model.
This branch has not been deployed
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes three edge case regressions since 0.87.1:
watchFoldersto non-real paths. Watchman lists a symlinked root's files under its real path, so they're all dropped, and imports into it fail until--reset-cache:hierarchicalLookupthrough a symlink in a root to its parent:Changelog: Internal
Test plan:
node_modules: 3/3 files on a warm start (main: 1/3).hierarchicalLookupfuzz, 50k lookups in random symlinked trees: every difference from before metro-file-map: Check hierarchicalLookup candidates from their own nodes聽#1946 matches a real-path model.