Unverified Commit cb67d800 authored by Russell Cohen's avatar Russell Cohen Committed by GitHub
Browse files

Cleanup AWS Hyper Features (#947)



* Cleanup features from aws-hyper

* Update codegen

* Update changelog

* Fix examples

* Update CHANGELOG.next.toml

Co-authored-by: default avatarZelda Hessler <zhessler@amazon.com>

Co-authored-by: default avatarZelda Hessler <zhessler@amazon.com>
parent b5f53bed
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -123,3 +123,9 @@ This is to clearly distinguish it from `rustls` and `native_tls` which do not us
meta = { "breaking" = true, "tada" = false, "bug" = false }
author = "rcoh"
references = ["smithy-rs#940"]

[[aws-sdk-rust]]
message = "The features `aws-hyper/rustls` and `aws-hyper/native-tls` have been removed. If you were using these, use the identical features on `aws-smithy-client`."
meta = { "breaking" = true, "tada" = false, "bug" = false }
references = ["smithy-rs#947"]
author = "rcoh"
+4 −17
Original line number Diff line number Diff line
@@ -7,10 +7,6 @@ edition = "2018"
license = "Apache-2.0"
repository = "https://github.com/awslabs/smithy-rs"

[features]
native-tls = ["hyper-tls", "aws-smithy-client/native-tls"]
rustls = ["hyper-rustls", "aws-smithy-client/rustls"]

[dependencies]
aws-endpoint = { path = "../aws-endpoint" }
aws-http = { path = "../aws-http" }
@@ -18,25 +14,16 @@ aws-sig-auth = { path = "../aws-sig-auth" }
aws-smithy-client = { path = "../../../rust-runtime/aws-smithy-client" }
aws-smithy-http = { path = "../../../rust-runtime/aws-smithy-http" }
aws-smithy-http-tower = { path = "../../../rust-runtime/aws-smithy-http-tower" }
aws-smithy-types = { path = "../../../rust-runtime/aws-smithy-types" }
bytes = "1"
fastrand = "1.4.0"
http = "0.2.3"
http-body = "0.4.4"
hyper = { version = "0.14.2", features = ["client", "http1", "http2", "tcp", "runtime"] }
hyper-rustls = { version = "0.22.1", optional = true, features = ["rustls-native-certs"] }
hyper-tls = { version ="0.5.0", optional = true }
tokio = { version = "1", features = ["time"] }
tower = { version = "0.4.6", features = ["util", "retry"] }

pin-project = "1"
tracing = "0.1"
tower = { version = "0.4.6" }

[dev-dependencies]
tokio = { version = "1", features = ["full", "test-util"] }
tower-test = "0.4.0"
aws-types = { path = "../aws-types" }
aws-smithy-client = { path = "../../../rust-runtime/aws-smithy-client", features = ["test-util"] }
http = "0.2.5"
bytes = "1.1.0"
aws-smithy-types = { path = "../../../rust-runtime/aws-smithy-types" }

[[test]]
name = "e2e_test"
+3 −4
Original line number Diff line number Diff line
@@ -34,7 +34,7 @@ import software.amazon.smithy.rust.codegen.util.expectTrait

private class Types(runtimeConfig: RuntimeConfig) {
    private val smithyClientDep = CargoDependency.SmithyClient(runtimeConfig).copy(optional = true)
    private val awsHyperDep = runtimeConfig.awsRuntimeDependency("aws-hyper").copy(optional = true)
    private val awsHyperDep = runtimeConfig.awsRuntimeDependency("aws-hyper")

    val awsTypes = awsTypes(runtimeConfig).asType()
    val awsHyper = awsHyperDep.asType()
@@ -81,10 +81,9 @@ class AwsFluentClientDecorator : RustCodegenDecorator {
            ).render(writer)
            AwsFluentClientExtensions(types).render(writer)
        }
        val awsHyper = "aws-hyper"
        val awsSmithyClient = "aws-smithy-client"
        rustCrate.mergeFeature(Feature("rustls", default = true, listOf("$awsHyper/rustls", "$awsSmithyClient/rustls")))
        rustCrate.mergeFeature(Feature("native-tls", default = false, listOf("$awsHyper/native-tls", "$awsSmithyClient/native-tls")))
        rustCrate.mergeFeature(Feature("rustls", default = true, listOf("$awsSmithyClient/rustls")))
        rustCrate.mergeFeature(Feature("native-tls", default = false, listOf("$awsSmithyClient/native-tls")))
    }

    override fun libRsCustomizations(
+1 −1
Original line number Diff line number Diff line
@@ -9,7 +9,7 @@ edition = "2018"
[dependencies]
aws-config = { path = "../../build/aws-sdk/sdk/aws-config" }
aws-http = { path = "../../build/aws-sdk/sdk/aws-http" }
aws-hyper = { path = "../../build/aws-sdk/sdk/aws-hyper", features = ["rustls"] }
aws-hyper = { path = "../../build/aws-sdk/sdk/aws-hyper" }
aws-sdk-dynamodb = { path = "../../build/aws-sdk/sdk/dynamodb" }
aws-smithy-http = { path = "../../build/aws-sdk/sdk/aws-smithy-http" }
aws-smithy-client = { path = "../../build/aws-sdk/sdk/aws-smithy-client" }
+1 −1
Original line number Diff line number Diff line
@@ -8,7 +8,7 @@ description = "Example usage of the KMS service"
[dependencies]
aws-config = { path = "../../build/aws-sdk/sdk/aws-config" }
kms = { package = "aws-sdk-kms", path = "../../build/aws-sdk/sdk/kms" }
aws-hyper = { path = "../../build/aws-sdk/sdk/aws-hyper", features = ["rustls"] }
aws-hyper = { path = "../../build/aws-sdk/sdk/aws-hyper" }
aws-types = { path = "../../build/aws-sdk/sdk/aws-types" }
tokio = { version = "1", features = ["full"]}
structopt = { version = "0.3", default-features = false }
Loading