Unverified Commit ed8763e5 authored by ysaito1001's avatar ysaito1001 Committed by GitHub
Browse files

Re-point those using `ByteStream` and `SdkBody` to smithy-types (#3076)

# Motivation and Context
A follow-up on #3026

## Description
#3026 moved
- `aws_smithy_http::body::{BoxBody, Error, SdkBody}` to
`aws_smithy_types::body::{BoxBody, Error, SdkBody}`
- `aws_smithy_http::byte_stream::{AggregatedBytes, ByteStream,
error::Error}` to `aws_smithy_types::byte_stream::{AggregatedBytes,
ByteStream, error::Error}`

and also left "breadcrumbs", so that customers could still consume
updated types from `aws_smithy_http` after the move.

This PR turns breadcrumbs into deprecation messages (via
`#[deprecated(...)]`) and updates existing places that used to use moved
types from `aws_smithy_http` to directly depend on `aws_smithy_types`.

## Testing
Relied on tests in CI.

## Checklist
<!--- If a checkbox below is not applicable, then please DELETE it
rather than leaving it unchecked -->
- [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._
parent e447a227
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -434,3 +434,19 @@ message = """
references = ["smithy-rs#3054", "smithy-rs#3070"]
meta = { "breaking" = true, "tada" = false, "bug" = false, "target" = "all" }
author = "ysaito1001"

[[smithy-rs]]
message = """
`aws_smithy_http::body::{BoxBody, Error, SdkBody}` have been moved to `aws_smithy_types::body::{BoxBody, Error, SdkBody}`. Type aliases for them are left in `aws_smithy_http` for backwards compatibility but are deprecated.
"""
references = ["smithy-rs#3076"]
meta = { "breaking" = true, "tada" = false, "bug" = false, "target" = "all" }
author = "ysaito1001"

[[smithy-rs]]
message = """
`aws_smithy_http::byte_stream::{AggregatedBytes, ByteStream, error::Error}` have been moved to `aws_smithy_types::byte_stream::{AggregatedBytes, ByteStream, error::Error}`. Type aliases for them are left in `aws_smithy_http` for backwards compatibility but are deprecated.
"""
references = ["smithy-rs#3076"]
meta = { "breaking" = true, "tada" = false, "bug" = false, "target" = "all" }
author = "ysaito1001"
+1 −1
Original line number Diff line number Diff line
@@ -442,11 +442,11 @@ mod test {
    use aws_credential_types::Credentials;
    use aws_smithy_async::future::never::Never;
    use aws_smithy_async::rt::sleep::TokioSleep;
    use aws_smithy_http::body::SdkBody;
    use aws_smithy_runtime::client::http::test_util::{ReplayEvent, StaticReplayClient};
    use aws_smithy_runtime_api::client::dns::DnsFuture;
    use aws_smithy_runtime_api::client::http::HttpClient;
    use aws_smithy_runtime_api::shared::IntoShared;
    use aws_smithy_types::body::SdkBody;
    use aws_types::os_shim_internal::Env;
    use futures_util::FutureExt;
    use http::header::AUTHORIZATION;
+2 −2
Original line number Diff line number Diff line
@@ -12,7 +12,6 @@ use crate::json_credentials::{parse_json_credentials, JsonCredentials, Refreshab
use crate::provider_config::ProviderConfig;
use aws_credential_types::provider::{self, error::CredentialsError};
use aws_credential_types::Credentials;
use aws_smithy_http::body::SdkBody;
use aws_smithy_http::result::SdkError;
use aws_smithy_runtime::client::orchestrator::operation::Operation;
use aws_smithy_runtime::client::retries::classifiers::{
@@ -26,6 +25,7 @@ use aws_smithy_runtime_api::client::orchestrator::{
use aws_smithy_runtime_api::client::retries::classifiers::ClassifyRetry;
use aws_smithy_runtime_api::client::retries::classifiers::RetryAction;
use aws_smithy_runtime_api::client::runtime_plugin::StaticRuntimePlugin;
use aws_smithy_types::body::SdkBody;
use aws_smithy_types::config_bag::Layer;
use aws_smithy_types::retry::RetryConfig;
use aws_smithy_types::timeout::TimeoutConfig;
@@ -220,8 +220,8 @@ impl ClassifyRetry for HttpCredentialRetryClassifier {
mod test {
    use super::*;
    use aws_credential_types::provider::error::CredentialsError;
    use aws_smithy_http::body::SdkBody;
    use aws_smithy_runtime::client::http::test_util::{ReplayEvent, StaticReplayClient};
    use aws_smithy_types::body::SdkBody;
    use http::{Request, Response, Uri};
    use std::time::SystemTime;

+2 −2
Original line number Diff line number Diff line
@@ -13,7 +13,6 @@ use crate::provider_config::ProviderConfig;
use crate::PKG_VERSION;
use aws_http::user_agent::{ApiMetadata, AwsUserAgent};
use aws_runtime::user_agent::UserAgentInterceptor;
use aws_smithy_http::body::SdkBody;
use aws_smithy_http::result::ConnectorError;
use aws_smithy_http::result::SdkError;
use aws_smithy_runtime::client::orchestrator::operation::Operation;
@@ -31,6 +30,7 @@ use aws_smithy_runtime_api::client::retries::classifiers::{
};
use aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder;
use aws_smithy_runtime_api::client::runtime_plugin::{RuntimePlugin, SharedRuntimePlugin};
use aws_smithy_types::body::SdkBody;
use aws_smithy_types::config_bag::{FrozenLayer, Layer};
use aws_smithy_types::endpoint::Endpoint;
use aws_smithy_types::retry::RetryConfig;
@@ -583,7 +583,6 @@ pub(crate) mod test {
    use crate::provider_config::ProviderConfig;
    use aws_smithy_async::rt::sleep::TokioSleep;
    use aws_smithy_async::test_util::{instant_time_and_sleep, InstantSleep};
    use aws_smithy_http::body::SdkBody;
    use aws_smithy_http::result::ConnectorError;
    use aws_smithy_runtime::client::http::test_util::{
        capture_request, ReplayEvent, StaticReplayClient,
@@ -596,6 +595,7 @@ pub(crate) mod test {
        HttpRequest, HttpResponse, OrchestratorError,
    };
    use aws_smithy_runtime_api::client::retries::classifiers::{ClassifyRetry, RetryAction};
    use aws_smithy_types::body::SdkBody;
    use aws_smithy_types::error::display::DisplayErrorContext;
    use aws_types::os_shim_internal::{Env, Fs};
    use http::header::USER_AGENT;
+1 −1
Original line number Diff line number Diff line
@@ -5,10 +5,10 @@

//! Error types for [`ImdsClient`](crate::imds::client::Client)

use aws_smithy_http::body::SdkBody;
use aws_smithy_http::endpoint::error::InvalidEndpointError;
use aws_smithy_http::result::SdkError;
use aws_smithy_runtime_api::client::orchestrator::HttpResponse;
use aws_smithy_types::body::SdkBody;
use std::error::Error;
use std::fmt;

Loading