Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-export RuntimeComponents in generated clients #2904

Merged
merged 1 commit into from
Aug 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion CHANGELOG.next.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,16 @@
# message = "Fix typos in module documentation for generated crates"
# references = ["smithy-rs#920"]
# meta = { "breaking" = false, "tada" = false, "bug" = false, "target" = "client | server | all"}
# author = "rcoh"
# author = "rcoh"

[[aws-sdk-rust]]
message = "`RuntimeComponents` are now re-exported so that implementing a custom interceptor doens't require directly depending on `aws-smithy-runtime-api`."
references = ["smithy-rs#2904", "aws-sdk-rust#862"]
meta = { "breaking" = false, "tada" = false, "bug" = false }
author = "jdisanti"

[[smithy-rs]]
message = "`RuntimeComponents` and `RuntimeComponentsBuilder` are now re-exported in generated clients so that implementing a custom interceptor or runtime plugin doens't require directly depending on `aws-smithy-runtime-api`."
references = ["smithy-rs#2904"]
meta = { "breaking" = false, "tada" = false, "bug" = false, "target" = "client"}
author = "jdisanti"
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,12 @@ class ClientRuntimeTypesReExportGenerator(
"""
pub use #{ConfigBag};
pub use #{Interceptor};
pub use #{RuntimeComponents};
pub use #{SharedInterceptor};
""",
"ConfigBag" to RuntimeType.configBag(rc),
"Interceptor" to RuntimeType.interceptor(rc),
"RuntimeComponents" to RuntimeType.runtimeComponents(rc),
"SharedInterceptor" to RuntimeType.sharedInterceptor(rc),
)

Expand All @@ -40,9 +42,11 @@ class ClientRuntimeTypesReExportGenerator(
"""
pub use #{runtime_plugin}::{RuntimePlugin, SharedRuntimePlugin};
pub use #{config_bag}::FrozenLayer;
pub use #{RuntimeComponentsBuilder};
""",
"runtime_plugin" to RuntimeType.smithyRuntimeApi(rc).resolve("client::runtime_plugin"),
"config_bag" to RuntimeType.smithyTypes(rc).resolve("config_bag"),
"RuntimeComponentsBuilder" to RuntimeType.runtimeComponentsBuilder(rc),
)
}
}
Expand Down