-
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
fix(dotnet): missing ? on nullable interface members #1287
Conversation
When interfaces declare nullable members, the code generator erroneously omitted the `?` that denotes it, while generated implementations of the interface would have it, causing compilation failures. Fixes #1285
I have locally code-generated for the AWS CDK with this patch enabled, and all modules compiled fine. |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
const getterType = this.toJavaType(prop.type); | ||
const setterTypes = this.toJavaTypes(prop.type); | ||
const getterType = this.toDecoratedJavaType(prop); | ||
const setterTypes = this.toDecoratedJavaTypes(prop); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How do we know we didn't forget more of these?
This is a potential BREAKING CHANGE in .NET and Java, no? |
In Java, I don't look at it as breaking (the annotations do not have any intrinsic compilation or runtime behavior. They may trigger linter rules by their presence, but generally speaking this will be in highlight of possible bugs, and shouldn't prevent compiling the code, still). In DotNet, this may be breaking if the user's project enabled the |
Thank you for contributing! ❤️ I will now look into making sure the PR is up-to-date, then proceed to try and merge it! |
Merging (with squash)... |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Merging (with squash)... |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Merging (with squash)... |
When interfaces declare nullable members, the code generator erroneously omitted the
?
that denotes it, while generated implementations of the interface would have it, causing compilation failures.Fixes #1285
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.