Skip to content

Conversation

@aws-cdk-automation
Copy link
Collaborator

Backport

This will backport the following commits from main to maintenance/v5.3:

Questions ?

Please refer to the Backport tool documentation

The following is a minimal reproducing example: ```ts export interface ISomeInterface { readonly xyz?: string; } export abstract class SomeClass implements ISomeInterface { } ``` This breaks code generation for C#, as the `SomeClass._Proxy` class we generate will try to generate an `override` for the `Xyz` property, which is missing from the `SomeClass` class itself. This issue is exhibited by a difference in logic between how we iterate the members of a class when we generate the class itself vs when we generate its proxy. However, after looking at the code I'm not convinced it's correct either way (nor for Java), so to be safe we picked the solution where we force the user to declare the property on the class. The correct declaration would be: ```ts export abstract class SomeClass implements ISomeInterface { public abstract readonly xyz?: string; } ``` Related: https://github.com/aws/aws-cdk/pull/31946/files --- By submitting this pull request, I confirm that my contribution is made under the terms of the [Apache 2.0 license]. [Apache 2.0 license]: https://www.apache.org/licenses/LICENSE-2.0 --------- Signed-off-by: github-actions <github-actions@github.com> Co-authored-by: github-actions <github-actions@github.com> (cherry picked from commit 3322f9e)
@aws-cdk-automation aws-cdk-automation added this pull request to the merge queue Oct 30, 2024
Merged via the queue into maintenance/v5.3 with commit 09d956d Oct 30, 2024
77 checks passed
@aws-cdk-automation aws-cdk-automation deleted the backport/maintenance/v5.3-pr-1448 branch October 30, 2024 18:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-approve Automatically approve this PR backport

2 participants