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

Support removing unused mixins #1951

Merged
merged 1 commit into from
Aug 25, 2023
Merged

Support removing unused mixins #1951

merged 1 commit into from
Aug 25, 2023

Conversation

iancaffey
Copy link
Contributor

@iancaffey iancaffey commented Aug 25, 2023

Description of changes:

FlattenAndRemoveMixins only removes mixins if it flattened 1 or more shapes.

This can cause mixins to leak into downstream code generators (when we really want them inlined).

Specifically, if a Model has mixins which are all unused, it will trigger this behavior. But if at least 1 mixin was flattened into a shape, all mixins will be removed (including unused ones). This can happen in shared Smithy model packages that are meant to be used by multiple downstream services.

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

@iancaffey iancaffey requested a review from a team as a code owner August 25, 2023 18:34
@mtdowling mtdowling merged commit aef7995 into smithy-lang:main Aug 25, 2023
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