Skip to content

Commit 1a78557

Browse files
authored
Fixing MSRV-breaking dependencies (#1284)
Some dependencies started to require MSRV above our current MSRV. The build dependency `built` transitively depends on some crates from the ICU4X project that recently started to depend on Rust 1.81, such as `litemap`. The dependency on ICU4X is completely unnecessary, and we removed it from our dependency tree by forcing the use of a particular version of `idna_adapter`. See: https://docs.rs/crate/idna_adapter/1.2.0 The dev dependency `criterion` depends on `ciborium` which depends on the `half` crate. Since v2.5.0, `half` started to depend on Rust 1.81. `ciborium` needs to be fixed because its MSRV is 1.58 and shouldn't depend on a crate that requires Rust 1.81. We lock the version of the `half` to 2.4.1. This kind of problem should be properly addressed with the new MSRV-aware dependency resolver introduced in Rust 1.84. See: https://doc.rust-lang.org/cargo/reference/resolver.html#rust-version
1 parent 8dded8f commit 1a78557

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

Cargo.toml

+15
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,24 @@ paste = "1.0.8"
5757
rand = "0.9.0"
5858
rand_chacha = "0.9.0"
5959
criterion = "0.5"
60+
# Note: `half` v2.5.0 started to require Rust 1.81.
61+
# `criterion` transitively depends on `half` via the dependency chain:
62+
# criterion -> ciborium -> ciborium_ll -> half
63+
# The MSRV of `ciborium` v0.2.2 is declared as 1.58, and is declared to depend on `half` v2.2.
64+
# Ciborium should either bump its MSRV or select a version of `half` that satisfies its current MSRV.
65+
# We lock the version of `half` to 2.4.1 to workaround this.
66+
# TODO: When we bump MSRV to 1.84 or above, we can rely on Cargo's MSRV-aware dependency resolver and remove such workarounds.
67+
half = "=2.4.1"
6068

6169
[build-dependencies]
6270
built = { version = "0.7.7", features = ["git2"] }
71+
# Note: Some components in ICU4X started to require Rust 1.81 since some versions, such as `litemap` v0.7.5.
72+
# The `built` crate depends on ICU4X via the dependency chain:
73+
# built -> git2 -> url -> idna -> idna_adapter --(default)--------> crates from the ICU4X projects
74+
# --(alternatively)--> `unicode-rs`
75+
# But we don't need ICU4X (or even `url`) because we only use `git2` to get the Git commit hash.
76+
# We move away from ICU4X completely following the instruction in https://docs.rs/crate/idna_adapter/1.2.0
77+
idna_adapter = "=1.1.0"
6378

6479
[[bench]]
6580
name = "main"

0 commit comments

Comments
 (0)