-
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
go/python: members with same name but different capitalization result in duplicate declarations #2508
Comments
This is technically blocking the release of CDK for Go since the |
This also happens in Python albeit does not produce an error during build and the methods just override each other. The |
…pitalization In TypeScript, it is possible to give two members (methods/properties) the same name but with different capitalization. This results in duplicate members in Go and Python. In Go, where the member is expected to be PascalCase, use the same conversion used in .NET, in which we only capitalize the first letter (assuming TypeScript uses camelCase). This offers more tolerance. In Python, where members use snake_case, we implemented a different heuristic in which we only render the non-deprecated member and fail if there is more than one deprecated member. Fixes #2508
…nt casing (#2699) In TypeScript, it is possible to give two members (methods/properties) the same name but with different capitalization. This results in duplicate members in Go and Python. In Go, where the member is expected to be PascalCase, use the same conversion used in .NET, in which we only capitalize the first letter (assuming TypeScript uses camelCase). This offers more tolerance. In Python, where members use snake_case, we implemented a different heuristic in which we only render the non-deprecated member and fail if there is more than one deprecated member. In Java, this issue existed only for property names. Fixes #2508 BREAKING CHANGE: if multiple members have the same name with different capitalization, only one is allowed to be non-deprecated. This will currently only manifest when producing python bindings, but will be added as a jsii compiler error in the future.
|
Add `go` configuration to the `monocdk` and `aws-cdk-lib` packages. Resolves aws/jsii#2611 The following jsii bugs were fixed to enable this: - [x] aws/jsii#2648 - [x] aws/jsii#2649 - [x] aws/jsii#2647 - [x] aws/jsii#2617 - [x] aws/jsii#2632 - [x] aws/jsii#2651 - [x] aws/jsii#2508 - [x] aws/jsii#2692 - [x] aws/jsii#2700 - [x] aws/jsii#2702 --- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Add `go` configuration to the `monocdk` and `aws-cdk-lib` packages. Resolves aws/jsii#2611 The following jsii bugs were fixed to enable this: - [x] aws/jsii#2648 - [x] aws/jsii#2649 - [x] aws/jsii#2647 - [x] aws/jsii#2617 - [x] aws/jsii#2632 - [x] aws/jsii#2651 - [x] aws/jsii#2508 - [x] aws/jsii#2692 - [x] aws/jsii#2700 - [x] aws/jsii#2702 --- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Add `go` configuration to the `monocdk` and `aws-cdk-lib` packages. Resolves aws/jsii#2611 The following jsii bugs were fixed to enable this: - [x] aws/jsii#2648 - [x] aws/jsii#2649 - [x] aws/jsii#2647 - [x] aws/jsii#2617 - [x] aws/jsii#2632 - [x] aws/jsii#2651 - [x] aws/jsii#2508 - [x] aws/jsii#2692 - [x] aws/jsii#2700 - [x] aws/jsii#2702 --- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Add `go` configuration to the `monocdk` and `aws-cdk-lib` packages. Resolves aws/jsii#2611 The following jsii bugs were fixed to enable this: - [x] aws/jsii#2648 - [x] aws/jsii#2649 - [x] aws/jsii#2647 - [x] aws/jsii#2617 - [x] aws/jsii#2632 - [x] aws/jsii#2651 - [x] aws/jsii#2508 - [x] aws/jsii#2692 - [x] aws/jsii#2700 - [x] aws/jsii#2702 --- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Add `go` configuration to the `monocdk` and `aws-cdk-lib` packages. Resolves aws/jsii#2611 The following jsii bugs were fixed to enable this: - [x] aws/jsii#2648 - [x] aws/jsii#2649 - [x] aws/jsii#2647 - [x] aws/jsii#2617 - [x] aws/jsii#2632 - [x] aws/jsii#2651 - [x] aws/jsii#2508 - [x] aws/jsii#2692 - [x] aws/jsii#2700 - [x] aws/jsii#2702 --- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
🐛 Bug Report
Affected Languages
Golang
General Information
What is the problem?
If a class has two methods with the same name but slightly different capitalization, the go code generator may end up with the same method name and eventually result in a duplicate definition error.
For example, in CDK8s, we had the following:
This resulted in the following error during jsii-pacmak:
The text was updated successfully, but these errors were encountered: