-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[flow] No longer make libdef parsing error stop the world
Summary: Currently, if we fail to parse libdef files (determined by failed to find them in the parsing heap), we will stop all work (no checking at all). I managed to trace the behavior back to D2176600 when it's first introduced. It's still unclear to me why we have to do this. Maybe we want to show all the libdef errors up front rather than make it hidden in a sea of other errors, but it would be better achieved at the error printing stage. Since the end of last year, the handling of libdef has switched to a new system: it's treated mostly as a normal file, except that we will run a special type sig merge to extract the signatures of the globals. Under the new system, the stop-the-world behavior seems even more weird and inconsistent, especially consider that we only stop the world for parse but not checking error for libdef. Therefore, I decide to remove this behavior in this diff. Changelog: [internal] Reviewed By: panagosg7 Differential Revision: D54989487 fbshipit-source-id: 3dd2977dce25d12f93399502d004b02bb87474e0
- Loading branch information
1 parent
f12aabe
commit 151b3d9
Showing
8 changed files
with
69 additions
and
76 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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
/** | ||
* @flow | ||
*/ | ||
// error will not appear in output, because lib parse errors forego merge | ||
var x: string = 0; | ||
var x: string = 0; // error: number ~> string |
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