-
Notifications
You must be signed in to change notification settings - Fork 245
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
feat(pacmak): fail on untranslated snippets #3127
Conversation
Because of backwards compatibility reasons, pacmak will try to live-translate example code it encounters. However, this can add unpredictably to the compile times, especially while we're making sure that rosetta and pacmak agree on API locations for all snippets that are being translated (which are now part of the snippet keys). Add an option to pacmak to fail if any snippets are encountered that are not pre-translated in any of the tablets. This most likely signifies an error. This will be enabled in cdklabs/cdk-ops#1777.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor edits, and maybe an additional test necessary? There seems to be a failing test as well.
rosetta.translateSnippet(SAMPLE_CODE, TargetLanguage.PYTHON); | ||
}).toThrow(/snippet was not found/); | ||
}); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we test UnknownSnippetMode.VERBATIM
as well?
Co-authored-by: kaizen3031593 <36202692+kaizen3031593@users.noreply.github.com>
Co-authored-by: kaizen3031593 <36202692+kaizen3031593@users.noreply.github.com>
…s/jsii into huijbers/pacmak-fail-untranslated
Thank you for contributing! ❤️ I will now look into making sure the PR is up-to-date, then proceed to try and merge it! |
Merging (with squash)... |
Merging (with squash)... |
Merging (with squash)... |
Because of backwards compatibility reasons, pacmak will try to live-translate
example code it encounters. However, this can add unpredictably to the compile
times, especially while we're making sure that rosetta and pacmak agree on API
locations for all snippets that are being translated (which are now part of the
snippet keys).
Add an option to pacmak to fail if any snippets are encountered that are not
pre-translated in any of the tablets. This most likely signifies an error.
This will be enabled in cdklabs/cdk-ops#1777.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.