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

Make CustomizableOperation Send and Sync #2951

Merged

Conversation

ysaito1001
Copy link
Contributor

@ysaito1001 ysaito1001 commented Aug 24, 2023

Motivation and Context

Fixes #2944

Description

CustomizableOperation in the last two releases (release-2023-08-01 and release-2023-08-22) broke backward-compatibility with respect to its auto traits. Specifically, it ceased to be Send and Sync because the struct contained a boxed trait object. This PR fix that issue, making CustomizableOperation Send and Sync again.

Testing

  • Added a Kotlin unit test to verify CustomizableOperation is Send and Sync.

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.

@ysaito1001 ysaito1001 requested a review from a team as a code owner August 24, 2023 23:49
@ysaito1001 ysaito1001 requested a review from a team as a code owner August 24, 2023 23:57
@github-actions
Copy link

A new generated diff is ready to view.

A new doc preview is ready to view.

Copy link
Contributor

@Velfi Velfi left a comment

Choose a reason for hiding this comment

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

Thanks for writing the test.

@github-actions
Copy link

A new generated diff is ready to view.

A new doc preview is ready to view.

@rcoh
Copy link
Collaborator

rcoh commented Aug 28, 2023

hmm, cargo semver-checks should have caught this 🤔

pub(crate) interceptors: Vec<#{SharedInterceptor}>,
pub(crate) runtime_plugins: Vec<#{SharedRuntimePlugin}>,
pub struct CustomizableOperation<T, E, B> {
customizable_send: B,
Copy link
Collaborator

Choose a reason for hiding this comment

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

interesting—I would have thought that just adding the trait bounds would be enough : Send + Sync, I mean, and we could have stayed with Box<dyn ...> doesn't really matter either way though, I guess.

@github-actions
Copy link

A new generated diff is ready to view.

A new doc preview is ready to view.

@ysaito1001 ysaito1001 merged commit cf95f48 into smithy-rs-release-0.56.x Aug 29, 2023
42 checks passed
@ysaito1001 ysaito1001 deleted the ysaito/customizable-operation-send-sync branch August 29, 2023 21:22
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.

4 participants