-
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
Feature-gate uses of items from unstable crates in aws-smithy-types
#3033
Comments
github-merge-queue bot
pushed a commit
that referenced
this issue
Oct 17, 2023
## Motivation and Context Takes care of the first part of #3053 (the remaining part is denoted as `TODO(runtimeCratesVersioningCleanup)` and until that and #3033 are done the issue will not be closed). ## Description This PR moves from `aws-smithy-http` to `aws-smithy-types`: - the `SdkBody` struct - the `byte_stream` module Within the origin crate, we leave "breadcrumbs" (i.e. reexports) for existing customers of the items above so they are not broken by the move. We have just moved `SdkBody` to `aws-smithy-types` without renaming it to see how it looks there. However, as [TODO(naming)](https://github.com/awslabs/smithy-rs/pull/3026/files#diff-090c503b779024fdadb8ac97465c80438635df82e62c42b0d85b588a303d9a95R28) says, we can choose to rename it to just `Body`. Curious to hear what the reviewers think. ## Testing Relied on the tests in CI. ---- _By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice._ --------- Co-authored-by: Russell Cohen <[email protected]>
8 tasks
1 task
github-merge-queue bot
pushed a commit
that referenced
this issue
Oct 25, 2023
…-types` (#3088) ## Motivation and Context Implements #3033 ## Description This PR hides behind cargo features the third-party types from `http-body` and `hyper` crates that are used in`aws-smithy-types`' public API. Customers need to opt-in by enabling a cargo feature `http-body-0-4-x` in `aws-smithy-types` to create an `SdkBody` or `ByteStream` using those third-party types. For more details, please see [the upgrade guide](#3089). As can been seen from code changes, to reduce the surface area where we need to feature-gate things, we have fused the `aws_smithy_types::body::Inner::Streaming` enum variant into `aws_smithy_types::body::Inner::Dyn` variant, thereby removing `SdkBody::from_dyn`. ## Testing Relied on existing tests in CI ## Checklist - [x] I have updated `CHANGELOG.next.toml` if I made changes to the smithy-rs codegen or 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._ --------- Co-authored-by: Zelda Hessler <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
http-body
andhyper
crates are currently exposed in public API forSdkBody
andByteStream
.By introducing a new creation method
from_body
to both types, we should be able to consolidatefrom_dyn
andimpl From<hyper::Body>
, making the use ofhyper
an implementation detail so we don't need to exposehyper
in public API. That's step number one.Step number two is the
http-body
crate still needs to be feature-gated based on its version. By doing so we let customers opt-in to use a unstable version of theBody
trait forSdkBody
andByteStream
and avoid breaking backwards compatibility whenhttp-body
goes to 1.0.The text was updated successfully, but these errors were encountered: