Skip to content

Commit

Permalink
Fix MSRV checks
Browse files Browse the repository at this point in the history
  • Loading branch information
bikeshedder committed Feb 3, 2025
1 parent ad1c0e1 commit 86b57c8
Show file tree
Hide file tree
Showing 16 changed files with 61 additions and 63 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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' }
Expand All @@ -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

Expand Down
12 changes: 6 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion diesel/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"] }
2 changes: 1 addition & 1 deletion examples/diesel/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ publish = false
[dependencies]
deadpool-diesel = { path = "../../diesel", features = ["postgres"] }
dotenvy = "0.15"
thiserror = "1.0"
thiserror = "2"
10 changes: 5 additions & 5 deletions examples/postgres-actix-web/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ authors = ["Michael P. Jung <[email protected]>"]
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"] }
20 changes: 10 additions & 10 deletions examples/postgres-axum/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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"
8 changes: 4 additions & 4 deletions examples/postgres-benchmark/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ authors = ["Michael P. Jung <[email protected]>"]
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" }
3 changes: 1 addition & 2 deletions examples/redis-actix-web/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,5 @@ authors = ["Tomas Hromada <[email protected]>"]
publish = false

[dependencies]
actix-web = "4.0.0-beta.8"
actix-web = "4"
deadpool-redis = { path = "../../redis" }
redis = { version = "0.25", features = ["tokio-comp"] }
12 changes: 3 additions & 9 deletions lapin/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
2 changes: 1 addition & 1 deletion memcached/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
14 changes: 7 additions & 7 deletions postgres/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"] }
2 changes: 1 addition & 1 deletion r2d2/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
12 changes: 6 additions & 6 deletions redis/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"] }
8 changes: 6 additions & 2 deletions runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
6 changes: 3 additions & 3 deletions sqlite/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"] }
4 changes: 2 additions & 2 deletions sync/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"] }

0 comments on commit 86b57c8

Please sign in to comment.