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

Flatten and remove mixins from code generation #1680

Merged
merged 14 commits into from
Sep 6, 2022

Conversation

DavidOgunsAWS
Copy link
Contributor

@DavidOgunsAWS DavidOgunsAWS commented Aug 29, 2022

Motivation and Context

The intent of mixins is convenience for service model authors to compose shapes with usable members and traits. These shapes should not be visible products in client SDK or even service implementations as only the final target shape really represents the intended public object interface.

Description

At the start of processing, use a ModelTransformer method to flatten and remove mixins from the model. This prevents any part of code generation from knowing what the mixins are.

Testing

Manual testing so far.

Checklist

  • I have updated CHANGELOG.next.toml if I made changes to the smithy-rs codegen or runtime crates
  • I have updated CHANGELOG.next.toml if I made changes to the AWS SDK, generated SDK code, or SDK runtime crates

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@github-actions
Copy link

github-actions bot commented Sep 3, 2022

A new generated diff is ready to view.

A new doc preview is ready to view.

Copy link
Collaborator

@jdisanti jdisanti left a comment

Choose a reason for hiding this comment

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

This all looks good to me! Just proposing a couple minor tweaks.

CHANGELOG.next.toml Outdated Show resolved Hide resolved
@jdisanti jdisanti merged commit e3239e1 into smithy-lang:main Sep 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants