From 86b57c898ef088898972d5755384ac870f150ba3 Mon Sep 17 00:00:00 2001 From: "Michael P. Jung" Date: Mon, 3 Feb 2025 21:28:12 +0100 Subject: [PATCH] Fix MSRV checks --- .github/workflows/ci.yml | 7 ++++--- Cargo.toml | 12 ++++++------ diesel/Cargo.toml | 2 +- examples/diesel/Cargo.toml | 2 +- examples/postgres-actix-web/Cargo.toml | 10 +++++----- examples/postgres-axum/Cargo.toml | 20 ++++++++++---------- examples/postgres-benchmark/Cargo.toml | 8 ++++---- examples/redis-actix-web/Cargo.toml | 3 +-- lapin/Cargo.toml | 12 +++--------- memcached/Cargo.toml | 2 +- postgres/Cargo.toml | 14 +++++++------- r2d2/Cargo.toml | 2 +- redis/Cargo.toml | 12 ++++++------ runtime/Cargo.toml | 8 ++++++-- sqlite/Cargo.toml | 6 +++--- sync/Cargo.toml | 4 ++-- 16 files changed, 61 insertions(+), 63 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 94f73f1..815fced 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,7 +32,9 @@ jobs: - deadpool-redis - deadpool-sqlite # Examples + - example-diesel - example-postgres-actix-web + - example-postgres-axum - example-postgres-benchmark - example-redis-actix-web runs-on: ubuntu-latest @@ -157,8 +159,7 @@ jobs: - { crate: deadpool-runtime, msrv: '1.75.0' } - { crate: deadpool-sync, msrv: '1.75.0' } - { crate: deadpool, msrv: '1.75.0' } - # Disable Diesel MSRV check as it keeps failing for no obvious reason. - #- { crate: deadpool-diesel, msrv: '1.78.0' } + - { crate: deadpool-diesel, msrv: '1.78.0' } - { crate: deadpool-lapin, msrv: '1.75.0' } - { crate: deadpool-postgres, msrv: '1.75.0' } - { crate: deadpool-redis, msrv: '1.75.0' } @@ -176,7 +177,7 @@ jobs: toolchain: ${{ matrix.msrv }} override: true - - run: cargo +nightly update -Z minimal-versions + - run: cargo +nightly update -Z direct-minimal-versions - run: cargo check -p ${{ matrix.crate }} --all-features diff --git a/Cargo.toml b/Cargo.toml index 951fbfd..afcd808 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -24,20 +24,20 @@ rt_async-std_1 = ["deadpool-runtime/async-std_1"] [dependencies] num_cpus = "1.11.1" # `serde` feature -serde = { version = "1.0.103", features = ["derive"], optional = true } +serde = { version = "1.0.145", features = ["derive"], optional = true } # `rt_async-std_1` feature deadpool-runtime = { version = "0.1", path = "./runtime" } # The dependency of tokio::sync is non-optional. Deadpool depends on # `tokio::sync::Semaphore`. No other features of `tokio` are enabled or used # unless the `rt_tokio_1` feature is enabled. -tokio = { version = "1.0", features = ["sync"] } +tokio = { version = "1.27", features = ["sync"] } [dev-dependencies] -async-std = { version = "1.0", features = ["attributes"] } -config = { version = "0.14", features = ["json"] } +async-std = { version = "1.13", features = ["attributes"] } +config = { version = "0.15", features = ["json"] } criterion = { version = "0.5", features = ["html_reports", "async_tokio"] } -itertools = "0.13" -tokio = { version = "1.5.0", features = [ +itertools = "0.14" +tokio = { version = "1.27", features = [ "macros", "rt", "rt-multi-thread", diff --git a/diesel/Cargo.toml b/diesel/Cargo.toml index 3932e69..6795831 100644 --- a/diesel/Cargo.toml +++ b/diesel/Cargo.toml @@ -33,4 +33,4 @@ diesel = { version = "2.2.3", default-features = false } [dev-dependencies] diesel = { version = "2.2.3", default-features = false, features = ["sqlite"] } -tokio = { version = "1.0", features = ["macros", "rt", "rt-multi-thread"] } +tokio = { version = "1.27", features = ["macros", "rt", "rt-multi-thread"] } diff --git a/examples/diesel/Cargo.toml b/examples/diesel/Cargo.toml index e176fdf..e0995ca 100644 --- a/examples/diesel/Cargo.toml +++ b/examples/diesel/Cargo.toml @@ -9,4 +9,4 @@ publish = false [dependencies] deadpool-diesel = { path = "../../diesel", features = ["postgres"] } dotenvy = "0.15" -thiserror = "1.0" +thiserror = "2" diff --git a/examples/postgres-actix-web/Cargo.toml b/examples/postgres-actix-web/Cargo.toml index 869349b..966a17e 100644 --- a/examples/postgres-actix-web/Cargo.toml +++ b/examples/postgres-actix-web/Cargo.toml @@ -7,11 +7,11 @@ authors = ["Michael P. Jung "] publish = false [dependencies] -actix-web = "4.0.1" -config = "0.14" +actix-web = "4" +config = "0.15" deadpool-postgres = { path = "../../postgres", features = ["serde"] } dotenvy = "0.15" -serde = { version = "1.0", features = ["derive"] } -thiserror = "1.0" -tokio-postgres = { version = "0.7", features = ["with-uuid-1"] } +serde = { version = "1.0.145", features = ["derive"] } +thiserror = "2" +tokio-postgres = { version = "0.7.9", features = ["with-uuid-1"] } uuid = { version = "1", features = ["serde"] } diff --git a/examples/postgres-axum/Cargo.toml b/examples/postgres-axum/Cargo.toml index 3a0afb0..640fbdf 100644 --- a/examples/postgres-axum/Cargo.toml +++ b/examples/postgres-axum/Cargo.toml @@ -1,16 +1,16 @@ [package] -name = "postgres-axum" +name = "example-postgres-axum" version = "0.1.0" edition = "2021" [dependencies] -axum = { version = "0.7.5", features = ["json"] } -thiserror = "1.0.60" -tokio = { version = "1.37.0", features = ["macros", "rt-multi-thread"] } +axum = { version = "0.8.1", features = ["json"] } +thiserror = "2.0" +tokio = { version = "1.27", features = ["macros", "rt-multi-thread"] } deadpool-postgres = { path = "../../postgres", features = ["serde"] } -tokio-postgres = { version = "0.7.10", features = ["with-uuid-1"] } -dotenvy = "0.15.7" -uuid = { version = "1.8.0", features = ["serde"] } -serde = { version = "1.0.200", features = ["derive"] } -config = "0.14.0" -axum-macros = "0.4.1" +tokio-postgres = { version = "0.7.9", features = ["with-uuid-1"] } +dotenvy = "0.15" +uuid = { version = "1", features = ["serde"] } +serde = { version = "1.0.145", features = ["derive"] } +config = "0.15" +axum-macros = "0.5" diff --git a/examples/postgres-benchmark/Cargo.toml b/examples/postgres-benchmark/Cargo.toml index a6e0989..dbe3c58 100644 --- a/examples/postgres-benchmark/Cargo.toml +++ b/examples/postgres-benchmark/Cargo.toml @@ -7,9 +7,9 @@ authors = ["Michael P. Jung "] publish = false [dependencies] -config = "0.14" +config = "0.15" deadpool-postgres = { path = "../../postgres", features = ["serde"] } dotenvy = "0.15" -serde = { version = "1.0", features = ["derive"] } -tokio = { version = "1.0", features = ["macros", "rt-multi-thread"] } -tokio-postgres = { version = "0.7" } +serde = { version = "1.0.145", features = ["derive"] } +tokio = { version = "1.27", features = ["macros", "rt-multi-thread"] } +tokio-postgres = { version = "0.7.9" } diff --git a/examples/redis-actix-web/Cargo.toml b/examples/redis-actix-web/Cargo.toml index aed33e4..088bc4c 100644 --- a/examples/redis-actix-web/Cargo.toml +++ b/examples/redis-actix-web/Cargo.toml @@ -7,6 +7,5 @@ authors = ["Tomas Hromada "] publish = false [dependencies] -actix-web = "4.0.0-beta.8" +actix-web = "4" deadpool-redis = { path = "../../redis" } -redis = { version = "0.25", features = ["tokio-comp"] } diff --git a/lapin/Cargo.toml b/lapin/Cargo.toml index a575a6d..b27e393 100644 --- a/lapin/Cargo.toml +++ b/lapin/Cargo.toml @@ -26,21 +26,15 @@ deadpool = { path = "../", version = "0.12.0", default-features = false, feature "managed", ] } lapin = { version = "2.0", default-features = false } -serde = { package = "serde", version = "1.0.103", features = [ +serde = { package = "serde", version = "1.0.145", features = [ "derive", ], optional = true } tokio-executor-trait = { version = "2.1.0", optional = true } -# Not really used, added to survive `minimal-versions` check only. -# TODO: Remove once new `async-std` version above 1.12.0 is released, -# as it's already fixed in their `main` branch. This, of course, -# will require bumping minimal version of `async-std` across the workspace. -async-global-executor = { version = "2.3.1", optional = true, default-features = false } - [dev-dependencies] -config = { version = "0.14", features = ["json"] } +config = { version = "0.15", features = ["json"] } dotenvy = "0.15" -tokio = { version = "1.0", features = ["sync", "macros", "rt-multi-thread"] } +tokio = { version = "1.27", features = ["sync", "macros", "rt-multi-thread"] } [package.metadata.cargo-machete] ignored = ["async-global-executor"] diff --git a/memcached/Cargo.toml b/memcached/Cargo.toml index ff038a2..d8f5699 100644 --- a/memcached/Cargo.toml +++ b/memcached/Cargo.toml @@ -30,7 +30,7 @@ deadpool = { path = "../", version = "0.12.0", default-features = false, feature # broke the build by forgetting to add the "net" feature to the tokio # dependency. Once async-memcached is fixed this dependency can be removed # again. -tokio = { version = "1.0", default-features = false, features = ["net"] } +tokio = { version = "1.27", default-features = false, features = ["net"] } [package.metadata.cargo-machete] ignored = ["tokio"] diff --git a/postgres/Cargo.toml b/postgres/Cargo.toml index 0aa9e9a..8820841 100644 --- a/postgres/Cargo.toml +++ b/postgres/Cargo.toml @@ -24,22 +24,22 @@ async-trait = "0.1.80" deadpool = { path = "../", version = "0.12.0", default-features = false, features = [ "managed", ] } -serde = { package = "serde", version = "1.0", features = [ +serde = { package = "serde", version = "1.0.145", features = [ "derive", ], optional = true } -tokio = { version = "1.29", features = ["rt"] } +tokio = { version = "1.27", features = ["rt"] } tracing = "0.1.37" [target.'cfg(not(target_arch = "wasm32"))'.dependencies] tokio-postgres = "0.7.9" [target.'cfg(target_arch = "wasm32")'.dependencies] -getrandom = { version = "0.2", features = ["js"] } +getrandom = { version = "0.2.3", features = ["js"] } tokio-postgres = { version = "0.7.9", default-features = false } [dev-dependencies] -config = { version = "0.14", features = ["json"] } -dotenvy = "0.15.0" -futures = "0.3.1" +config = { version = "0.15", features = ["json"] } +dotenvy = "0.15" +futures = "0.3" futures-util = "0.3.30" -tokio = { version = "1.0", features = ["macros", "rt-multi-thread"] } +tokio = { version = "1.27", features = ["macros", "rt-multi-thread"] } diff --git a/r2d2/Cargo.toml b/r2d2/Cargo.toml index e87f12c..95ddac1 100644 --- a/r2d2/Cargo.toml +++ b/r2d2/Cargo.toml @@ -29,6 +29,6 @@ deadpool-sync = { path = "../sync", version = "0.1.1" } r2d2 = { version = "0.8.9", default-features = false } [dev-dependencies] -tokio = { version = "1.0", features = ["macros", "rt", "rt-multi-thread"] } +tokio = { version = "1.27", features = ["macros", "rt", "rt-multi-thread"] } deadpool = { path = "../", version = "0.12", features = ["rt_tokio_1"] } r2d2_postgres = "0.18" diff --git a/redis/Cargo.toml b/redis/Cargo.toml index 0c046bd..066de48 100644 --- a/redis/Cargo.toml +++ b/redis/Cargo.toml @@ -30,16 +30,16 @@ deadpool = { path = "../", version = "0.12.0", default-features = false, feature "managed", ] } redis = { version = "0.28", default-features = false, features = ["aio"] } -serde = { package = "serde", version = "1.0", features = [ +serde = { package = "serde", version = "1.0.145", features = [ "derive", ], optional = true } -tokio = { version = "1.0", default-features = false, optional = true } +tokio = { version = "1.27", default-features = false, optional = true } [dev-dependencies] -config = { version = "0.14", features = ["json"] } -dotenvy = "0.15.0" -futures = "0.3.15" +config = { version = "0.15", features = ["json"] } +dotenvy = "0.15" +futures = "0.3" redis = { version = "0.28", default-features = false, features = [ "tokio-comp", ] } -tokio = { version = "1.0", features = ["macros", "rt-multi-thread", "sync"] } +tokio = { version = "1.27", features = ["macros", "rt-multi-thread", "sync"] } diff --git a/runtime/Cargo.toml b/runtime/Cargo.toml index bd430ec..0ebe194 100644 --- a/runtime/Cargo.toml +++ b/runtime/Cargo.toml @@ -12,11 +12,15 @@ readme = "README.md" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html +[features] +async-std_1 = ["dep:async-std_1"] +tokio_1 = ["dep:tokio_1"] + [dependencies] -async-std_1 = { package = "async-std", version = "1.0", features = [ +async-std_1 = { package = "async-std", version = "1.13", features = [ "unstable", ], optional = true } -tokio_1 = { package = "tokio", version = "1.0", features = [ +tokio_1 = { package = "tokio", version = "1.27", features = [ "time", "rt", ], optional = true } diff --git a/sqlite/Cargo.toml b/sqlite/Cargo.toml index b37aba1..97ebd85 100644 --- a/sqlite/Cargo.toml +++ b/sqlite/Cargo.toml @@ -27,10 +27,10 @@ deadpool = { path = "../", version = "0.12.0", default-features = false, feature ] } deadpool-sync = { path = "../sync", version = "0.1.1" } rusqlite = "0.33.0" -serde = { package = "serde", version = "1.0", features = [ +serde = { package = "serde", version = "1.0.145", features = [ "derive", ], optional = true } [dev-dependencies] -config = { version = "0.14", features = ["json"] } -tokio = { version = "1.0", features = ["macros", "rt-multi-thread"] } +config = { version = "0.15", features = ["json"] } +tokio = { version = "1.27", features = ["macros", "rt-multi-thread"] } diff --git a/sync/Cargo.toml b/sync/Cargo.toml index f1d1cbf..b689d74 100644 --- a/sync/Cargo.toml +++ b/sync/Cargo.toml @@ -14,8 +14,8 @@ readme = "README.md" [dependencies] deadpool-runtime = { version = "0.1.2", path = "../runtime" } -tracing = { version = "0.1", optional = true } +tracing = { version = "0.1.37", optional = true } [dev-dependencies] deadpool = { version = "0.12", path = "..", features = ["rt_tokio_1"] } -tokio = { version = "1.38.0", features = ["macros", "rt-multi-thread"] } +tokio = { version = "1.27", features = ["macros", "rt-multi-thread"] }