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): extension & overrides mechanism #2717

Merged
merged 16 commits into from
Mar 19, 2021
Merged

Conversation

RomainMuller
Copy link
Contributor

This implements and documents a mechanism for supporting class
extension and overrides in go, where such concepts are not endemic.

This uses a new "overriding" constructor generated for open classes,
and a special tag users should use to specify which members are
overridden on the base type.


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

This reduces object (re)allocations and makes the code a little
more efficient. Nothing groud-breaking through.
# Conflicts:
#	packages/@jsii/go-runtime/jsii-runtime-go/internal/typeregistry/registration.go
#	packages/@jsii/go-runtime/jsii-runtime-go/internal/typeregistry/typeregistry.go
#	packages/@jsii/go-runtime/jsii-runtime-go/runtime.go
#	packages/jsii-pacmak/test/generated-code/__snapshots__/target-go.test.ts.snap
# Conflicts:
#	packages/@jsii/go-runtime-test/project/compliance_test.go
#	packages/@jsii/go-runtime/jsii-runtime-go/internal/typeregistry/registration.go
#	packages/@jsii/go-runtime/jsii-runtime-go/runtime.go
#	packages/jsii-pacmak/test/generated-code/__snapshots__/target-go.test.ts.snap
@RomainMuller RomainMuller added language/go Regarding GoLang bindings effort/medium Medium work item – a couple days of effort contribution/core This is a PR that came from AWS. labels Mar 17, 2021
@RomainMuller RomainMuller requested a review from a team March 17, 2021 14:52
@RomainMuller RomainMuller self-assigned this Mar 17, 2021
Copy link
Contributor

@eladb eladb left a comment

Choose a reason for hiding this comment

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

DevEx looks pretty good to me. Great job!

@iliapolo iliapolo added the pr/do-not-merge This PR should not be merged at this time. label Mar 18, 2021
Copy link
Contributor

@iliapolo iliapolo left a comment

Choose a reason for hiding this comment

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

Looks good. Just some doc comments. Added do-not-merge

# Conflicts:
#	packages/@jsii/go-runtime-test/project/compliance_test.go
#	packages/@jsii/go-runtime/jsii-runtime-go/internal/kernel/conversions.go
#	packages/jsii-pacmak/test/generated-code/__snapshots__/target-go.test.ts.snap
@RomainMuller RomainMuller removed the pr/do-not-merge This PR should not be merged at this time. label Mar 18, 2021
@mergify
Copy link
Contributor

mergify bot commented Mar 18, 2021

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 Mar 18, 2021
@mergify
Copy link
Contributor

mergify bot commented Mar 18, 2021

Merging (with squash)...

# Conflicts:
#	gh-pages/content/specification/6-compliance-report.md
#	packages/@jsii/go-runtime-test/project/compliance_test.go
#	packages/jsii-pacmak/lib/targets/go/runtime/class-constructor.ts
#	packages/jsii-pacmak/test/generated-code/__snapshots__/examples.test.ts.snap
#	packages/jsii-pacmak/test/generated-code/__snapshots__/target-go.test.ts.snap
@mergify
Copy link
Contributor

mergify bot commented Mar 18, 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

@mergify mergify bot merged commit 33f3b26 into main Mar 19, 2021
@mergify mergify bot deleted the rmuller/abstract-classes branch March 19, 2021 16:01
@mergify
Copy link
Contributor

mergify bot commented Mar 19, 2021

Merging (with squash)...

@mergify mergify bot removed the pr/ready-to-merge This PR is ready to be merged. label Mar 19, 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/medium Medium work item – a couple days of effort language/go Regarding GoLang bindings
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants