From fb631b4f4cbe3f3a86137a2ed7835e747f9849fb Mon Sep 17 00:00:00 2001 From: david-perez Date: Wed, 26 Oct 2022 17:09:05 +0200 Subject: [PATCH] Export `Router` from `aws-smithy-http-server` crate root again (#1910) This reverts unintentional breakage introduced in `aws-smithy-http-server` v0.51.0. --- CHANGELOG.md | 1 + CHANGELOG.next.toml | 6 ++++++ .../pokemon-service/src/bin/pokemon-service-lambda.rs | 2 +- .../examples/pokemon-service/src/bin/pokemon-service-tls.rs | 2 +- .../examples/pokemon-service/src/bin/pokemon-service.rs | 2 +- rust-runtime/aws-smithy-http-server/src/lib.rs | 2 ++ 6 files changed, 12 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d1c97e2ffb..34b7504d80 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ October 24th, 2022 of breaking changes and how to resolve them. - ⚠ (server, [smithy-rs#1829](https://github.com/awslabs/smithy-rs/issues/1829)) Remove `Protocol` enum, removing an obstruction to extending smithy to third-party protocols. - ⚠ (server, [smithy-rs#1829](https://github.com/awslabs/smithy-rs/issues/1829)) Convert the `protocol` argument on `PyMiddlewares::new` constructor to a type parameter. +- ⚠ (server, [smithy-rs#1753](https://github.com/awslabs/smithy-rs/issues/1753)) `aws_smithy_http_server::routing::Router` is no longer exported from the crate root. This was unintentional breakage that will be reverted in the next release. **New this release:** - (server, [smithy-rs#1811](https://github.com/awslabs/smithy-rs/issues/1811)) Replace all usages of `AtomicU64` with `AtomicUsize` to support 32bit targets. diff --git a/CHANGELOG.next.toml b/CHANGELOG.next.toml index 94805de7bc..5b34134cef 100644 --- a/CHANGELOG.next.toml +++ b/CHANGELOG.next.toml @@ -28,3 +28,9 @@ message = "Replace bool with enum for a function parameter of `label::fmt_string references = ["smithy-rs#1875"] meta = { "breaking" = true, "tada" = false, "bug" = false, "target" = "client" } author = "ysaito1001" + +[[smithy-rs]] +message = "`aws_smithy_http_server::routing::Router` is exported from the crate root again. This reverts unintentional breakage that was introduced in `aws-smithy-http-server` v0.51.0 only." +references = ["smithy-rs#1910"] +meta = { "breaking" = false, "tada" = false, "bug" = true, "target" = "server" } +author = "david-perez" diff --git a/rust-runtime/aws-smithy-http-server/examples/pokemon-service/src/bin/pokemon-service-lambda.rs b/rust-runtime/aws-smithy-http-server/examples/pokemon-service/src/bin/pokemon-service-lambda.rs index 17537ebab1..422451b312 100644 --- a/rust-runtime/aws-smithy-http-server/examples/pokemon-service/src/bin/pokemon-service-lambda.rs +++ b/rust-runtime/aws-smithy-http-server/examples/pokemon-service/src/bin/pokemon-service-lambda.rs @@ -6,7 +6,7 @@ // This program is exported as a binary named `pokemon-service-lambda`. use std::sync::Arc; -use aws_smithy_http_server::{routing::LambdaHandler, routing::Router, AddExtensionLayer}; +use aws_smithy_http_server::{routing::LambdaHandler, AddExtensionLayer, Router}; use pokemon_service::{ capture_pokemon, check_health, do_nothing, get_pokemon_species, get_server_statistics, get_storage, setup_tracing, State, diff --git a/rust-runtime/aws-smithy-http-server/examples/pokemon-service/src/bin/pokemon-service-tls.rs b/rust-runtime/aws-smithy-http-server/examples/pokemon-service/src/bin/pokemon-service-tls.rs index 1e86a6a0d6..aa891131c0 100644 --- a/rust-runtime/aws-smithy-http-server/examples/pokemon-service/src/bin/pokemon-service-tls.rs +++ b/rust-runtime/aws-smithy-http-server/examples/pokemon-service/src/bin/pokemon-service-tls.rs @@ -28,7 +28,7 @@ use std::io::BufReader; use std::net::SocketAddr; use std::sync::Arc; -use aws_smithy_http_server::{routing::Router, AddExtensionLayer}; +use aws_smithy_http_server::{AddExtensionLayer, Router}; use clap::Parser; use futures_util::stream::StreamExt; use pokemon_service::{ diff --git a/rust-runtime/aws-smithy-http-server/examples/pokemon-service/src/bin/pokemon-service.rs b/rust-runtime/aws-smithy-http-server/examples/pokemon-service/src/bin/pokemon-service.rs index 4122a49d6d..b6df4770fd 100644 --- a/rust-runtime/aws-smithy-http-server/examples/pokemon-service/src/bin/pokemon-service.rs +++ b/rust-runtime/aws-smithy-http-server/examples/pokemon-service/src/bin/pokemon-service.rs @@ -6,7 +6,7 @@ // This program is exported as a binary named `pokemon-service`. use std::{net::SocketAddr, sync::Arc}; -use aws_smithy_http_server::{routing::Router, AddExtensionLayer}; +use aws_smithy_http_server::{AddExtensionLayer, Router}; use clap::Parser; use pokemon_service::{ capture_pokemon, check_health, do_nothing, get_pokemon_species, get_server_statistics, get_storage, setup_tracing, diff --git a/rust-runtime/aws-smithy-http-server/src/lib.rs b/rust-runtime/aws-smithy-http-server/src/lib.rs index 79c963e084..18ae005d08 100644 --- a/rust-runtime/aws-smithy-http-server/src/lib.rs +++ b/rust-runtime/aws-smithy-http-server/src/lib.rs @@ -38,6 +38,8 @@ pub mod routers; pub(crate) use self::error::Error; pub use self::extension::Extension; #[doc(inline)] +pub use self::routing::Router; +#[doc(inline)] pub use tower_http::add_extension::{AddExtension, AddExtensionLayer}; #[cfg(test)]