From 7a3881f407baca81b00af3f66c2f9860f2cc475d Mon Sep 17 00:00:00 2001 From: Renar Narubin Date: Fri, 1 Dec 2023 11:15:43 -0800 Subject: [PATCH 1/4] Update to ya-gcp v0.11 This brings the versions of ya-gcp, tonic, prost (and incidentally uuid) up to their latest versions. --- Cargo.lock | 731 ++++++++++++++++--------- Cargo.toml | 18 +- src/backends/googlepubsub/consumer.rs | 166 +++--- src/backends/googlepubsub/mod.rs | 43 +- src/backends/googlepubsub/publisher.rs | 123 +++-- src/tests/google.rs | 8 +- 6 files changed, 676 insertions(+), 413 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 5030f08..364a97d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,6 +2,21 @@ # It is not intended for manual editing. version = 3 +[[package]] +name = "addr2line" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +dependencies = [ + "gimli", +] + +[[package]] +name = "adler" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" + [[package]] name = "aho-corasick" version = "0.7.13" @@ -55,18 +70,18 @@ checksum = "648ed8c8d2ce5409ccd57453d9d1b214b342a0d69376a6feda1fd6cae3299308" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.60", ] [[package]] name = "async-trait" -version = "0.1.42" +version = "0.1.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d3a45e77e34375a7923b1e8febb049bb011f064714a8e17a1a616fef01da13d" +checksum = "a66537f1bb974b254c98ed142ff995236e81b9d0fe4db0575f46612cb15eb0f9" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.39", ] [[package]] @@ -87,28 +102,82 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" [[package]] -name = "base64" -version = "0.13.0" +name = "axum" +version = "0.6.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" +checksum = "3b829e4e32b91e643de6eafe82b1d90675f5874230191a4ffbc1b336dec4d6bf" +dependencies = [ + "async-trait", + "axum-core", + "bitflags", + "bytes", + "futures-util", + "http", + "http-body", + "hyper", + "itoa 1.0.9", + "matchit", + "memchr", + "mime", + "percent-encoding", + "pin-project-lite", + "rustversion", + "serde", + "sync_wrapper", + "tower", + "tower-layer", + "tower-service", +] [[package]] -name = "bitflags" -version = "1.2.1" +name = "axum-core" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" +checksum = "759fa577a247914fd3f7f76d62972792636412fbfd634cd452f6a385a74d2d2c" +dependencies = [ + "async-trait", + "bytes", + "futures-util", + "http", + "http-body", + "mime", + "rustversion", + "tower-layer", + "tower-service", +] [[package]] -name = "bumpalo" -version = "3.4.0" +name = "backtrace" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e8c087f005730276d1096a652e92a8bacee2e2472bcc9715a74d2bec38b5820" +checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" +dependencies = [ + "addr2line", + "cc", + "cfg-if 1.0.0", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", +] [[package]] -name = "bytes" -version = "0.5.6" +name = "base64" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e4cec68f03f32e44924783795810fa50a7035d8c8ebe78580ad7e6c703fba38" +checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" + +[[package]] +name = "base64" +version = "0.21.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9" + +[[package]] +name = "bitflags" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" [[package]] name = "bytes" @@ -124,9 +193,12 @@ checksum = "631ae5198c9be5e753e5cc215e1bd73c2b466a3565173db433f52bb9d3e66dba" [[package]] name = "cc" -version = "1.0.60" +version = "1.0.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef611cc68ff783f18535d77ddd080185275713d852c4f5cbb6122c462a7a825c" +checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" +dependencies = [ + "libc", +] [[package]] name = "cfg-if" @@ -148,8 +220,7 @@ checksum = "942f72db697d8767c22d46a598e01f2d3b475501ea43d0db4f16d90259182d0b" dependencies = [ "num-integer", "num-traits", - "serde", - "time", + "time 0.1.44", ] [[package]] @@ -199,12 +270,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ea221b5284a47e40033bf9b66f35f984ec0ea2931eb03505246cd27a963f981b" [[package]] -name = "ct-logs" -version = "0.8.0" +name = "deranged" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1a816186fa68d9e426e3cb4ae4dff1fcd8e4a2c34b781bf7a822574a0d0aac8" +checksum = "0f32d04922c60427da6f9fef14d042d9edddef64cb9d4ce0d64d0685fbeb1fd3" dependencies = [ - "sct", + "powerfmt", + "serde", ] [[package]] @@ -217,7 +289,7 @@ dependencies = [ "proc-macro2", "quote", "rustc_version", - "syn", + "syn 1.0.60", ] [[package]] @@ -226,6 +298,12 @@ version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + [[package]] name = "error-chain" version = "0.12.4" @@ -311,7 +389,7 @@ dependencies = [ "proc-macro-hack", "proc-macro2", "quote", - "syn", + "syn 1.0.60", ] [[package]] @@ -360,28 +438,34 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.3" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fcd999463524c52659517fe2cea98493cfe485d10565e7b0fb07dbba7ad2753" +checksum = "fe9006bed769170c11f845cf00c7c1e9092aeb3f268e007c3e760ac68008070f" dependencies = [ "cfg-if 1.0.0", "libc", - "wasi 0.10.0+wasi-snapshot-preview1", + "wasi 0.11.0+wasi-snapshot-preview1", ] +[[package]] +name = "gimli" +version = "0.28.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" + [[package]] name = "h2" -version = "0.3.10" +version = "0.3.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c9de88456263e249e241fcd211d3954e2c9b0ef7ccfc235a444eb367cae3689" +checksum = "4d6250322ef6e60f93f9a2162799302cd6f68f79f6e5d85c8c16f14d1d958178" dependencies = [ - "bytes 1.0.1", + "bytes", "fnv", "futures-core", "futures-sink", "futures-util", "http", - "indexmap", + "indexmap 2.1.0", "slab", "tokio", "tokio-util", @@ -394,6 +478,12 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "00d63df3d41950fb462ed38308eea019113ad1508da725bbedcd0fa5a85ef5f7" +[[package]] +name = "hashbrown" +version = "0.14.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" + [[package]] name = "heck" version = "0.3.3" @@ -405,11 +495,11 @@ dependencies = [ [[package]] name = "hedwig" -version = "6.3.0" +version = "7.0.0" dependencies = [ "async-channel", "async-trait", - "bytes 1.0.1", + "bytes", "either", "futures-channel", "futures-util", @@ -425,7 +515,7 @@ dependencies = [ "tonic", "tracing", "url", - "uuid", + "uuid 1.6.1", "valico", "ya-gcp", ] @@ -441,31 +531,31 @@ dependencies = [ [[package]] name = "http" -version = "0.2.1" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28d569972648b2c512421b5f2a405ad6ac9666547189d0c5477a3f200f3e02f9" +checksum = "8947b1a6fad4393052c7ba1f4cd97bed3e953a95c79c92ad9b051a04611d9fbb" dependencies = [ - "bytes 0.5.6", + "bytes", "fnv", - "itoa", + "itoa 1.0.9", ] [[package]] name = "http-body" -version = "0.4.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ff4f84919677303da5f147645dbea6b1881f368d03ac84e1dc09031ebd7b2c6" +checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" dependencies = [ - "bytes 1.0.1", + "bytes", "http", "pin-project-lite", ] [[package]] name = "httparse" -version = "1.5.1" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acd94fdbe1d4ff688b67b04eee2e17bd50995534a61539e45adfefb45e5e5503" +checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" [[package]] name = "httpdate" @@ -491,11 +581,11 @@ dependencies = [ [[package]] name = "hyper" -version = "0.14.16" +version = "0.14.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7ec3e62bdc98a2f0393a5048e4c30ef659440ea6e0e572965103e72bd836f55" +checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468" dependencies = [ - "bytes 1.0.1", + "bytes", "futures-channel", "futures-core", "futures-util", @@ -504,9 +594,9 @@ dependencies = [ "http-body", "httparse", "httpdate", - "itoa", + "itoa 1.0.9", "pin-project-lite", - "socket2 0.4.2", + "socket2 0.4.10", "tokio", "tower-service", "tracing", @@ -515,19 +605,18 @@ dependencies = [ [[package]] name = "hyper-rustls" -version = "0.22.1" +version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f9f7a97316d44c0af9b0301e65010573a853a9fc97046d7331d7f6bc0fd5a64" +checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" dependencies = [ - "ct-logs", "futures-util", + "http", "hyper", "log", "rustls", "rustls-native-certs", "tokio", "tokio-rustls", - "webpki", ] [[package]] @@ -560,7 +649,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "55e2e4c765aa53a0424761bf9f41aa7a6ac1efa87238f59560640e27fca028f2" dependencies = [ "autocfg", - "hashbrown", + "hashbrown 0.9.0", +] + +[[package]] +name = "indexmap" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" +dependencies = [ + "equivalent", + "hashbrown 0.14.3", ] [[package]] @@ -588,13 +687,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc6f3ad7b9d11a0c00842ff8de1b60ee58661048eb8049ed33c73594f359d7e6" [[package]] -name = "js-sys" -version = "0.3.45" +name = "itoa" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca059e81d9486668f12d455a4ea6daa600bd408134cd17e3d3fb5a32d1f016f8" -dependencies = [ - "wasm-bindgen", -] +checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" [[package]] name = "jsonway" @@ -614,9 +710,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.102" +version = "0.2.150" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2a5ac8f984bfcf3a823267e5fde638acc3325f6496633a5da6bb6eb2171e103" +checksum = "89d92a4743f9a61002fae18374ed11e7973f530cb3a3255fb354818118b2203c" [[package]] name = "lock_api" @@ -629,12 +725,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.11" +version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fabed175da42fed1fa0746b0ea71f412aa9d35e76e95e59b192c64b9dc2bf8b" -dependencies = [ - "cfg-if 0.1.10", -] +checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" [[package]] name = "matches" @@ -642,42 +735,42 @@ version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" +[[package]] +name = "matchit" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94" + [[package]] name = "memchr" -version = "2.3.3" +version = "2.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3728d817d99e5ac407411fa471ff9800a778d88a24685968b36824eaf4bee400" +checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" [[package]] -name = "mio" -version = "0.7.9" +name = "mime" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5dede4e2065b3842b8b0af444119f3aa331cc7cc2dd20388bfb0f5d5a38823a" -dependencies = [ - "libc", - "log", - "miow", - "ntapi", - "winapi", -] +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" [[package]] -name = "miow" -version = "0.3.6" +name = "miniz_oxide" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a33c1b55807fbed163481b5ba66db4b2fa6cde694a5027be10fb724206c5897" +checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" dependencies = [ - "socket2 0.3.19", - "winapi", + "adler", ] [[package]] -name = "ntapi" -version = "0.3.6" +name = "mio" +version = "0.8.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f6bb902e437b6d86e03cce10a7e2af662292c5dfef23b65899ea3ac9354ad44" +checksum = "3dce281c5e46beae905d4de1870d8b1509a9142b62eedf18b443b011ca8343d0" dependencies = [ - "winapi", + "libc", + "wasi 0.11.0+wasi-snapshot-preview1", + "windows-sys", ] [[package]] @@ -699,11 +792,29 @@ dependencies = [ "autocfg", ] +[[package]] +name = "num_threads" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2819ce041d2ee131036f4fc9d6ae7ae125a3a40e97ba64d04fe799ad9dabbb44" +dependencies = [ + "libc", +] + +[[package]] +name = "object" +version = "0.32.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9cf5f9dd3933bd50a9e1f149ec995f39ae2c496d31fd772c1fd45ebc27e902b0" +dependencies = [ + "memchr", +] + [[package]] name = "once_cell" -version = "1.8.0" +version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "692fcb63b64b1758029e0a96ee63e049ce8c5948587f2f7208df04625e5f6b56" +checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" [[package]] name = "openssl-probe" @@ -797,29 +908,29 @@ dependencies = [ [[package]] name = "pin-project" -version = "1.0.5" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96fa8ebb90271c4477f144354485b8068bd8f6b78b428b01ba892ca26caf0b63" +checksum = "fda4ed1c6c173e3fc7a83629421152e01d7b1f9b7f65fb301e490e8cfc656422" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.0.5" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "758669ae3558c6f74bd2a18b41f7ac0b5a195aea6639d6a9b5e5d1ad5ba24c0b" +checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.39", ] [[package]] name = "pin-project-lite" -version = "0.2.7" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d31d11c69a6b52a174b42bdc0c30e5e11670f90788b2c471c31c1d17d449443" +checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" [[package]] name = "pin-utils" @@ -827,6 +938,12 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + [[package]] name = "ppv-lite86" version = "0.2.9" @@ -842,7 +959,7 @@ dependencies = [ "proc-macro-error-attr", "proc-macro2", "quote", - "syn", + "syn 1.0.60", "version_check", ] @@ -871,43 +988,42 @@ checksum = "eba180dafb9038b050a4c280019bbedf9f2467b61e5d892dcad585bb57aadc5a" [[package]] name = "proc-macro2" -version = "1.0.24" +version = "1.0.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e0704ee1a7e00d7bb417d0770ea303c1bccbabf0ef1667dae92b5967f5f8a71" +checksum = "39278fbbf5fb4f646ce651690877f89d1c5811a3d4acb27700c1cb3cdb78fd3b" dependencies = [ - "unicode-xid", + "unicode-ident", ] [[package]] name = "prost" -version = "0.9.0" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "444879275cb4fd84958b1a1d5420d15e6fcf7c235fe47f053c9c2a80aceb6001" +checksum = "146c289cda302b98a28d40c8b3b90498d6e526dd24ac2ecea73e4e491685b94a" dependencies = [ - "bytes 1.0.1", + "bytes", "prost-derive", ] [[package]] name = "prost-derive" -version = "0.9.0" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9cc1a3263e07e0bf68e96268f37665207b49560d98739662cdfaae215c720fe" +checksum = "efb6c9a1dd1def8e2124d17e83a20af56f1570d6c2d2bd9e266ccb768df3840e" dependencies = [ "anyhow", "itertools", "proc-macro2", "quote", - "syn", + "syn 2.0.39", ] [[package]] name = "prost-types" -version = "0.9.0" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "534b7a0e836e3c482d2693070f982e39e7611da9695d4d1f5a4b186b51faef0a" +checksum = "193898f59edcf43c26227dcd4c8427f00d99d61e95dcde58dabd49fa291d470e" dependencies = [ - "bytes 1.0.1", "prost", ] @@ -926,9 +1042,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.7" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa563d17ecb180e500da1cfd2b028310ac758de548efdd203e18f283af693f37" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" dependencies = [ "proc-macro2", ] @@ -1022,7 +1138,7 @@ version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7" dependencies = [ - "getrandom 0.2.3", + "getrandom 0.2.11", ] [[package]] @@ -1099,19 +1215,24 @@ dependencies = [ [[package]] name = "ring" -version = "0.16.15" +version = "0.17.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "952cd6b98c85bbc30efa1ba5783b8abf12fec8b3287ffa52605b9432313e34e4" +checksum = "684d5e6e18f669ccebf64a92236bb7db9a34f07be010e3627368182027180866" dependencies = [ "cc", + "getrandom 0.2.11", "libc", - "once_cell", "spin", "untrusted", - "web-sys", - "winapi", + "windows-sys", ] +[[package]] +name = "rustc-demangle" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" + [[package]] name = "rustc_version" version = "0.3.3" @@ -1123,29 +1244,53 @@ dependencies = [ [[package]] name = "rustls" -version = "0.19.0" +version = "0.21.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "064fd21ff87c6e87ed4506e68beb42459caa4a0e2eb144932e6776768556980b" +checksum = "629648aced5775d558af50b2b4c7b02983a04b312126d45eeead26e7caa498b9" dependencies = [ - "base64", "log", "ring", + "rustls-webpki", "sct", - "webpki", ] [[package]] name = "rustls-native-certs" -version = "0.5.0" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a07b7c1885bd8ed3831c289b7870b13ef46fe0e856d288c30d9cc17d75a2092" +checksum = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00" dependencies = [ "openssl-probe", - "rustls", + "rustls-pemfile", "schannel", "security-framework", ] +[[package]] +name = "rustls-pemfile" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" +dependencies = [ + "base64 0.21.5", +] + +[[package]] +name = "rustls-webpki" +version = "0.101.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" +dependencies = [ + "ring", + "untrusted", +] + +[[package]] +name = "rustversion" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" + [[package]] name = "ryu" version = "1.0.5" @@ -1170,9 +1315,9 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" [[package]] name = "sct" -version = "0.6.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3042af939fca8c3453b7af0f1c66e533a15a86169e39de2657310ade8f98d3c" +checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" dependencies = [ "ring", "untrusted", @@ -1227,22 +1372,22 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.116" +version = "1.0.193" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96fe57af81d28386a513cbc6858332abc6117cfdb5999647c6444b8f43a370a5" +checksum = "25dd9975e68d0cb5aa1120c288333fc98731bd1dd12f561e468ea4728c042b89" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.116" +version = "1.0.193" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f630a6370fd8e457873b4bd2ffdae75408bc291ba72be773772a4c2a065d9ae8" +checksum = "43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.39", ] [[package]] @@ -1251,7 +1396,7 @@ version = "1.0.57" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "164eacbdb13512ec2745fb09d51fd5b22b0d65ed294a1dcf7285a360c80a675c" dependencies = [ - "itoa", + "itoa 0.4.6", "ryu", "serde", ] @@ -1294,30 +1439,29 @@ checksum = "1ecab6c735a6bb4139c0caafd0cc3635748bbb3acf4550e8138122099251f309" [[package]] name = "socket2" -version = "0.3.19" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "122e570113d28d773067fab24266b66753f6ea915758651696b6e35e49f88d6e" +checksum = "9f7916fc008ca5542385b89a3d3ce689953c143e9304a9bf8beec1de48994c0d" dependencies = [ - "cfg-if 1.0.0", "libc", "winapi", ] [[package]] name = "socket2" -version = "0.4.2" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dc90fe6c7be1a323296982db1836d1ea9e47b6839496dde9a541bc496df3516" +checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9" dependencies = [ "libc", - "winapi", + "windows-sys", ] [[package]] name = "spin" -version = "0.5.2" +version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" [[package]] name = "strsim" @@ -1346,7 +1490,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn", + "syn 1.0.60", ] [[package]] @@ -1360,6 +1504,23 @@ dependencies = [ "unicode-xid", ] +[[package]] +name = "syn" +version = "2.0.39" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23e78b90f2fcf45d3e842032ce32e3f2d1545ba6636271dcbf24fa306d87be7a" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "sync_wrapper" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" + [[package]] name = "tempdir" version = "0.3.7" @@ -1396,7 +1557,7 @@ checksum = "bd80fc12f73063ac132ac92aceea36734f04a1d93c1240c6944e23a3b8841793" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.60", ] [[package]] @@ -1419,6 +1580,36 @@ dependencies = [ "winapi", ] +[[package]] +name = "time" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4a34ab300f2dee6e562c10a046fc05e358b29f9bf92277f30c3c8d82275f6f5" +dependencies = [ + "deranged", + "libc", + "num_threads", + "powerfmt", + "serde", + "time-core", + "time-macros", +] + +[[package]] +name = "time-core" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" + +[[package]] +name = "time-macros" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ad70d68dba9e1f8aceda7aa6711965dfec1cac869f311a51bd08b3a2ccbce20" +dependencies = [ + "time-core", +] + [[package]] name = "tinyvec" version = "0.3.4" @@ -1427,20 +1618,19 @@ checksum = "238ce071d267c5710f9d31451efec16c5ee22de34df17cc05e56cbc92e967117" [[package]] name = "tokio" -version = "1.11.0" +version = "1.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4efe6fc2395938c8155973d7be49fe8d03a843726e285e100a8a383cc0154ce" +checksum = "d0c014766411e834f7af5b8f4cf46257aab4036ca95e9d2c144a10f59ad6f5b9" dependencies = [ - "autocfg", - "bytes 1.0.1", + "backtrace", + "bytes", "libc", - "memchr", "mio", - "once_cell", "pin-project-lite", "signal-hook-registry", + "socket2 0.5.5", "tokio-macros", - "winapi", + "windows-sys", ] [[package]] @@ -1455,24 +1645,23 @@ dependencies = [ [[package]] name = "tokio-macros" -version = "1.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "caf7b11a536f46a809a8a9f0bb4237020f70ecbf115b842360afb127ea2fda57" +checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.39", ] [[package]] name = "tokio-rustls" -version = "0.22.0" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc6844de72e57df1980054b38be3a9f4702aba4858be64dd700181a8a6d0e1b6" +checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" dependencies = [ "rustls", "tokio", - "webpki", ] [[package]] @@ -1488,30 +1677,29 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.6.3" +version = "0.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebb7cb2f00c5ae8df755b252306272cd1790d39728363936e01827e11f0b017b" +checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" dependencies = [ - "bytes 1.0.1", + "bytes", "futures-core", "futures-sink", - "log", "pin-project-lite", "tokio", + "tracing", ] [[package]] name = "tonic" -version = "0.6.2" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff08f4649d10a70ffa3522ca559031285d8e421d727ac85c60825761818f5d0a" +checksum = "d560933a0de61cf715926b9cac824d4c883c2c43142f787595e48280c40a1d0e" dependencies = [ "async-stream", "async-trait", - "base64", - "bytes 1.0.1", - "futures-core", - "futures-util", + "axum", + "base64 0.21.5", + "bytes", "h2", "http", "http-body", @@ -1520,32 +1708,32 @@ dependencies = [ "percent-encoding", "pin-project", "prost", - "prost-derive", + "rustls", + "rustls-native-certs", + "rustls-pemfile", "tokio", + "tokio-rustls", "tokio-stream", - "tokio-util", "tower", "tower-layer", "tower-service", "tracing", - "tracing-futures", ] [[package]] name = "tower" -version = "0.4.9" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d15a6b60cdff0cb039d81d3b37f8bc3d7e53dca09069aae3ef2502ca4834fe30" +checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" dependencies = [ "futures-core", "futures-util", - "indexmap", + "indexmap 1.6.0", "pin-project", "pin-project-lite", "rand 0.8.4", "slab", "tokio", - "tokio-stream", "tokio-util", "tower-layer", "tower-service", @@ -1554,23 +1742,22 @@ dependencies = [ [[package]] name = "tower-layer" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "343bc9466d3fe6b0f960ef45960509f84480bf4fd96f92901afe7ff3df9d3a62" +checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" [[package]] name = "tower-service" -version = "0.3.0" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e987b6bf443f4b5b3b6f38704195592cca41c5bb7aedd3c3693c7081f8289860" +checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" [[package]] name = "tracing" -version = "0.1.27" +version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2ba9ab62b7d6497a8638dfda5e5c4fb3b2d5a7fca4118f2b96151c8ef1a437e" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" dependencies = [ - "cfg-if 1.0.0", "log", "pin-project-lite", "tracing-attributes", @@ -1579,32 +1766,22 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.18" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4f480b8f81512e825f337ad51e94c1eb5d3bbdf2b363dcd01e2b19a9ffe3f8e" +checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.39", ] [[package]] name = "tracing-core" -version = "0.1.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46125608c26121c81b0c6d693eab5a420e416da7e43c426d2e8f7df8da8a3acf" -dependencies = [ - "lazy_static", -] - -[[package]] -name = "tracing-futures" -version = "0.2.5" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97d095ae15e245a057c8e8451bab9b3ee1e1f68e9ba2b4fbc18d0ac5237835f2" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" dependencies = [ - "pin-project", - "tracing", + "once_cell", ] [[package]] @@ -1628,6 +1805,12 @@ dependencies = [ "matches", ] +[[package]] +name = "unicode-ident" +version = "1.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" + [[package]] name = "unicode-normalization" version = "0.1.13" @@ -1657,9 +1840,9 @@ checksum = "f7fe0bb3479651439c9112f72b6c505038574c9fbb575ed1bf3b797fa39dd564" [[package]] name = "untrusted" -version = "0.7.1" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" @@ -1681,6 +1864,15 @@ dependencies = [ "rand 0.7.3", ] +[[package]] +name = "uuid" +version = "1.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e395fcf16a7a3d8127ec99782007af141946b4795001f876d54fb0d55978560" +dependencies = [ + "getrandom 0.2.11", +] + [[package]] name = "valico" version = "3.4.0" @@ -1697,7 +1889,7 @@ dependencies = [ "serde", "serde_json", "url", - "uuid", + "uuid 0.8.1", ] [[package]] @@ -1735,106 +1927,104 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" [[package]] -name = "wasm-bindgen" -version = "0.2.68" +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ac64ead5ea5f05873d7c12b545865ca2b8d28adfc50a49b84770a3a97265d42" -dependencies = [ - "cfg-if 0.1.10", - "wasm-bindgen-macro", -] +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] -name = "wasm-bindgen-backend" -version = "0.2.68" +name = "winapi" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f22b422e2a757c35a73774860af8e112bff612ce6cb604224e8e47641a9e4f68" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" dependencies = [ - "bumpalo", - "lazy_static", - "log", - "proc-macro2", - "quote", - "syn", - "wasm-bindgen-shared", + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", ] [[package]] -name = "wasm-bindgen-macro" -version = "0.2.68" +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "windows-sys" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b13312a745c08c469f0b292dd2fcd6411dba5f7160f593da6ef69b64e407038" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ - "quote", - "wasm-bindgen-macro-support", + "windows-targets", ] [[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.68" +name = "windows-targets" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f249f06ef7ee334cc3b8ff031bfc11ec99d00f34d86da7498396dc1e3b1498fe" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" dependencies = [ - "proc-macro2", - "quote", - "syn", - "wasm-bindgen-backend", - "wasm-bindgen-shared", + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", ] [[package]] -name = "wasm-bindgen-shared" -version = "0.2.68" +name = "windows_aarch64_gnullvm" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d649a3145108d7d3fbcde896a468d1bd636791823c9921135218ad89be08307" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] -name = "web-sys" -version = "0.3.45" +name = "windows_aarch64_msvc" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bf6ef87ad7ae8008e15a355ce696bed26012b7caa21605188cfd8214ab51e2d" -dependencies = [ - "js-sys", - "wasm-bindgen", -] +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] -name = "webpki" -version = "0.21.3" +name = "windows_i686_gnu" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab146130f5f790d45f82aeeb09e55a256573373ec64409fc19a6fb82fb1032ae" -dependencies = [ - "ring", - "untrusted", -] +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] -name = "winapi" -version = "0.3.9" +name = "windows_i686_msvc" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" +name = "windows_x86_64_gnu" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" +name = "windows_x86_64_gnullvm" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "ya-gcp" -version = "0.7.3" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab4678869e247e2b32a8a8f9172c41e23b7abb6ab5deaa872260a191f4b4e40a" +checksum = "ccbd7e7f7d8f7a74b1c6966212cfcd5417b1655abe1a73b2e69624a90d1a4330" dependencies = [ "async-channel", "async-stream", @@ -1850,6 +2040,8 @@ dependencies = [ "prost", "prost-types", "rand 0.8.4", + "rustls", + "rustls-native-certs", "serde", "tempdir", "thiserror", @@ -1857,28 +2049,33 @@ dependencies = [ "tonic", "tower", "tracing", - "uuid", + "uuid 1.6.1", "yup-oauth2", ] [[package]] name = "yup-oauth2" -version = "5.1.0" +version = "8.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2573621fa28865489bdf556cdb8703604f4e8498612e3041a212ac20e59c4aeb" +checksum = "364ca376b5c04d9b2be9693054e3e0d2d146b363819d0f9a10c6ee66e4c8406b" dependencies = [ - "base64", - "chrono", + "anyhow", + "async-trait", + "base64 0.13.0", "futures", "http", "hyper", "hyper-rustls", + "itertools", "log", "percent-encoding", "rustls", + "rustls-pemfile", "seahash", "serde", "serde_json", + "time 0.3.30", "tokio", + "tower-service", "url", ] diff --git a/Cargo.toml b/Cargo.toml index caa7adb..cd3d10e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,12 +1,12 @@ [package] name = "hedwig" -version = "6.4.0" +version = "7.0.0" authors = [ "Aniruddha Maru ", "Simonas Kazlauskas ", "Renar Narubin ", ] -edition = "2018" +edition = "2021" repository = "https://github.com/standard-ai/hedwig-rust.git" homepage = "https://github.com/standard-ai/hedwig-rust" readme = "README.md" @@ -42,26 +42,26 @@ pin-project = "1" smallstr = { version = "0.3.0", features = ["union"] } thiserror = { version = "1", default-features = false } url = { version = "2", default-features = false } -uuid = { version = "^0.8", features = ["v4"], default-features = false } +uuid = { version = "1.6", features = ["v4"], default-features = false } async-channel = { version = "1.6", optional = true } serde = { version = "^1.0", optional = true, default-features = false } serde_json = { version = "^1", features = ["std"], optional = true, default-features = false } parking_lot = { version = "0.11", optional = true } -prost = { version = "0.9", optional = true, features = ["std"], default-features = false } -tracing = { version = "0.1.26", optional = true } +prost = { version = "0.12", optional = true, features = ["std"], default-features = false } +tracing = { version = "0.1.37", optional = true } valico = { version = "^3.2", optional = true, default-features = false } -ya-gcp = { version = "0.7.2", features = ["pubsub"], optional = true } +ya-gcp = { version = "0.11", features = ["pubsub"], optional = true } [dev-dependencies] async-channel = { version = "1.6" } futures-channel = "0.3.17" parking_lot = { version = "0.11" } -prost = { version = "0.9", features = ["std", "prost-derive"] } +prost = { version = "0.12", features = ["std", "prost-derive"] } tokio = { version = "1", features = ["macros", "rt"] } -tonic = "0.6" +tonic = "0.10" serde = { version = "1", features = ["derive"] } -ya-gcp = { version = "0.7", features = ["pubsub", "emulators"] } +ya-gcp = { version = "0.11", features = ["pubsub", "emulators"] } structopt = "0.3" [package.metadata.docs.rs] diff --git a/src/backends/googlepubsub/consumer.rs b/src/backends/googlepubsub/consumer.rs index 5039452..b9b4cc7 100644 --- a/src/backends/googlepubsub/consumer.rs +++ b/src/backends/googlepubsub/consumer.rs @@ -17,11 +17,14 @@ use std::{ }; use tracing::debug; use uuid::Uuid; -use ya_gcp::pubsub; +use ya_gcp::{ + grpc::{Body, BoxBody, Bytes, DefaultGrpcImpl, GrpcService, StdError}, + pubsub, +}; use super::{ - retry_policy, AcknowledgeError, BoxError, Connect, DefaultConnector, MakeConnection, - ModifyAcknowledgeError, PubSubError, StreamSubscriptionConfig, TopicName, Uri, + retry_policy, AcknowledgeError, BoxError, ModifyAcknowledgeError, PubSubError, + StreamSubscriptionConfig, TopicName, }; /// A PubSub subscription name. @@ -69,14 +72,22 @@ impl<'s> SubscriptionName<'s> { /// This includes managing subscriptions and reading data from subscriptions. Created using /// [`build_consumer`](super::ClientBuilder::build_consumer) #[derive(Debug, Clone)] -pub struct ConsumerClient { - client: pubsub::SubscriberClient, +pub struct ConsumerClient { + client: pubsub::SubscriberClient, project: String, queue: String, } -impl ConsumerClient { - pub(super) fn new(client: pubsub::SubscriberClient, project: String, queue: String) -> Self { +impl ConsumerClient { + /// Create a new consumer from an existing pubsub client. + /// + /// This function is useful for client customization; most callers should typically use the + /// defaults provided by [`build_consumer`](super::ClientBuilder::build_consumer) + pub fn from_client( + client: pubsub::SubscriberClient, + project: String, + queue: String, + ) -> Self { ConsumerClient { client, project, @@ -106,22 +117,22 @@ impl ConsumerClient { } /// Get a reference to the underlying pubsub client - pub fn inner(&self) -> &pubsub::SubscriberClient { + pub fn inner(&self) -> &pubsub::SubscriberClient { &self.client } /// Get a mutable reference to the underlying pubsub client - pub fn inner_mut(&mut self) -> &mut pubsub::SubscriberClient { + pub fn inner_mut(&mut self) -> &mut pubsub::SubscriberClient { &mut self.client } } -impl ConsumerClient +impl ConsumerClient where - C: MakeConnection + Connect + Clone + Send + Sync + 'static, - C::Connection: Unpin + Send + 'static, - C::Future: Send + 'static, - BoxError: From, + S: GrpcService, + S::Error: Into, + S::ResponseBody: Body + Send + 'static, + ::Error: Into + Send, { /// Create a new PubSub subscription /// @@ -132,7 +143,10 @@ where ) -> Result<(), PubSubError> { let subscription = SubscriptionConfig::into_subscription(config, &*self); - self.client.create_subscription(subscription).await?; + self.client + .raw_api_mut() + .create_subscription(subscription) + .await?; Ok(()) } @@ -147,7 +161,12 @@ where let subscription = self.format_subscription(subscription).into(); self.client - .delete_subscription(pubsub::api::DeleteSubscriptionRequest { subscription }) + .raw_api_mut() + .delete_subscription({ + let mut r = pubsub::api::DeleteSubscriptionRequest::default(); + r.subscription = subscription; + r + }) .await?; Ok(()) @@ -158,7 +177,10 @@ where &mut self, subscription: SubscriptionName<'_>, stream_config: StreamSubscriptionConfig, - ) -> PubSubStream { + ) -> PubSubStream + where + S: Clone, + { let subscription = self.format_subscription(subscription); PubSubStream(self.client.stream_subscription(subscription, stream_config)) @@ -172,11 +194,13 @@ where subscription: SubscriptionName<'_>, timestamp: pubsub::api::Timestamp, ) -> Result<(), PubSubError> { - let request = pubsub::api::SeekRequest { - subscription: self.format_subscription(subscription).into(), - target: Some(pubsub::api::seek_request::Target::Time(timestamp)), + let request = { + let mut r = pubsub::api::SeekRequest::default(); + r.subscription = self.format_subscription(subscription).into(); + r.target = Some(pubsub::api::seek_request::Target::Time(timestamp)); + r }; - self.client.seek(request).await?; + self.client.raw_api_mut().seek(request).await?; Ok(()) } @@ -209,27 +233,33 @@ match_fields! { push_config, detached, topic_message_retention_duration, + bigquery_config, + cloud_storage_config, + enable_exactly_once_delivery, + // FIXME check state } } impl<'s> SubscriptionConfig<'s> { fn into_subscription(self, client: &ConsumerClient) -> pubsub::api::Subscription { - pubsub::api::Subscription { - name: client.format_subscription(self.name).into(), - topic: client.format_topic(self.topic).into(), - ack_deadline_seconds: self.ack_deadline_seconds.into(), - retain_acked_messages: self.retain_acked_messages, - message_retention_duration: self.message_retention_duration, - labels: self.labels, - enable_message_ordering: self.enable_message_ordering, - expiration_policy: self.expiration_policy, - filter: self.filter, - dead_letter_policy: self.dead_letter_policy, - retry_policy: self.retry_policy, - push_config: None, // push delivery isn't used, it's streaming pull - detached: false, // set by the server on gets/listing - topic_message_retention_duration: None, // Output only, set by the server - } + let mut sub = pubsub::api::Subscription::default(); + + sub.name = client.format_subscription(self.name).into(); + sub.topic = client.format_topic(self.topic).into(); + sub.ack_deadline_seconds = self.ack_deadline_seconds.into(); + sub.retain_acked_messages = self.retain_acked_messages; + sub.message_retention_duration = self.message_retention_duration; + sub.labels = self.labels; + sub.enable_message_ordering = self.enable_message_ordering; + sub.expiration_policy = self.expiration_policy; + sub.filter = self.filter; + sub.dead_letter_policy = self.dead_letter_policy; + sub.retry_policy = self.retry_policy; + sub.push_config = None; // push delivery isn't used, it's streaming pull + sub.detached = false; // set by the server on gets/listing + sub.topic_message_retention_duration = None; // Output only, set by the server + + sub } } @@ -314,11 +344,11 @@ impl crate::consumer::AcknowledgeToken for pubsub::AcknowledgeToken { #[pin_project] #[cfg_attr(docsrs, doc(cfg(feature = "google")))] pub struct PubSubStream< - C = DefaultConnector, + S = DefaultGrpcImpl, R = retry_policy::ExponentialBackoff, ->(#[pin] pubsub::StreamSubscription); +>(#[pin] pubsub::StreamSubscription); -impl PubSubStream { +impl PubSubStream { /// Set the [`RetryPolicy`](retry_policy::RetryPolicy) to use for this streaming subscription. /// /// The stream will be reconnected if the policy indicates that an encountered error should be @@ -326,7 +356,7 @@ impl PubSubStream { // Because `poll_next` requires `Pin<&mut Self>`, this function cannot be called after the // stream has started because it moves `self`. That means that the retry policy can only be // changed before the polling starts, and is fixed from that point on - pub fn with_retry_policy(self, retry_policy: R) -> PubSubStream + pub fn with_retry_policy(self, retry_policy: R) -> PubSubStream where R: retry_policy::RetryPolicy<(), PubSubError>, { @@ -334,12 +364,13 @@ impl PubSubStream { } } -impl stream::Stream for PubSubStream +impl stream::Stream for PubSubStream where - C: MakeConnection + Connect + Clone + Send + Sync + 'static, - C::Connection: Unpin + Send + 'static, - C::Future: Send + 'static, - BoxError: From, + S: GrpcService + Send + 'static, + S::Future: Send + 'static, + S::Error: Into, + S::ResponseBody: Body + Send + 'static, + ::Error: Into + Send, R: retry_policy::RetryPolicy<(), PubSubError> + Send + 'static, R::RetryOp: Send + 'static, >::Sleep: Send + 'static, @@ -359,19 +390,20 @@ where } } -impl crate::consumer::Consumer for PubSubStream +impl crate::consumer::Consumer for PubSubStream where - C: MakeConnection + Connect + Clone + Send + Sync + 'static, - C::Connection: Unpin + Send + 'static, - C::Future: Send + 'static, - BoxError: From, + S: GrpcService + Send + 'static, + S::Future: Send + 'static, + S::Error: Into, + S::ResponseBody: Body + Send + 'static, + ::Error: Into + Send, R: retry_policy::RetryPolicy<(), PubSubError> + Send + 'static, R::RetryOp: Send + 'static, >::Sleep: Send + 'static, { type AckToken = pubsub::AcknowledgeToken; type Error = PubSubStreamError; - type Stream = PubSubStream; + type Stream = PubSubStream; fn stream(self) -> Self::Stream { self @@ -528,15 +560,17 @@ mod test { let mut attributes = user_attrs.clone(); attributes.extend(hedwig_attrs); - let message = PubsubMessage { - data: data.into(), - attributes, - message_id: String::from("some_unique_id"), - publish_time: Some(pubsub::api::Timestamp { + let message = { + let mut m = PubsubMessage::default(); + m.data = data.into(); + m.attributes = attributes; + m.message_id = String::from("some_unique_id"); + m.publish_time = Some(pubsub::api::Timestamp { seconds: 15, nanos: 42, - }), - ordering_key: String::new(), + }); + m.ordering_key = String::new(); + m }; let validated_message = pubsub_to_hedwig(message).unwrap(); @@ -576,9 +610,10 @@ mod test { let mut attributes = full_hedwig_attrs.clone(); attributes.remove(missing_header); - let res = pubsub_to_hedwig(PubsubMessage { - attributes, - ..PubsubMessage::default() + let res = pubsub_to_hedwig({ + let mut m = PubsubMessage::default(); + m.attributes = attributes; + m }); match res { @@ -618,9 +653,10 @@ mod test { let mut attributes = user_attrs.clone(); attributes.extend(hedwig_attrs); - let validated_message = pubsub_to_hedwig(PubsubMessage { - attributes, - ..PubsubMessage::default() + let validated_message = pubsub_to_hedwig({ + let mut m = PubsubMessage::default(); + m.attributes = attributes; + m }) .unwrap(); diff --git a/src/backends/googlepubsub/mod.rs b/src/backends/googlepubsub/mod.rs index 433c77d..7a96de0 100644 --- a/src/backends/googlepubsub/mod.rs +++ b/src/backends/googlepubsub/mod.rs @@ -8,12 +8,11 @@ pub use ya_gcp::{ self as gcp, grpc::StatusCodeSet, pubsub::{ - AcknowledgeError, AcknowledgeToken, BuildError, Error as PubSubError, MakeConnection, + AcknowledgeError, AcknowledgeToken, BuildError, Error as PubSubError, ModifyAcknowledgeError, PubSubConfig, PubSubRetryCheck, SinkError, StreamSubscriptionConfig, Uri, }, - retry_policy, AuthFlow, ClientBuilderConfig, Connect, CreateBuilderError, DefaultConnector, - ServiceAccountAuth, + retry_policy, AuthFlow, ClientBuilderConfig, CreateBuilderError, ServiceAccountAuth, }; type BoxError = Box; @@ -69,6 +68,7 @@ macro_rules! match_fields { $( $target_except_field: _, )* + .. }) => {}, None => {} }; @@ -112,8 +112,8 @@ impl<'s> TopicName<'s> { /// /// Note that the builder is not consumed when creating clients, and many clients can be built /// using the same builder. This may allow some resource re-use across the clients -pub struct ClientBuilder { - inner: ya_gcp::ClientBuilder, +pub struct ClientBuilder { + inner: ya_gcp::ClientBuilder, pubsub_config: PubSubConfig, } @@ -131,38 +131,15 @@ impl ClientBuilder { } } -impl ClientBuilder -where - C: Connect + Clone + Send + Sync + 'static, -{ - /// Create a new client builder with the given connector. - pub async fn with_connector( - config: ClientBuilderConfig, - pubsub_config: PubSubConfig, - connector: C, - ) -> Result { - Ok(ClientBuilder { - inner: ya_gcp::ClientBuilder::with_connector(config, connector).await?, - pubsub_config, - }) - } -} - -impl ClientBuilder -where - C: MakeConnection + Connect + Clone + Send + Sync + 'static, - C::Connection: Unpin + Send + 'static, - C::Future: Send + 'static, - BoxError: From, -{ +impl ClientBuilder { /// Create a new [`ConsumerClient`] for consuming messages from PubSub subscriptions within the /// given project, identified by the given queue name. pub async fn build_consumer( &self, project: impl Into, queue: impl Into, - ) -> Result, BuildError> { - Ok(ConsumerClient::new( + ) -> Result { + Ok(ConsumerClient::from_client( self.inner .build_pubsub_subscriber(self.pubsub_config.clone()) .await?, @@ -180,8 +157,8 @@ where &self, project: impl Into, publisher_id: impl Into, - ) -> Result, BuildError> { - Ok(PublisherClient::new( + ) -> Result { + Ok(PublisherClient::from_client( self.inner .build_pubsub_publisher(self.pubsub_config.clone()) .await?, diff --git a/src/backends/googlepubsub/publisher.rs b/src/backends/googlepubsub/publisher.rs index b52010c..bc029d2 100644 --- a/src/backends/googlepubsub/publisher.rs +++ b/src/backends/googlepubsub/publisher.rs @@ -6,20 +6,22 @@ use futures_util::{ use pin_project::pin_project; use std::{ collections::{BTreeMap, VecDeque}, - error::Error as StdError, fmt, pin::Pin, task::{Context, Poll}, time::SystemTime, }; -use ya_gcp::pubsub; +use ya_gcp::{ + grpc::{Body, BoxBody, Bytes, DefaultGrpcImpl, GrpcService, StdError}, + pubsub, +}; use super::{ retry_policy::{ exponential_backoff::Config as ExponentialBackoffConfig, ExponentialBackoff, RetryOperation, RetryPolicy, }, - BoxError, Connect, DefaultConnector, MakeConnection, PubSubError, TopicName, Uri, + PubSubError, TopicName, }; use message_translate::{TopicSink, TopicSinkError}; @@ -62,14 +64,18 @@ impl Clone for Shared { /// This includes managing topics and writing data to topics. Created using /// [`build_publisher`](super::ClientBuilder::build_publisher) #[derive(Debug, Clone)] -pub struct PublisherClient { +pub struct PublisherClient { client: pubsub::PublisherClient, project: String, identifier: String, } impl PublisherClient { - pub(super) fn new( + /// Create a new publisher from an existing pubsub client. + /// + /// This function is useful for client customization; most callers should typically use the + /// defaults provided by [`build_publisher`](super::ClientBuilder::build_publisher) + pub fn from_client( client: pubsub::PublisherClient, project: String, identifier: String, @@ -88,6 +94,21 @@ impl PublisherClient { fn identifier(&self) -> &str { &self.identifier } + + /// Construct a fully formatted project and topic name for the given topic + pub fn format_topic(&self, topic: TopicName<'_>) -> pubsub::ProjectTopicName { + topic.into_project_topic_name(self.project()) + } + + /// Get a reference to the underlying pubsub client + pub fn inner(&self) -> &pubsub::PublisherClient { + &self.client + } + + /// Get a mutable reference to the underlying pubsub client + pub fn inner_mut(&mut self) -> &mut pubsub::PublisherClient { + &mut self.client + } } /// Errors which can occur while publishing a message @@ -135,13 +156,13 @@ where } } -impl StdError for PublishError +impl std::error::Error for PublishError where M: fmt::Debug, - M::Error: StdError + 'static, - E: StdError + 'static, + M::Error: std::error::Error + 'static, + E: std::error::Error + 'static, { - fn source(&self) -> Option<&(dyn StdError + 'static)> { + fn source(&self) -> Option<&(dyn std::error::Error + 'static)> { match self { PublishError::Publish { cause, .. } => Some(cause as &_), PublishError::Response(cause) => Some(cause as &_), @@ -161,17 +182,17 @@ impl From> for PublishError { impl PublisherClient where - C: MakeConnection + ya_gcp::Connect + Clone + Send + Sync + 'static, - C::Connection: Unpin + Send + 'static, - C::Future: Send + 'static, - BoxError: From, + C: GrpcService, + C::Error: Into, + C::ResponseBody: Body + Send + 'static, + ::Error: Into + Send, { /// Create a new PubSub topic. /// /// See the GCP documentation on topics [here](https://cloud.google.com/pubsub/docs/admin) pub async fn create_topic(&mut self, topic: TopicConfig<'_>) -> Result<(), PubSubError> { let topic = topic.into_topic(self); - self.client.create_topic(topic).await?; + self.client.raw_api_mut().create_topic(topic).await?; Ok(()) } @@ -183,7 +204,12 @@ where let topic = topic.into_project_topic_name(self.project()).into(); self.client - .delete_topic(pubsub::api::DeleteTopicRequest { topic }) + .raw_api_mut() + .delete_topic({ + let mut r = pubsub::api::DeleteTopicRequest::default(); + r.topic = topic; + r + }) .await?; Ok(()) @@ -194,13 +220,17 @@ where /// Multiple publishers can be created using the same client, for example to use different /// validators. They may share some underlying resources for greater efficiency than creating /// multiple clients. - pub fn publisher(&self) -> Publisher { + pub fn publisher(&self) -> Publisher + where + C: Clone, + { Publisher { client: self.clone(), retry_policy: ExponentialBackoff::new( pubsub::PubSubRetryCheck::default(), ExponentialBackoffConfig::default(), ), + publish_config: pubsub::PublishConfig::default(), } } @@ -213,9 +243,10 @@ where } /// A publisher for sending messages to PubSub topics -pub struct Publisher> { +pub struct Publisher> { client: PublisherClient, retry_policy: R, + publish_config: pubsub::PublishConfig, } impl Publisher { @@ -231,13 +262,26 @@ impl Publisher { Publisher { retry_policy, client: self.client, + publish_config: self.publish_config, + } + } + + /// Set the publishing configuration for this `Publisher`. + pub fn with_config(self, publish_config: pubsub::PublishConfig) -> Self { + Self { + publish_config, + ..self } } } impl crate::publisher::Publisher for Publisher where - C: Connect + Clone + Send + Sync + 'static, + C: GrpcService + Clone + Send + 'static, + C::Future: Send + 'static, + C::Error: Into, + C::ResponseBody: Body + Send + 'static, + ::Error: Into + Send, M: EncodableMessage + Send + 'static, S: Sink + Send + 'static, R: RetryPolicy<[M], PubSubError> + Clone + 'static, @@ -259,6 +303,7 @@ where client: self.client, retry_policy: self.retry_policy, response_sink: Shared::new(Box::pin(response_sink)), + publish_config: self.publish_config, _p: std::marker::PhantomPinned, } } @@ -284,16 +329,13 @@ match_fields! { impl<'s> TopicConfig<'s> { fn into_topic(self, client: &PublisherClient) -> pubsub::api::Topic { - pubsub::api::Topic { - name: self.name.into_project_topic_name(client.project()).into(), - labels: self.labels, - message_storage_policy: self.message_storage_policy, - kms_key_name: self.kms_key_name, - message_retention_duration: self.message_retention_duration, - - schema_settings: None, // documented as experimental, and hedwig enforces schemas anyway - satisfies_pzs: false, // documented as reserved (currently unused) - } + let mut t = pubsub::api::Topic::default(); + t.name = self.name.into_project_topic_name(client.project()).into(); + t.labels = self.labels; + t.message_storage_policy = self.message_storage_policy; + t.kms_key_name = self.kms_key_name; + t.message_retention_duration = self.message_retention_duration; + t } } @@ -347,13 +389,19 @@ pub struct PublishSink, R> { // fine due to the outer pinning response_sink: Shared>>, + publish_config: pubsub::PublishConfig, + // enable future !Unpin without breaking changes _p: std::marker::PhantomPinned, } impl Sink for PublishSink where - C: Connect + Clone + Send + Sync + 'static, + C: GrpcService + Clone + Send + 'static, + C::Future: Send + 'static, + C::Error: Into, + C::ResponseBody: Body + Send + 'static, + ::Error: Into + Send, M: EncodableMessage + Send + 'static, S: Sink + Send + 'static, R: RetryPolicy<[M], PubSubError> + Clone + 'static, @@ -383,6 +431,7 @@ where client.client.publish_topic_sink( TopicName::new(topic.as_ref()) .into_project_topic_name(client.project()), + this.publish_config.clone(), ), retry_policy.clone(), Shared::clone(response_sink), @@ -507,11 +556,11 @@ fn hedwig_to_pubsub( attributes.insert(crate::HEDWIG_PUBLISHER.into(), publisher_id.into()); attributes.insert(crate::HEDWIG_FORMAT_VERSION.into(), "1.0".into()); - Ok(pubsub::api::PubsubMessage { - data: msg.into_data(), - attributes, - ..pubsub::api::PubsubMessage::default() - }) + let mut m = pubsub::api::PubsubMessage::default(); + m.data = msg.into_data(); + m.attributes = attributes; + + Ok(m) } /// Translation mechanisms for converting between user messages and api messages. @@ -674,7 +723,11 @@ mod message_translate { impl, R> Sink<(M, pubsub::api::PubsubMessage)> for TopicSink where - C: Connect + Clone + Send + Sync + 'static, + C: GrpcService + Clone + Send + 'static, + C::Future: Send + 'static, + C::Error: Into, + C::ResponseBody: Body + Send + 'static, + ::Error: Into + Send, R: RetryPolicy<[M], PubSubError> + 'static, R::RetryOp: Send + 'static, >::Sleep: Send + 'static, diff --git a/src/tests/google.rs b/src/tests/google.rs index e00c8f3..a0ec393 100644 --- a/src/tests/google.rs +++ b/src/tests/google.rs @@ -19,7 +19,7 @@ use std::{ sync::mpsc, task::{Context, Poll}, }; -use ya_gcp::pubsub::emulator::EmulatorClient; +use ya_gcp::pubsub::emulator::Emulator; const SCHEMA: &str = "test-schema"; const TOPIC: &str = "test-topic"; @@ -85,7 +85,7 @@ async fn roundtrip_protobuf() -> Result<(), BoxError> { let topic_name = TopicName::new(TOPIC); let subscription_name = SubscriptionName::new("test-subscription"); - let emulator = EmulatorClient::with_project(project_name).await?; + let emulator = Emulator::new().project(project_name).await?; let client_builder = ClientBuilder::new( ClientBuilderConfig::new().auth_flow(AuthFlow::NoAuth), @@ -148,7 +148,7 @@ async fn response_sink_responses() -> Result<(), BoxError> { let topic_name = TopicName::new(TOPIC); let subscription_name = SubscriptionName::new("test-subscription"); - let emulator = EmulatorClient::with_project(project_name).await?; + let emulator = Emulator::new().project(project_name).await?; let client_builder = ClientBuilder::new( ClientBuilderConfig::new().auth_flow(AuthFlow::NoAuth), @@ -357,7 +357,7 @@ async fn retry_message_translate() -> Result<(), BoxError> { let project_name = "roundtrip-test-project"; let topic_name = TopicName::new(TOPIC); - let emulator = EmulatorClient::with_project(project_name).await?; + let emulator = Emulator::new().project(project_name).await?; let client_builder = ClientBuilder::new( ClientBuilderConfig::new().auth_flow(AuthFlow::NoAuth), From 5296c8e68daf48b60edb7a2c191b53e620b8a36d Mon Sep 17 00:00:00 2001 From: Renar Narubin Date: Fri, 1 Dec 2023 11:19:44 -0800 Subject: [PATCH 2/4] fix lint --- src/backends/googlepubsub/publisher.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backends/googlepubsub/publisher.rs b/src/backends/googlepubsub/publisher.rs index bc029d2..4493ffc 100644 --- a/src/backends/googlepubsub/publisher.rs +++ b/src/backends/googlepubsub/publisher.rs @@ -431,7 +431,7 @@ where client.client.publish_topic_sink( TopicName::new(topic.as_ref()) .into_project_topic_name(client.project()), - this.publish_config.clone(), + *this.publish_config, ), retry_policy.clone(), Shared::clone(response_sink), From 5088a63e5f99f845d646cf985e213b01265d8b58 Mon Sep 17 00:00:00 2001 From: Renar Narubin Date: Fri, 1 Dec 2023 12:09:09 -0800 Subject: [PATCH 3/4] bump msrv to 1.64 --- .github/workflows/hedwig.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/hedwig.yml b/.github/workflows/hedwig.yml index 9abaa76..0d5a674 100644 --- a/.github/workflows/hedwig.yml +++ b/.github/workflows/hedwig.yml @@ -55,7 +55,7 @@ jobs: strategy: fail-fast: false matrix: - rust_toolchain: [nightly, stable, 1.60.0] + rust_toolchain: [nightly, stable, 1.64.0] os: [ubuntu-latest] timeout-minutes: 20 steps: From 15f8a64287f571115ef7ae34b8e0bcdeadd3ec13 Mon Sep 17 00:00:00 2001 From: Renar Narubin Date: Fri, 1 Dec 2023 12:17:37 -0800 Subject: [PATCH 4/4] make msrv 1.64.0 work --- Cargo.lock | 32 +++++++------------------------- 1 file changed, 7 insertions(+), 25 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 364a97d..df22fcd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -269,16 +269,6 @@ version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ea221b5284a47e40033bf9b66f35f984ec0ea2931eb03505246cd27a963f981b" -[[package]] -name = "deranged" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f32d04922c60427da6f9fef14d042d9edddef64cb9d4ce0d64d0685fbeb1fd3" -dependencies = [ - "powerfmt", - "serde", -] - [[package]] name = "derive_more" version = "0.99.16" @@ -938,12 +928,6 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" -[[package]] -name = "powerfmt" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" - [[package]] name = "ppv-lite86" version = "0.2.9" @@ -1582,14 +1566,12 @@ dependencies = [ [[package]] name = "time" -version = "0.3.30" +version = "0.3.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4a34ab300f2dee6e562c10a046fc05e358b29f9bf92277f30c3c8d82275f6f5" +checksum = "cd0cbfecb4d19b5ea75bb31ad904eb5b9fa13f21079c3b92017ebdf4999a5890" dependencies = [ - "deranged", "libc", "num_threads", - "powerfmt", "serde", "time-core", "time-macros", @@ -1597,15 +1579,15 @@ dependencies = [ [[package]] name = "time-core" -version = "0.1.2" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" +checksum = "2e153e1f1acaef8acc537e68b44906d2db6436e2b35ac2c6b42640fff91f00fd" [[package]] name = "time-macros" -version = "0.2.15" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ad70d68dba9e1f8aceda7aa6711965dfec1cac869f311a51bd08b3a2ccbce20" +checksum = "fd80a657e71da814b8e5d60d3374fc6d35045062245d80224748ae522dd76f36" dependencies = [ "time-core", ] @@ -2074,7 +2056,7 @@ dependencies = [ "seahash", "serde", "serde_json", - "time 0.3.30", + "time 0.3.20", "tokio", "tower-service", "url",