Skip to content

Commit

Permalink
fix issue with IntoShared and cleanup change log
Browse files Browse the repository at this point in the history
  • Loading branch information
rcoh committed Nov 10, 2023
1 parent 831dd3f commit c9d67d4
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 2 deletions.
49 changes: 49 additions & 0 deletions CHANGELOG.next.toml
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,52 @@ message = "Fix exclusively setting the credentials provider at operation config-
references = ["smithy-rs#3156", "aws-sdk-rust#901"]
meta = { "breaking" = false, "tada" = false, "bug" = true }
author = "ysaito1001"

[[smithy-rs]]
message = """Enable conversion from `BuildError` into `SdkError` & `<service>::Error`. This allows customers to write the following code:
```rust
async fn do_a_thing(client: &Client) -> Result<SdkError<SomeOperationError>> {
client.run_operation().complex_field(ComplexField::builder()
.a("a")
.b("b")
.build()?
).send().await?;
}
```
Previously, `?` could not be used in this position.
"""
references = ["smithy-rs#3173", "smithy-rs#3171"]
meta = { "breaking" = false, "tada" = true, "bug" = false }
author = "rcoh"

[[aws-sdk-rust]]
message = """Enable conversion from `BuildError` into `SdkError` & `<service>::Error`. This allows customers to write the following code:
```rust
async fn create_table(dynamo_client: &Client) -> Result<(), SdkError<CreateTableError>> {
dynamo_client
.create_table()
.table_name("test")
.key_schema(
KeySchemaElement::builder()
.attribute_name("year")
.key_type(KeyType::Hash)
.build()?, // Previously, `?` could not be used here
)
.send()
.await?;
Ok(())
}
```
Previously, `?` could not be used in this position.
"""
references = ["smithy-rs#3173", "smithy-rs#3171"]
meta = { "breaking" = false, "tada" = true, "bug" = false }
author = "rcoh"

[[aws-sdk-rust]]
message = "ProvideCredentials and SharedCredentialsProvider are now re-exported."
references = ["smithy-rs#3173", "smithy-rs#3155"]
meta = { "breaking" = false, "tada" = false, "bug" = false }
author = "rcoh"
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ internal class EndpointConfigCustomization(
private val codegenScope = arrayOf(
*preludeScope,
"Params" to typesGenerator.paramsStruct(),
"IntoShared" to RuntimeType.smithyRuntimeApi(runtimeConfig).resolve("shared::IntoShared"),
"Resolver" to RuntimeType.smithyRuntime(runtimeConfig).resolve("client::config_override::Resolver"),
"SharedEndpointResolver" to epModule.resolve("SharedEndpointResolver"),
"StaticUriEndpointResolver" to epRuntimeModule.resolve("StaticUriEndpointResolver"),
Expand Down Expand Up @@ -90,7 +89,6 @@ internal class EndpointConfigCustomization(
##[allow(deprecated)]
self.set_endpoint_resolver(
endpoint_url.map(|url| {
use #{IntoShared};
#{StaticUriEndpointResolver}::uri(url).into_shared()
})
);
Expand Down

0 comments on commit c9d67d4

Please sign in to comment.