Skip to content

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

Merged
dbkr merged 1 commit intodevelopfrom
luke/fix-copy-res-gen-i18n-crash
Mar 5, 2018
Merged

Fix crash; fs event received /w langauge file empty#6273
dbkr merged 1 commit intodevelopfrom
luke/fix-copy-res-gen-i18n-crash

Conversation

@lukebarnard1
Copy link
Copy Markdown
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
Copy Markdown
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