Skip to content

Conversation

@mrgrain
Copy link
Contributor

@mrgrain mrgrain commented Oct 28, 2025

Currently generated Go code is not compiled, which leads to potential codegen mistakes slipping in.

Switch on compilation by default; i.e., make the opt-in environment variable an opt-out environment variable.

This revealed a problem with covariant return types in Go; this concept does not exist. We'll solve that by not emitting the more specific return type. This means Go users will not benefit from the additional typing, but the feature can remain in other languages and the compilation will succeed. Go users instead get documentation telling them the real type. They can easily user interface conversions to convert to the actual type. While this is a lot awkward, it still makes it possible for Go users to benefit from this improvement in most circumstances.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

rix0rrr and others added 3 commits October 28, 2025 14:41
Currently generated Go code is not compiled, which leads to potential
codegen mistakes slipping in.

Switch on compilation by defualt; i.e., make the opt-in environment
variable an opt-out environment variable.
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Oct 28, 2025
@mergify
Copy link
Contributor

mergify bot commented Oct 28, 2025

Thank you for contributing! ❤️ I will now look into making sure the PR is up-to-date, then proceed to try and merge it!

@mergify mergify bot added the pr/ready-to-merge This PR is ready to be merged. label Oct 28, 2025
@mergify
Copy link
Contributor

mergify bot commented Oct 28, 2025

Merging (with squash)...

@mergify mergify bot added the queued label Oct 28, 2025
@mergify mergify bot merged commit 2c39079 into main Oct 28, 2025
38 checks passed
@mergify mergify bot deleted the mrgrain/fix/covariant-overrides-go branch October 28, 2025 19:24
@mergify mergify bot removed pr/ready-to-merge This PR is ready to be merged. queued labels Oct 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contribution/core This is a PR that came from AWS.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants