Skip to content
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

feat(go): represent jsii structs as go structs (only) #2600

Merged
merged 7 commits into from
Feb 25, 2021

Conversation

RomainMuller
Copy link
Contributor

As proposed in aws/aws-cdk-rfcs#292 (this is Approach 4), stop
rendering go interfaces to represent jsii structs, and instead only emit
a plain go struct with the flattened list of fields (own + all super
interfaces).

Made the necessary code changes to de-serialize structs returned
by-reference by the @jsii/kernel by eagerly fecthing all properties.

Also, implemented the option to offer convenience conversion functions
to easily create a parent type from a child type.


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

As proposed in aws/aws-cdk-rfcs#292 (this is *Approach 4*), stop
rendering go interfaces to represent jsii structs, and instead only emit
a plain go struct with the flattened list of fields (own + all super
interfaces).

Made the necessary code changes to de-serialize structs returned
by-reference by the `@jsii/kernel` by eagerly fecthing all properties.

Also, implemented the option to offer convenience conversion functions
to easily create a parent type from a child type.
@RomainMuller RomainMuller added language/go Regarding GoLang bindings effort/small Small work item – less than a day of effort pr/do-not-merge This PR should not be merged at this time. module/pacmak Issues affecting the `jsii-pacmak` module contribution/core This is a PR that came from AWS. labels Feb 23, 2021
@RomainMuller RomainMuller requested a review from a team February 23, 2021 15:02
@RomainMuller RomainMuller self-assigned this Feb 23, 2021
Copy link
Contributor

@MrArnoldPalmer MrArnoldPalmer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only immediate concern is removing the duplicate deprecated docs.

@RomainMuller RomainMuller force-pushed the rmuller/go-no-struct-iface branch from a8551a3 to 5a25183 Compare February 25, 2021 10:39
@mergify
Copy link
Contributor

mergify bot commented Feb 25, 2021

The title of this Pull Request does not conform with [Conventional Commits] guidelines. It will need to be adjusted before the PR can be merged.
[Conventional Commits]: https://www.conventionalcommits.org

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject89A8053A-6Jw05QLuWWwe
  • Commit ID: 6a3476e
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

This was referenced Mar 17, 2021
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. effort/small Small work item – less than a day of effort language/go Regarding GoLang bindings module/pacmak Issues affecting the `jsii-pacmak` module pr/do-not-merge This PR should not be merged at this time.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants