Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix crash; fs event received /w langauge file empty #6273

Merged
merged 1 commit into from Mar 5, 2018

Conversation

@lukebarnard1
Copy link
Contributor

lukebarnard1 commented Mar 2, 2018

It was common, at least for me, to experience a crash produced
when running the matrix-react-sdk/scripts/gen-i18n.js script
because when writing en_EN.json (via the script or otherwise)
choikdar would receive an event and cause the file to be read,
but the file would be empty when clearly it wasn't.

This would happen even when doing an atomic write in gen-i18n.

The fix adds a debounce as a workaround.

It was common, at least for me, to experience a crash produced
when running the `matrix-react-sdk/scripts/gen-i18n.js` script
because when writing en_EN.json (via the script or otherwise)
choikdar would receive an event and cause the file to be read,
but the file would be empty when clearly it wasn't.

This would happen even when doing an atomic write in gen-i18n.

The fix adds a debounce as a workaround.
@dbkr
dbkr approved these changes Mar 5, 2018
Copy link
Member

dbkr left a comment

Ew, but OK - only nicer way I can think of is catching the exception and re-scheduling the update (or use an editor that atomically renames the file into place...)

@dbkr dbkr merged commit 8f578f7 into develop Mar 5, 2018
2 checks passed
2 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.