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

go: invalid generated output for a class named Default #2637

Closed
1 of 5 tasks
eladb opened this issue Mar 3, 2021 · 1 comment · Fixed by #2641, cdk8s-team/cdk8s-operator#228 or awslabs/aws-delivlib-sample#83
Closed
1 of 5 tasks
Labels
bug This issue is a bug. needs-triage This issue or PR still needs to be triaged.

Comments

@eladb
Copy link
Contributor

eladb commented Mar 3, 2021

🐛 Bug Report

Affected Languages

  • Golang
  • TypeScript or Javascript
  • Python
  • Java
  • .NET (C#, F#, ...)

General Information

  • JSII Version: 1.23.0
  • Platform: any

What is the problem?

Consider the following jsii code:

export class Default {
  public sayHello() {
    return 'hello, world!';
  }
}

The output of jsii-pacmak is:

# godefault
./godefault.go:14:6: syntax error: unexpected default, expecting name
./godefault.go:20:7: syntax error: unexpected default, expecting expression
./godefault.go:22:2: syntax error: non-declaration statement outside function body
./godefault.go:32:10: syntax error: unexpected default, expecting type

Verbose Log

The generated source looks like this:

godefault.go:

carbon-2

@eladb eladb added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Mar 3, 2021
mergify bot pushed a commit to aws/aws-cdk that referenced this issue Mar 3, 2021
This reverts commit e8f0c3c due to some issue in go code generation (namely aws/jsii#2638 and aws/jsii#2637) and unacceptable build performance for producing bindings for all CDK modules.

Our plan is to fix the relevant issues and only produce go bindings for monocdk instead of all modules.


----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
eladb pushed a commit that referenced this issue Mar 3, 2021
Since these structs are all private, simply add a `_jsiiClass` postfix to the name.

Fixes #2637
eladb pushed a commit that referenced this issue Mar 3, 2021
Since these structs are all private, simply add a `_jsiiClass` postfix to the name.

Fixes #2637
eladb pushed a commit that referenced this issue Mar 3, 2021
Since these structs are all private, simply add a `_jsiiProxy` postfix to the name.

Fixes #2637
@github-actions
Copy link
Contributor

github-actions bot commented Mar 3, 2021

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

cornerwings pushed a commit to cornerwings/aws-cdk that referenced this issue Mar 8, 2021
This reverts commit e8f0c3c due to some issue in go code generation (namely aws/jsii#2638 and aws/jsii#2637) and unacceptable build performance for producing bindings for all CDK modules.

Our plan is to fix the relevant issues and only produce go bindings for monocdk instead of all modules.


----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
This was referenced Mar 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment