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

Enforce private on traits #1406

Merged
merged 2 commits into from
Sep 20, 2022

Conversation

milesziemer
Copy link
Contributor

Issue #, if available:
#1369
Description of changes:
PrivateAccessValidator was not checking trait relationships which allowed private traits to be referenced in any namespace. The HttpConfiguration mixin in aws.protocols was not including private in its localTraits, which caused the private trait to be applied to any shape that mixed in HttpConfiguration. This issue wasn't apparent because trait relationships were not being validated for private access. The private access validation test was updated to check for this.

This could be a breaking change for any Smithy models that are using private traits in other namespaces, either directly or through a mixin that doesn't have private included in its localTraits.

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

@milesziemer milesziemer requested a review from a team as a code owner September 15, 2022 14:02
@milesziemer milesziemer merged commit 88e2d1f into smithy-lang:main Sep 20, 2022
@milesziemer milesziemer deleted the enforce-private-on-traits branch September 20, 2022 23:25
kstich added a commit to kstich/smithy that referenced this pull request Sep 28, 2022
kstich added a commit that referenced this pull request Sep 28, 2022
milesziemer added a commit to milesziemer/smithy that referenced this pull request Sep 29, 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.

None yet

2 participants