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

Split test-util feature to allow test-util to be utilized in WASM (#2873)

## Motivation and Context
- #2087 

test-util pulled in Hyper but that's not strictly necessary

## Description
Split out wiremock as it's own features and do some other cleanup.

## Testing
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
- [x] 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._
parent 9a4156de
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -687,6 +687,13 @@ references = ["smithy-rs#2866"]
meta = { "breaking" = false, "tada" = false, "bug" = false, "target" = "server" }
author = "david-perez"


[[smithy-rs]]
message = "The `test-util` feature in aws-smithy-client has been split to include a separate `wiremock` feature. This allows test-util to be used without a Hyper server dependency making it usable in webassembly targets."
meta = { "breaking" = true, "tada" = false , "bug" = false, "target" = "client" }
author = "rcoh"
references = ["smithy-rs#2873"]

[[aws-sdk-rust]]
message = """The `doc(hidden)` `time_source` in `aws-credential-types` was removed. Use `aws_smithy_async::time` instead."""
meta = { "breaking" = true, "tada" = false, "bug" = false }
+1 −1
Original line number Diff line number Diff line
@@ -62,7 +62,7 @@ serde = { version = "1", features = ["derive"] }
serde_json = "1"

aws-credential-types = { path = "../../sdk/build/aws-sdk/sdk/aws-credential-types", features = ["test-util"] }
aws-smithy-client = { path = "../../sdk/build/aws-sdk/sdk/aws-smithy-client", features = ["test-util"] }
aws-smithy-client = { path = "../../sdk/build/aws-sdk/sdk/aws-smithy-client", features = ["test-util", "rt-tokio", "client-hyper"] }

# used for a usage example
hyper-rustls = { version = "0.24", features = ["webpki-tokio", "http2", "http1"] }
+1 −1
Original line number Diff line number Diff line
@@ -83,7 +83,7 @@ class IntegrationTestDependencies(
                val smithyAsync = CargoDependency.smithyAsync(codegenContext.runtimeConfig)
                    .copy(features = setOf("test-util"), scope = DependencyScope.Dev)
                val smithyClient = CargoDependency.smithyClient(codegenContext.runtimeConfig)
                    .copy(features = setOf("test-util"), scope = DependencyScope.Dev)
                    .copy(features = setOf("test-util", "wiremock"), scope = DependencyScope.Dev)
                val smithyTypes = CargoDependency.smithyTypes(codegenContext.runtimeConfig)
                    .copy(features = setOf("test-util"), scope = DependencyScope.Dev)
                addDependency(smithyAsync)
+1 −1
Original line number Diff line number Diff line
@@ -18,7 +18,7 @@ aws-http = { path = "../../build/aws-sdk/sdk/aws-http" }
aws-sdk-s3 = { path = "../../build/aws-sdk/sdk/s3" }
aws-sdk-sts = { path = "../../build/aws-sdk/sdk/sts" }
aws-smithy-async = { path = "../../build/aws-sdk/sdk/aws-smithy-async", features = ["test-util", "rt-tokio"] }
aws-smithy-client = { path = "../../build/aws-sdk/sdk/aws-smithy-client", features = ["test-util", "rustls"] }
aws-smithy-client = { path = "../../build/aws-sdk/sdk/aws-smithy-client", features = ["test-util", "wiremock"] }
aws-smithy-http = { path = "../../build/aws-sdk/sdk/aws-smithy-http" }
aws-smithy-protocol-test = { path = "../../build/aws-sdk/sdk/aws-smithy-protocol-test" }
aws-smithy-runtime = { path = "../../build/aws-sdk/sdk/aws-smithy-runtime", features = ["test-util"] }
+3 −0
Original line number Diff line number Diff line
@@ -8,6 +8,9 @@

set -e

echo '### Checking compilation under WASM'
cargo check --target wasm32-unknown-unknown

echo "### Checking for duplicate dependency versions in the normal dependency graph with all features enabled"
cargo tree -d --edges normal --all-features

Loading