-
Notifications
You must be signed in to change notification settings - Fork 190
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
Make CustomizableOperation
Send
and Sync
#2951
Conversation
A new generated diff is ready to view.
A new doc preview is ready to view. |
There was a problem hiding this 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.
...amazon/smithy/rust/codegen/client/smithy/generators/client/CustomizableOperationGenerator.kt
Outdated
Show resolved
Hide resolved
This commit addresses #2951 (comment)
A new generated diff is ready to view.
A new doc preview is ready to view. |
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, |
There was a problem hiding this comment.
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.
A new generated diff is ready to view.
A new doc preview is ready to view. |
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 beSend
andSync
because the struct contained a boxed trait object. This PR fix that issue, makingCustomizableOperation
Send
andSync
again.Testing
CustomizableOperation
isSend
andSync
.Checklist
CHANGELOG.next.toml
if I made changes to the smithy-rs codegen or runtime cratesCHANGELOG.next.toml
if I made changes to the AWS SDK, generated SDK code, or SDK runtime cratesBy submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.