This repository has been archived by the owner on Apr 1, 2020. It is now read-only.
Bugfix: FileSystemWatcher - crash when there is an error #2142
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.
Issue: On Windows, I noticed that when I built the unit tests, Oni would crash and just show a blank screen.
Defect:
chokidar
was emitting several error events around the fileysystem, for exampe:This was easy to repro on Windows by running
npm run test:unit:browser
while theE:/oni
directory was the active workspace, or by deleting thelib_test
folder.Fix: Handle the 'error' event and log out warnings. These aren't usually actionable for us, and are just noise - for example, it's expected when the
lib_test
folder is deleted that you'd get an error trying to access a subdirectory, and we don't need to do anything special. However, handling the error event means it doesn't bubble up and crash the editor.