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(rosetta): attempts transliteraiton to unsupported languages #3478

Merged
merged 2 commits into from
Apr 26, 2022

Conversation

RomainMuller
Copy link
Contributor

Rosetta attempted to perform transliteration to unsupported languages
when requested to, which would likely result in incorrect output, if not
a complete crash (due to missing required configuration).

This stops trying to emit transliterated assemblies for languages that
the original assembly does not support.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Rosetta attempted to perform transliteration to unsupported languages
when requested to, which would likely result in incorrect output, if not
a complete crash (due to missing required configuration).

This stops trying to emit transliterated assemblies for languages that
the original assembly does not support.
@RomainMuller RomainMuller self-assigned this Apr 11, 2022
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Apr 11, 2022
@@ -99,6 +100,12 @@ export async function transliterateAssembly(
const now = new Date().getTime();
// eslint-disable-next-line no-await-in-loop
const result = await loadAssembly();

if (result.targets?.[targetName(language)] == null) {
// This language is not supported by the assembly, so we skip it...
Copy link
Contributor

Choose a reason for hiding this comment

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

Wondering if we need some explicit output to tell callers that a language is unsupported?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah but we'd want that ONLY if the language was specifically requested...?

@RomainMuller RomainMuller merged commit db2d62e into main Apr 26, 2022
@RomainMuller RomainMuller deleted the rmuller/translate-missing-skip-unsupported branch April 26, 2022 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution/core This is a PR that came from AWS.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants