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): crashes on behavioral interfaces #1169

Merged
merged 2 commits into from
Jan 3, 2020

Conversation

rix0rrr
Copy link
Contributor

@rix0rrr rix0rrr commented Jan 3, 2020

Behavioral interfaces (ISomething) weren't translated at all, and used
to crash the Java translator. Add translations for them.

Make the jsii-rosetta command-line tool more robust against errors in
the translator: catch and report the error, instead of crashing.

Add support for shorthand property assignments in object literals
(someFunction({ foo });) for Java as well, which wasn't covered
by any test yet.


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

Behavioral interfaces (`ISomething`) weren't translated at all, and used
to crash the Java translator. Add translations for them.

Make the `jsii-rosetta` command-line tool more robust against errors in
the translator: catch and report the error, instead of crashing.

Add support for shorthand property assignments in object literals
(`someFunction({ foo });`) for Java as well, which wasn't covered
by any test yet.
@rix0rrr rix0rrr requested review from MrArnoldPalmer and a team as code owners January 3, 2020 11:35
@rix0rrr rix0rrr self-assigned this Jan 3, 2020
@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • Result: FAILED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

failures.push({
category: ts.DiagnosticCategory.Error,
code: 999,
messageText: `Error translating snippet: ${e}\n${block.completeSource}`,
Copy link
Contributor

Choose a reason for hiding this comment

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

Prefix with “Jsii-Rosetta” or something like this.

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@rix0rrr rix0rrr merged commit 5f3e9e0 into master Jan 3, 2020
@rix0rrr rix0rrr deleted the huijbers/rosetta-fixes branch January 3, 2020 12:52
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.

3 participants