Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: When using Sapling in an OSS checkout, Flow does not ignore files under `.hg`, leading to false errors especially in Sapling's `origbackups`, which may contain old versions of files, complete with `// flow` comments, out of context. Changelog: Internal Pull Request resolved: #1412 Test Plan: ## Before ``` yarn flow ls | grep '\.hg' /Users/robhogan/workspace/metro-sl/.hg/runlog/41hxy19HHF6cGBn491508.json /Users/robhogan/workspace/metro-sl/.hg/runlog/37Z4u1Env4S8RkEa44097.json <...> /Users/robhogan/workspace/metro-sl/.hg/origbackups/packages/metro-file-map/src/watchers/common.js /Users/robhogan/workspace/metro-sl/.hg/origbackups/packages/metro-file-map/src/watchers/FSEventsWatcher.js ``` ``` yarn flow ls | wc -l 25908 ``` ``` yarn flow yarn run v1.22.22 $ /Users/robhogan/workspace/metro-sl/node_modules/.bin/flow Debugger attached. Error βββββββββββββββββββββββββββββββββββ .hg/origbackups/packages/metro-file-map/src/watchers/FSEventsWatcher.js:157:18 Private fields must be declared before they can be referenced. #root has not been declared. 154β _emit(payload: Omit<WatcherBackendChangeEvent, 'root'>) { 155β this.emit(ALL_EVENT, { 156β ...payload, 157β root: this.#root, 158β } as WatcherBackendChangeEvent); 159β } 160β ``` ## After ``` yarn flow ls | grep '\.hg' <empty response> ``` ``` yarn flow ls | wc -l 25861 ``` ``` yarn flow yarn run v1.22.22 $ /Users/robhogan/workspace/metro-sl/node_modules/.bin/flow No errors! ``` Reviewed By: hoxyq Differential Revision: D67562554 Pulled By: robhogan fbshipit-source-id: 2989914d64296643f3e27c8d3c55bc6278d883fd
- Loading branch information