Mark changes to Functional (SAM) interfaces or any interface as a "Breaking Change" #15745
Closed
michaelbrewer
started this conversation in
General
Replies: 2 comments 6 replies
-
@michaelbrewer can you please also mention whether it was a breaking change? If so, what did it break? |
Beta Was this translation helpful? Give feedback.
3 replies
-
Hey @michaelbrewer, thanks for opening the issue. This is mostly a JSII concern, so I would recommend opening an issue to that project, and seeing what they say: https://github.com/aws/jsii/issues. Perhaps there's a way to generate that interface as: public interface IAliasRecordTarget extends software.amazon.jsii.JsiiSerializable {
@Stability(Stable)
@NotNull AliasRecordTargetConfig bind(@NotNull IRecordSet record, @Nullable IHostedZone zone);
@Stability(Stable)
default @NotNull AliasRecordTargetConfig bind(@NotNull IRecordSet record) {
return this.bind(record, null);
}
} However, that's up to the JSII team to decide. Thanks, |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
As an example the recent change to IAliasRecordTarget, was a breaking change, as IAliasRecordTarget in Java (Kotlin) stopped being a Single Abstract Method.
See the below example that compiles in AWS CDK 1.107.0 but does not compile with AWS CDK 1.108.0 and above. And there was no notification of breaking changes in the AWS CDK 1.108.0 release.
Changes:
Defaults behind the changes
Typescript before:
Typescript after:
Resulting in a change from this:
To this
And therefore no longer a SAM
The fix
So in order to fix this in AWS CDK 1.108.0 and above the following changes needed to be made to the code
Example PR:
Beta Was this translation helpful? Give feedback.
All reactions