Skip to content

Commit

Permalink
Re-export aws_smithy_types::date_time::Format in service client cra…
Browse files Browse the repository at this point in the history
…tes (#2534)

* Add more client crate re-exports

This commit adds two more client re-exports that were not included
in smithy-rs#2437:
- `aws_smithy_http::byte_stream::Length`
- `aws_smithy_types::date_time::Format`

* Remove re-export of `aws_smithy_http::byte_stream::Length`

This commit removes re-export of `aws_smithy_http::byte_stream::Length`
for now as it is a feature-gated type, which requires further consideration.

* CHANGELOG.next.toml

---------

Co-authored-by: Yuki Saito <[email protected]>
  • Loading branch information
2 people authored and Velfi committed Apr 17, 2023
1 parent d5fa4a5 commit f9d0680
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.next.toml
Original file line number Diff line number Diff line change
Expand Up @@ -92,3 +92,15 @@ message = "Update the `std::fmt::Debug` implementation for `aws-sigv4::SigningPa
references = ["smithy-rs#2562"]
meta = { "breaking" = false, "tada" = true, "bug" = true }
author = "Velfi"

[[aws-sdk-rust]]
message = "`aws_smithy_types::date_time::Format` has been re-exported in service client crates."
references = ["smithy-rs#2534"]
meta = { "breaking" = false, "tada" = false, "bug" = false }
author = "ysaito1001"

[[smithy-rs]]
message = "`aws_smithy_types::date_time::Format` has been re-exported in service client crates."
references = ["smithy-rs#2534"]
meta = { "breaking" = false, "tada" = false, "bug" = false, "target" = "client" }
author = "ysaito1001"
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,7 @@ data class RuntimeType(val path: String, val dependency: RustDependency? = null)
fun classifyRetry(runtimeConfig: RuntimeConfig) = smithyHttp(runtimeConfig).resolve("retry::ClassifyRetry")
fun dateTime(runtimeConfig: RuntimeConfig) = smithyTypes(runtimeConfig).resolve("DateTime")
fun document(runtimeConfig: RuntimeConfig): RuntimeType = smithyTypes(runtimeConfig).resolve("Document")
fun format(runtimeConfig: RuntimeConfig) = smithyTypes(runtimeConfig).resolve("date_time::Format")
fun retryErrorKind(runtimeConfig: RuntimeConfig) = smithyTypes(runtimeConfig).resolve("retry::ErrorKind")
fun eventStreamReceiver(runtimeConfig: RuntimeConfig): RuntimeType = smithyHttp(runtimeConfig).resolve("event_stream::Receiver")
fun eventStreamSender(runtimeConfig: RuntimeConfig): RuntimeType = smithyHttp(runtimeConfig).resolve("event_stream::EventStreamSender")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ private fun pubUseTypesThatShouldBeExported(codegenContext: CodegenContext, mode
listOf(
PubUseType(RuntimeType.blob(runtimeConfig), ::hasBlobs),
PubUseType(RuntimeType.dateTime(runtimeConfig), ::hasDateTimes),
PubUseType(RuntimeType.format(runtimeConfig), ::hasDateTimes, "DateTimeFormat"),
) + RuntimeType.smithyHttp(runtimeConfig).let { http ->
listOf(
PubUseType(http.resolve("byte_stream::ByteStream"), ::hasStreamingOperations),
Expand Down

0 comments on commit f9d0680

Please sign in to comment.