Skip to content

Commit

Permalink
Switch to using -Z direct-minimal-versions
Browse files Browse the repository at this point in the history
So far we have relied on the unstable -Z minimal-versions switch to the
cargo update command in order to downgrade all dependencies to their
minimum supported versions to ensure that our own documented minimum
supported Rust version is kosher.
As it turns out this option can cause cargo update to take excessive
amounts of time and it's also unlikely to stabilize ever [0].
With this change we switch over to using -Z direct-minimal-versions
instead. This option only downgrades the direct dependencies of the
crate, which is a much less complex operation. As a cherry, doing so
allows us to get rid of the fake unused dependencies that we introduced
just for the sake of fixing upstream bugs.

[0] rust-lang/cargo#12514
  • Loading branch information
d-e-s-o committed Oct 11, 2023
1 parent 232a891 commit 0f86b60
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,20 +35,15 @@ trace = []
log = []

[dependencies]
proc-macro2 = {version = "1.0", default-features = false}
proc-macro2 = {version = "1.0.32", default-features = false}
quote = {version = "1.0", default-features = false}
syn = {version = "1.0", default-features = false, features = ["full", "parsing", "printing", "proc-macro"]}
syn = {version = "1.0.91", default-features = false, features = ["full", "parsing", "printing", "proc-macro"]}

[dev-dependencies]
env_logger = {version = "0.9", default-features = false}
logging = {version = "0.4", package = "log"}
logging = {version = "0.4.8", package = "log"}
test-case = {version = "3.1"}
tokio = {version = "1.0", default-features = false, features = ["rt-multi-thread", "macros"]}
tracing = {version = "0.1"}
tracing = {version = "0.1.20"}
tracing-futures = {version = "0.2", default-features = false, features = ["std-future"]}
tracing-subscriber = {version = "0.3", default-features = false, features = ["env-filter", "fmt"]}

# A set of unused dependencies that we require to force correct minimum
# versions of transitive dependencies, for cases where our dependencies
# have incorrect dependency specifications themselves.
_lazy_static_unused = { package = "lazy_static", version = "1.0.2" }

0 comments on commit 0f86b60

Please sign in to comment.