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

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.
Copy link
Member

@dbkr dbkr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
@t3chguy t3chguy deleted the luke/fix-copy-res-gen-i18n-crash branch May 12, 2022 09:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants