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

Remove service renames after flattenNamespaces #2109

Conversation

milesziemer
Copy link
Contributor

flattenNamespaces applies all service renames to disambiguate shapes that could be in conflict after flattening. But when consumers try to reload the transformed model, they get an error like:

"Service rename for `foo` does not actually change the name from `bar`"

because the rename has already been applied. This commit changes FlattenTransformer to also update the service shape by removing all renames, so consumers of a flattened model don't run into validation issues.

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 January 23, 2024 21:28
@milesziemer milesziemer requested a review from kstich January 23, 2024 21:28
flattenNamespaces applies all service renames to disambiguate shapes
that could be in conflict after flattening. But when consumers try to
reload the transformed model, they get an error like:
```
"Service rename for `foo` does not actually change the name from `bar`"
```
because the rename has already been applied. This commit changes
FlattenTransformer to also update the service shape by removing all renames,
so consumers of a flattened model don't run into validation issues.
@milesziemer milesziemer force-pushed the fix-service-renames-in-flatten-transformer branch from 77d9c3f to 47ca575 Compare January 23, 2024 21:36
@milesziemer milesziemer merged commit a08471b into smithy-lang:main Jan 24, 2024
10 checks passed
hpmellema pushed a commit to hpmellema/smithy that referenced this pull request Jan 25, 2024
flattenNamespaces applies all service renames to disambiguate shapes
that could be in conflict after flattening. But when consumers try to
reload the transformed model, they get an error like:
```
"Service rename for `foo` does not actually change the name from `bar`"
```
because the rename has already been applied. This commit changes
FlattenTransformer to also update the service shape by removing all renames,
so consumers of a flattened model don't run into validation issues.
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