Closed as not planned
Closed as not planned
Description
Problem
If I delete my Cargo.lock and run cargo generate-lockfile
, it picks clap_builder v4.5.2 which requires rustc 1.74 or newer. However, I am on 1.71 (and cannot upgrade yet due to toolchain reasons).
I have tried specifying rust-version = "1.71"
in my Cargo.toml, however, that doesn't seem to have worked (I expect it would.)
It seems like cargo should only pick dependency versions that will actually compile on my version of rustc or should obey my rust-version
Steps
No response
Possible Solution(s)
If we don't want to auto-restrict to my version of rustc (or my rust-version
in my cargo.toml), I think we could add an opt-in flag to restrict dependencies to a certain rustc version
Notes
No response
Version
cargo 1.71.0-nightly (cfd3bbd8f 2023-06-08)
release: 1.71.0-nightly
commit-hash: cfd3bbd8fe4fd92074dfad04b7eb9a923646839f
commit-date: 2023-06-08
host: x86_64-unknown-linux-gnu
libgit2: 1.6.4 (sys:0.17.1 vendored)
libcurl: 8.0.1-DEV (sys:0.4.61+curl-8.0.1 vendored ssl:OpenSSL/1.1.1t)
ssl: OpenSSL 1.1.1t 7 Feb 2023
os: Debian 12 (bookworm) [64-bit]