-
Notifications
You must be signed in to change notification settings - Fork 108
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improved error reporting for unexpected output file deletion (#1270)
## Background Before and after execution of a script, wireit globs and stats the output files in order to remember them across runs. If some process is simultaneously writing to the same output files out-of-band, it is possible for an output file to be deleted in the small amount of time between globbing it and stat'ing it. Before this PR, this situation was not detected, and just resulted in an unknown exception, which we log as an "Internal error". ## Main change After this PR, this situation is specifically detected, and we give a more useful error: ``` [foo] Output file "./some/file.js" was deleted unexpectedly. Is another process writing to the same location? ``` ## Other changes - When an unhandled exception occurs, we now report it with the name of the specific script that failed, instead of with the top-level entry-point script (by catching unknown exceptions on individual script executions, instead of only at the very top-level as before). - Added a test for the similar case where an *input* file is deleted during fingerprinting, and tweaked the error message to suggest that another process might be the cause. - Clarified the default logger vs the simple logger in the README and class names (the default changed from simple to quiet recently, but the README and class names were not quite in sync). - Document the `WIREIT_DEBUG_LOG_FILE` variable.
- Loading branch information
Showing
15 changed files
with
255 additions
and
54 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
Oops, something went wrong.