Skip to content

Commit

Permalink
cargo: put restrictions on tokio version
Browse files Browse the repository at this point in the history
We decided to bump minimum required version of tokio to 1.34.

Currently, the newest tokio version is 1.38, but some of the integration
tests are eaten when testing with this specific verstion of tokio.
Which is why, as of now, we decided not to support this version.

The issue with version 1.38 is related
to #[tokio::test] and #[ntest::timeout] attributes.
Refs:
- tokio-rs/tokio#6610
- becheran/ntest#28
- tokio-rs/tokio#6497
  • Loading branch information
muzarski committed Jun 12, 2024
1 parent 82c4492 commit 9c11871
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 10 deletions.
17 changes: 13 additions & 4 deletions examples/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,22 @@ futures = "0.3.6"
openssl = "0.10.32"
rustyline = "9"
rustyline-derive = "0.6"
scylla = {path = "../scylla", features = ["ssl", "cloud", "chrono", "time", "num-bigint-03", "num-bigint-04", "bigdecimal-04"]}
tokio = {version = "1.1.0", features = ["full"]}
tracing = { version = "0.1.25" , features = ["log"] }
scylla = { path = "../scylla", features = [
"ssl",
"cloud",
"chrono",
"time",
"num-bigint-03",
"num-bigint-04",
"bigdecimal-04",
] }
# See: https://github.com/tokio-rs/tokio/issues/6610
tokio = { version = ">=1.34, <1.38", features = ["full"] }
tracing = { version = "0.1.25", features = ["log"] }
tracing-subscriber = { version = "0.3.14", features = ["env-filter"] }
chrono = { version = "0.4", default-features = false }
time = { version = "0.3.22" }
uuid = { version = "1.0", features = ["v1"]}
uuid = { version = "1.0", features = ["v1"] }
tower = "0.4"
stats_alloc = "0.1"
clap = { version = "3.2.4", features = ["derive"] }
Expand Down
3 changes: 2 additions & 1 deletion scylla-cql/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ license = "MIT OR Apache-2.0"
scylla-macros = { version = "0.5.0", path = "../scylla-macros" }
byteorder = "1.3.4"
bytes = "1.0.1"
tokio = { version = "1.12", features = ["io-util", "time"] }
# FIXME: Remove <1.38 once https://github.com/tokio-rs/tokio/issues/6610 is fixed
tokio = { version = ">=1.34, <1.38", features = ["io-util", "time"] }
secrecy = { version = "0.7.0", optional = true }
snap = "1.0"
uuid = "1.0"
Expand Down
6 changes: 4 additions & 2 deletions scylla-proxy/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ scylla-cql = { version = "0.2.0", path = "../scylla-cql" }
byteorder = "1.3.4"
bytes = "1.2.0"
futures = "0.3.6"
tokio = { version = "1.12", features = [
# FIXME: Remove <1.38 once https://github.com/tokio-rs/tokio/issues/6610 is fixed
tokio = { version = ">=1.34, <1.38", features = [
"net",
"time",
"io-util",
Expand All @@ -38,7 +39,8 @@ rand = "0.8.5"
assert_matches = "1.5.0"
ntest = "0.9.0"
tracing-subscriber = { version = "0.3.14", features = ["env-filter"] }
tokio = { version = "1.12", features = ["signal"] }
# FIXME: Remove <1.38 once https://github.com/tokio-rs/tokio/issues/6610 is fixed
tokio = { version = ">=1.34, <1.38", features = ["signal"] }

[lints.rust]
unreachable_pub = "warn"
8 changes: 5 additions & 3 deletions scylla/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ bytes = "1.0.1"
futures = "0.3.6"
hashbrown = "0.14"
histogram = "0.6.9"
tokio = { version = "1.34", features = [
# FIXME: Remove <1.38 once https://github.com/tokio-rs/tokio/issues/6610 is fixed
tokio = { version = ">=1.34, <1.38", features = [
"net",
"time",
"io-util",
Expand Down Expand Up @@ -83,8 +84,9 @@ num-bigint-04 = { package = "num-bigint", version = "0.4" }
bigdecimal-04 = { package = "bigdecimal", version = "0.4" }
scylla-proxy = { version = "0.0.3", path = "../scylla-proxy" }
ntest = "0.9.0"
criterion = "0.4" # Note: v0.5 needs at least rust 1.70.0
tokio = { version = "1.27", features = ["test-util"] }
criterion = "0.4" # Note: v0.5 needs at least rust 1.70.0
# FIXME: Remove <1.38 once https://github.com/tokio-rs/tokio/issues/6610 is fixed
tokio = { version = ">=1.34, <1.38", features = ["test-util"] }
tracing-subscriber = { version = "0.3.14", features = ["env-filter"] }
assert_matches = "1.5.0"
rand_chacha = "0.3.1"
Expand Down

0 comments on commit 9c11871

Please sign in to comment.