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: Add deprecated shape remover #716

Closed
wants to merge 4 commits into from

Conversation

sichanyoo
Copy link
Contributor

@sichanyoo sichanyoo commented May 7, 2024

Issue #

awslabs/aws-sdk-swift#1026

Description of changes

  • Adds model preprocessing that removes shapes with deprecated trait based on since property if earlier than cutoff date.

Scope

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

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

Copy link
Contributor

@jbelkins jbelkins left a comment

Choose a reason for hiding this comment

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

The code looks good.

My larger question is whether this logic can lead to breakage where something that depends on a deprecated & removed shape will break (i.e. what if there is a member shape that targets a shape deprecated before our GA.) Not sure if Smithy validates these deprecation traits to make sure that things that depend on deprecated shapes are themselves deprecated.

If it's indeed the case that Smithy validates against that or otherwise protects against this scenario, I'll approve.

Copy link
Contributor

@jbelkins jbelkins left a comment

Choose a reason for hiding this comment

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

Something that just occurred to me on this:

This belongs in SDK, not smithy-swift.

Move this over to aws-sdk-swift and I will re-review.

@sichanyoo
Copy link
Contributor Author

@jbelkins

Smithy does protect against that. Using ModelTransformer::removeShapesIf ensures the model is left in consistent state after removal (any reference to removed shape is removed as well).

Re: this change being appropriate for SDK side, that's a great catch. I'll move changes there and submit PR soon.

@sichanyoo sichanyoo closed this May 17, 2024
@sichanyoo sichanyoo deleted the feat/deprecated-shape-remover branch May 17, 2024 18:33
@sichanyoo
Copy link
Contributor Author

Remover change moved to aws-sdk-swift: awslabs/aws-sdk-swift#1511

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.

2 participants