You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If Cargo.lock pins version 1.x.y of a dependency, and --locked or --frozen is passed, but 1.x.y is not available in the underlying registry, the error Cargo produces is fairly confusing. For example:
error: failed to select a version for the requirement `autocfg = "^1"`
candidate versions found which didn't match: 1.1.0
Nothing in the error mentions the lockfile or the use of --locked or --frozen.
Steps
$ cargo new --bin issue
$ cd issue
$ echo'autocfg = "<1.1.0"'>> Cargo.toml
$ cargo generate-lockfile
$ cp Cargo.lock Cargo.lock.orig
$ sed -i.bkp 's/<1.1.0/1/' Cargo.toml
$ mkdir -p .cargo
$ cargo vendor > .cargo/config
$ cp Cargo.lock.orig Cargo.lock
$ cargo check --frozen # also happens with --lockederror: failed to select a version for the requirement `autocfg = "^1"`candidate versions found which didn't match: 1.1.0location searched: directory source `/local/home/jongje/issue/vendor` (which is replacing registry `crates-io`)required by package `issue v0.1.0 (/local/home/jongje/issue)`perhaps a crate was updated and forgotten to be re-vendored?
Problem
If
Cargo.lock
pins version 1.x.y of a dependency, and--locked
or--frozen
is passed, but 1.x.y is not available in the underlying registry, the error Cargo produces is fairly confusing. For example:Nothing in the error mentions the lockfile or the use of
--locked
or--frozen
.Steps
Possible Solution(s)
No response
Notes
No response
Version
The text was updated successfully, but these errors were encountered: