-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid bug where watch mode can get stuck in invalid state (#3922)
Summary: 1. Start the Relay compiler in watch mode 2. Find a file with an existing fragment and duplicate is (cmd+c, cmd+v in VSCode file tree) 3. Observe a compiler error in your terminal due to duplicate fragment names 4. Delete the `... copy.js` file Compiler compiles with no errors Compiler still complains about duplicate fragments despite the `... copy.js` file not existing any more When merging new sets of pending files, we ignore empty (deleted in this case) files that are missing from the processed set of files. But we fail to consider the fact that the file might already exist in the pending set. If a file is already in the pending set, always update it. Otherwise we can end up with state data in the compiler. Pull Request resolved: #3922 Reviewed By: voideanvalue Differential Revision: D36629649 Pulled By: captbaritone fbshipit-source-id: a92eb6cc92696a5af782950beed2dbbe340cda13
- Loading branch information
1 parent
dd48057
commit 141ef0f
Showing
1 changed file
with
83 additions
and
23 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