From f74a6ef0936849fa304bc108e175c57077eb1c7a Mon Sep 17 00:00:00 2001 From: filipriec Date: Sat, 19 Apr 2025 18:55:26 +0200 Subject: [PATCH] upgraded to tonic 0.13 --- Cargo.lock | 155 ++++++++++-------- client/Cargo.toml | 4 +- common/Cargo.toml | 4 +- common/src/proto/multieko2.adresar.rs | 14 +- common/src/proto/multieko2.auth.rs | 14 +- .../src/proto/multieko2.table_definition.rs | 14 +- common/src/proto/multieko2.table_script.rs | 14 +- common/src/proto/multieko2.table_structure.rs | 14 +- common/src/proto/multieko2.tables_data.rs | 14 +- common/src/proto/multieko2.uctovnictvo.rs | 14 +- server/Cargo.toml | 6 +- 11 files changed, 152 insertions(+), 115 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 75b6ca6..41daea6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -146,28 +146,6 @@ dependencies = [ "abi_stable", ] -[[package]] -name = "async-stream" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b5a71a6f37880a80d1d7f19efd781e4b5de42c88f0722cc13bcb6cc2cfe8476" -dependencies = [ - "async-stream-impl", - "futures-core", - "pin-project-lite", -] - -[[package]] -name = "async-stream-impl" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.100", -] - [[package]] name = "async-trait" version = "0.1.88" @@ -202,11 +180,10 @@ checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "axum" -version = "0.7.9" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edca88bc138befd0323b20752846e6587272d3b03b0343c8ea28a6f819e6e71f" +checksum = "de45108900e1f9b9242f7f2e254aa3e2c029c921c258fe9e6b4217eeebd54288" dependencies = [ - "async-trait", "axum-core", "bytes", "futures-util", @@ -222,20 +199,19 @@ dependencies = [ "rustversion", "serde", "sync_wrapper", - "tower 0.5.2", + "tower", "tower-layer", "tower-service", ] [[package]] name = "axum-core" -version = "0.4.5" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09f2bd6146b97ae3359fa0cc6d6b376d9539582c7b4220f041a33ec24c226199" +checksum = "68464cd0412f486726fb3373129ef5d2993f90c34bc2bc1c1e9943b2f4fc7ca6" dependencies = [ - "async-trait", "bytes", - "futures-util", + "futures-core", "http", "http-body", "http-body-util", @@ -426,7 +402,7 @@ dependencies = [ "anyhow", "async-trait", "common", - "crossterm", + "crossterm 0.29.0", "dirs 6.0.0", "dotenvy", "lazy_static", @@ -507,6 +483,15 @@ version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2459fc9262a1aa204eb4b5764ad4f189caec88aea9634389c0a25f8be7f6265e" +[[package]] +name = "convert_case" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb402b8d4c85569410425650ce3eddc7d698ed96d39a73f941b08fb63082f1e7" +dependencies = [ + "unicode-segmentation", +] + [[package]] name = "core-foundation" version = "0.9.4" @@ -634,6 +619,24 @@ dependencies = [ "winapi", ] +[[package]] +name = "crossterm" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8b9f2e4c67f833b660cdb0a3523065869fb35570177239812ed4c905aeff87b" +dependencies = [ + "bitflags", + "crossterm_winapi", + "derive_more", + "document-features", + "mio", + "parking_lot", + "rustix 1.0.5", + "signal-hook", + "signal-hook-mio", + "winapi", +] + [[package]] name = "crossterm_winapi" version = "0.9.1" @@ -722,6 +725,27 @@ dependencies = [ "powerfmt", ] +[[package]] +name = "derive_more" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "093242cf7570c207c83073cf82f79706fe7b8317e98620a47d5be7c3d8497678" +dependencies = [ + "derive_more-impl", +] + +[[package]] +name = "derive_more-impl" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bda628edc44c4bb645fbe0f758797143e4e07926f7ebf4e9bdfbd3d2ce621df3" +dependencies = [ + "convert_case", + "proc-macro2", + "quote", + "syn 2.0.100", +] + [[package]] name = "digest" version = "0.10.7" @@ -787,6 +811,15 @@ dependencies = [ "syn 2.0.100", ] +[[package]] +name = "document-features" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95249b50c6c185bee49034bcb378a49dc2b5dff0be90ff6616d31d64febab05d" +dependencies = [ + "litrs", +] + [[package]] name = "dotenvy" version = "0.15.7" @@ -1647,6 +1680,12 @@ version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "23fb14cb19457329c82206317a5663005a4d404783dc74f4252769b0d5f42856" +[[package]] +name = "litrs" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4ce301924b7887e9d637144fdade93f9dfff9b60981d4ac161db09720d39aa5" + [[package]] name = "lock_api" version = "0.4.12" @@ -1674,9 +1713,9 @@ dependencies = [ [[package]] name = "matchit" -version = "0.7.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94" +checksum = "47e1ffaa40ddd1f3ed91f717a33c8c0ee23fff369e3aa8772b9605cc1d22f4c3" [[package]] name = "md-5" @@ -2298,7 +2337,7 @@ dependencies = [ "bitflags", "cassowary", "compact_str", - "crossterm", + "crossterm 0.28.1", "indoc", "instability", "itertools 0.13.0", @@ -2421,9 +2460,9 @@ dependencies = [ [[package]] name = "rstest" -version = "0.24.0" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03e905296805ab93e13c1ec3a03f4b6c4f35e9498a3d5fa96dc626d22c03cd89" +checksum = "6fc39292f8613e913f7df8fa892b8944ceb47c247b78e1b1ae2f09e019be789d" dependencies = [ "futures-timer", "futures-util", @@ -2433,9 +2472,9 @@ dependencies = [ [[package]] name = "rstest_macros" -version = "0.24.0" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef0053bbffce09062bee4bcc499b0fbe7a57b879f1efe088d6d8d4c7adcdef9b" +checksum = "1f168d99749d307be9de54d23fd226628d99768225ef08f6ffb52e0182a27746" dependencies = [ "cfg-if", "glob", @@ -3367,11 +3406,10 @@ dependencies = [ [[package]] name = "tonic" -version = "0.12.3" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "877c5b330756d856ffcc4553ab34a5684481ade925ecc54bcd1bf02b1d0d4d52" +checksum = "85839f0b32fd242bb3209262371d07feda6d780d16ee9d2bc88581b89da1549b" dependencies = [ - "async-stream", "async-trait", "axum", "base64", @@ -3389,7 +3427,7 @@ dependencies = [ "socket2", "tokio", "tokio-stream", - "tower 0.4.13", + "tower", "tower-layer", "tower-service", "tracing", @@ -3397,9 +3435,9 @@ dependencies = [ [[package]] name = "tonic-build" -version = "0.12.3" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9557ce109ea773b399c9b9e5dca39294110b74f1f342cb347a80d1fce8c26a11" +checksum = "d85f0383fadd15609306383a90e85eaed44169f931a5d2be1b42c76ceff1825e" dependencies = [ "prettyplease", "proc-macro2", @@ -3411,9 +3449,9 @@ dependencies = [ [[package]] name = "tonic-reflection" -version = "0.12.3" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "878d81f52e7fcfd80026b7fdb6a9b578b3c3653ba987f87f0dce4b64043cba27" +checksum = "88fa815be858816dad226a49439ee90b7bcf81ab55bee72fdb217f1e6778c3ca" dependencies = [ "prost", "prost-types", @@ -3422,26 +3460,6 @@ dependencies = [ "tonic", ] -[[package]] -name = "tower" -version = "0.4.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" -dependencies = [ - "futures-core", - "futures-util", - "indexmap 1.9.3", - "pin-project", - "pin-project-lite", - "rand 0.8.5", - "slab", - "tokio", - "tokio-util", - "tower-layer", - "tower-service", - "tracing", -] - [[package]] name = "tower" version = "0.5.2" @@ -3450,10 +3468,15 @@ checksum = "d039ad9159c98b70ecfd540b2573b97f7f52c3e8d9f8ad57a24b916a536975f9" dependencies = [ "futures-core", "futures-util", + "indexmap 2.9.0", "pin-project-lite", + "slab", "sync_wrapper", + "tokio", + "tokio-util", "tower-layer", "tower-service", + "tracing", ] [[package]] diff --git a/client/Cargo.toml b/client/Cargo.toml index 907bd5b..252fdb4 100644 --- a/client/Cargo.toml +++ b/client/Cargo.toml @@ -9,7 +9,7 @@ anyhow = "1.0.98" async-trait = "0.1.88" common = { path = "../common" } -crossterm = "0.28.1" +crossterm = "0.29.0" dirs = "6.0.0" dotenvy = "0.15.7" lazy_static = "1.5.0" @@ -19,7 +19,7 @@ serde = { version = "1.0.219", features = ["derive"] } time = "0.3.41" tokio = { version = "1.44.2", features = ["full", "macros"] } toml = "0.8.20" -tonic = "0.12.3" +tonic = "0.13.0" tracing = "0.1.41" unicode-segmentation = "1.12.0" unicode-width = "0.2.0" diff --git a/common/Cargo.toml b/common/Cargo.toml index 09502df..7ff5c21 100644 --- a/common/Cargo.toml +++ b/common/Cargo.toml @@ -5,9 +5,9 @@ edition.workspace = true license.workspace = true [dependencies] -tonic = "0.12.3" +tonic = "0.13.0" prost = "0.13.5" serde = { version = "1.0.219", features = ["derive"] } [build-dependencies] -tonic-build = "0.12.3" +tonic-build = "0.13.0" diff --git a/common/src/proto/multieko2.adresar.rs b/common/src/proto/multieko2.adresar.rs index 6731a5e..44e48f3 100644 --- a/common/src/proto/multieko2.adresar.rs +++ b/common/src/proto/multieko2.adresar.rs @@ -145,7 +145,7 @@ pub mod adresar_client { } impl AdresarClient where - T: tonic::client::GrpcService, + T: tonic::client::GrpcService, T::Error: Into, T::ResponseBody: Body + std::marker::Send + 'static, ::Error: Into + std::marker::Send, @@ -166,13 +166,13 @@ pub mod adresar_client { F: tonic::service::Interceptor, T::ResponseBody: Default, T: tonic::codegen::Service< - http::Request, + http::Request, Response = http::Response< - >::ResponseBody, + >::ResponseBody, >, >, , + http::Request, >>::Error: Into + std::marker::Send + std::marker::Sync, { AdresarClient::new(InterceptedService::new(inner, interceptor)) @@ -465,7 +465,7 @@ pub mod adresar_server { B: Body + std::marker::Send + 'static, B::Error: Into + std::marker::Send + 'static, { - type Response = http::Response; + type Response = http::Response; type Error = std::convert::Infallible; type Future = BoxFuture; fn poll_ready( @@ -751,7 +751,9 @@ pub mod adresar_server { } _ => { Box::pin(async move { - let mut response = http::Response::new(empty_body()); + let mut response = http::Response::new( + tonic::body::Body::default(), + ); let headers = response.headers_mut(); headers .insert( diff --git a/common/src/proto/multieko2.auth.rs b/common/src/proto/multieko2.auth.rs index 16f7e74..f75f0aa 100644 --- a/common/src/proto/multieko2.auth.rs +++ b/common/src/proto/multieko2.auth.rs @@ -83,7 +83,7 @@ pub mod auth_service_client { } impl AuthServiceClient where - T: tonic::client::GrpcService, + T: tonic::client::GrpcService, T::Error: Into, T::ResponseBody: Body + std::marker::Send + 'static, ::Error: Into + std::marker::Send, @@ -104,13 +104,13 @@ pub mod auth_service_client { F: tonic::service::Interceptor, T::ResponseBody: Default, T: tonic::codegen::Service< - http::Request, + http::Request, Response = http::Response< - >::ResponseBody, + >::ResponseBody, >, >, , + http::Request, >>::Error: Into + std::marker::Send + std::marker::Sync, { AuthServiceClient::new(InterceptedService::new(inner, interceptor)) @@ -277,7 +277,7 @@ pub mod auth_service_server { B: Body + std::marker::Send + 'static, B::Error: Into + std::marker::Send + 'static, { - type Response = http::Response; + type Response = http::Response; type Error = std::convert::Infallible; type Future = BoxFuture; fn poll_ready( @@ -378,7 +378,9 @@ pub mod auth_service_server { } _ => { Box::pin(async move { - let mut response = http::Response::new(empty_body()); + let mut response = http::Response::new( + tonic::body::Body::default(), + ); let headers = response.headers_mut(); headers .insert( diff --git a/common/src/proto/multieko2.table_definition.rs b/common/src/proto/multieko2.table_definition.rs index 18317ec..c5e3d99 100644 --- a/common/src/proto/multieko2.table_definition.rs +++ b/common/src/proto/multieko2.table_definition.rs @@ -99,7 +99,7 @@ pub mod table_definition_client { } impl TableDefinitionClient where - T: tonic::client::GrpcService, + T: tonic::client::GrpcService, T::Error: Into, T::ResponseBody: Body + std::marker::Send + 'static, ::Error: Into + std::marker::Send, @@ -120,13 +120,13 @@ pub mod table_definition_client { F: tonic::service::Interceptor, T::ResponseBody: Default, T: tonic::codegen::Service< - http::Request, + http::Request, Response = http::Response< - >::ResponseBody, + >::ResponseBody, >, >, , + http::Request, >>::Error: Into + std::marker::Send + std::marker::Sync, { TableDefinitionClient::new(InterceptedService::new(inner, interceptor)) @@ -351,7 +351,7 @@ pub mod table_definition_server { B: Body + std::marker::Send + 'static, B::Error: Into + std::marker::Send + 'static, { - type Response = http::Response; + type Response = http::Response; type Error = std::convert::Infallible; type Future = BoxFuture; fn poll_ready( @@ -504,7 +504,9 @@ pub mod table_definition_server { } _ => { Box::pin(async move { - let mut response = http::Response::new(empty_body()); + let mut response = http::Response::new( + tonic::body::Body::default(), + ); let headers = response.headers_mut(); headers .insert( diff --git a/common/src/proto/multieko2.table_script.rs b/common/src/proto/multieko2.table_script.rs index e0b6cf1..38ccf78 100644 --- a/common/src/proto/multieko2.table_script.rs +++ b/common/src/proto/multieko2.table_script.rs @@ -45,7 +45,7 @@ pub mod table_script_client { } impl TableScriptClient where - T: tonic::client::GrpcService, + T: tonic::client::GrpcService, T::Error: Into, T::ResponseBody: Body + std::marker::Send + 'static, ::Error: Into + std::marker::Send, @@ -66,13 +66,13 @@ pub mod table_script_client { F: tonic::service::Interceptor, T::ResponseBody: Default, T: tonic::codegen::Service< - http::Request, + http::Request, Response = http::Response< - >::ResponseBody, + >::ResponseBody, >, >, , + http::Request, >>::Error: Into + std::marker::Send + std::marker::Sync, { TableScriptClient::new(InterceptedService::new(inner, interceptor)) @@ -225,7 +225,7 @@ pub mod table_script_server { B: Body + std::marker::Send + 'static, B::Error: Into + std::marker::Send + 'static, { - type Response = http::Response; + type Response = http::Response; type Error = std::convert::Infallible; type Future = BoxFuture; fn poll_ready( @@ -283,7 +283,9 @@ pub mod table_script_server { } _ => { Box::pin(async move { - let mut response = http::Response::new(empty_body()); + let mut response = http::Response::new( + tonic::body::Body::default(), + ); let headers = response.headers_mut(); headers .insert( diff --git a/common/src/proto/multieko2.table_structure.rs b/common/src/proto/multieko2.table_structure.rs index 01b3483..2112d73 100644 --- a/common/src/proto/multieko2.table_structure.rs +++ b/common/src/proto/multieko2.table_structure.rs @@ -43,7 +43,7 @@ pub mod table_structure_service_client { } impl TableStructureServiceClient where - T: tonic::client::GrpcService, + T: tonic::client::GrpcService, T::Error: Into, T::ResponseBody: Body + std::marker::Send + 'static, ::Error: Into + std::marker::Send, @@ -64,13 +64,13 @@ pub mod table_structure_service_client { F: tonic::service::Interceptor, T::ResponseBody: Default, T: tonic::codegen::Service< - http::Request, + http::Request, Response = http::Response< - >::ResponseBody, + >::ResponseBody, >, >, , + http::Request, >>::Error: Into + std::marker::Send + std::marker::Sync, { TableStructureServiceClient::new(InterceptedService::new(inner, interceptor)) @@ -260,7 +260,7 @@ pub mod table_structure_service_server { B: Body + std::marker::Send + 'static, B::Error: Into + std::marker::Send + 'static, { - type Response = http::Response; + type Response = http::Response; type Error = std::convert::Infallible; type Future = BoxFuture; fn poll_ready( @@ -375,7 +375,9 @@ pub mod table_structure_service_server { } _ => { Box::pin(async move { - let mut response = http::Response::new(empty_body()); + let mut response = http::Response::new( + tonic::body::Body::default(), + ); let headers = response.headers_mut(); headers .insert( diff --git a/common/src/proto/multieko2.tables_data.rs b/common/src/proto/multieko2.tables_data.rs index 2e2fcd9..1ae4d33 100644 --- a/common/src/proto/multieko2.tables_data.rs +++ b/common/src/proto/multieko2.tables_data.rs @@ -118,7 +118,7 @@ pub mod tables_data_client { } impl TablesDataClient where - T: tonic::client::GrpcService, + T: tonic::client::GrpcService, T::Error: Into, T::ResponseBody: Body + std::marker::Send + 'static, ::Error: Into + std::marker::Send, @@ -139,13 +139,13 @@ pub mod tables_data_client { F: tonic::service::Interceptor, T::ResponseBody: Default, T: tonic::codegen::Service< - http::Request, + http::Request, Response = http::Response< - >::ResponseBody, + >::ResponseBody, >, >, , + http::Request, >>::Error: Into + std::marker::Send + std::marker::Sync, { TablesDataClient::new(InterceptedService::new(inner, interceptor)) @@ -469,7 +469,7 @@ pub mod tables_data_server { B: Body + std::marker::Send + 'static, B::Error: Into + std::marker::Send + 'static, { - type Response = http::Response; + type Response = http::Response; type Error = std::convert::Infallible; type Future = BoxFuture; fn poll_ready( @@ -757,7 +757,9 @@ pub mod tables_data_server { } _ => { Box::pin(async move { - let mut response = http::Response::new(empty_body()); + let mut response = http::Response::new( + tonic::body::Body::default(), + ); let headers = response.headers_mut(); headers .insert( diff --git a/common/src/proto/multieko2.uctovnictvo.rs b/common/src/proto/multieko2.uctovnictvo.rs index 0c6798a..57ae1ab 100644 --- a/common/src/proto/multieko2.uctovnictvo.rs +++ b/common/src/proto/multieko2.uctovnictvo.rs @@ -112,7 +112,7 @@ pub mod uctovnictvo_client { } impl UctovnictvoClient where - T: tonic::client::GrpcService, + T: tonic::client::GrpcService, T::Error: Into, T::ResponseBody: Body + std::marker::Send + 'static, ::Error: Into + std::marker::Send, @@ -133,13 +133,13 @@ pub mod uctovnictvo_client { F: tonic::service::Interceptor, T::ResponseBody: Default, T: tonic::codegen::Service< - http::Request, + http::Request, Response = http::Response< - >::ResponseBody, + >::ResponseBody, >, >, , + http::Request, >>::Error: Into + std::marker::Send + std::marker::Sync, { UctovnictvoClient::new(InterceptedService::new(inner, interceptor)) @@ -436,7 +436,7 @@ pub mod uctovnictvo_server { B: Body + std::marker::Send + 'static, B::Error: Into + std::marker::Send + 'static, { - type Response = http::Response; + type Response = http::Response; type Error = std::convert::Infallible; type Future = BoxFuture; fn poll_ready( @@ -681,7 +681,9 @@ pub mod uctovnictvo_server { } _ => { Box::pin(async move { - let mut response = http::Response::new(empty_body()); + let mut response = http::Response::new( + tonic::body::Body::default(), + ); let headers = response.headers_mut(); headers .insert( diff --git a/server/Cargo.toml b/server/Cargo.toml index a8cd6b6..d47fd49 100644 --- a/server/Cargo.toml +++ b/server/Cargo.toml @@ -14,8 +14,8 @@ serde = { version = "1.0.219", features = ["derive"] } serde_json = "1.0.140" sqlx = { version = "0.8.5", features = ["chrono", "postgres", "runtime-tokio", "runtime-tokio-native-tls", "time", "uuid"] } tokio = { version = "1.44.2", features = ["full", "macros"] } -tonic = "0.12.3" -tonic-reflection = "0.12.3" +tonic = "0.13.0" +tonic-reflection = "0.13.0" tracing = "0.1.41" time = { version = "0.3.41", features = ["local-offset"] } steel-derive = { git = "https://github.com/mattwparas/steel.git", branch = "master", package = "steel-derive" } @@ -35,5 +35,5 @@ path = "src/lib.rs" [dev-dependencies] tokio = { version = "1.44", features = ["full", "test-util"] } -rstest = "0.24.0" +rstest = "0.25.0" lazy_static = "1.5.0"