Closed
Description
Problem
embedded-hal-nb v1.0.0-alpha.2
was released yesterday, however trying to use it as a dependency fails, as if it wasn't there.
Steps
[dirbaio@mars ~]$ cargo new repro
cd Created binary (application) `repro` package
[dirbaio@mars ~]$ cd repro/
[dirbaio@mars repro]$ echo 'embedded-hal-nb = "=1.0.0-alpha.2"' >> Cargo.toml
[dirbaio@mars repro]$ cargo build
Updating crates.io index
error: failed to select a version for the requirement `embedded-hal-nb = "=1.0.0-alpha.2"`
candidate versions found which didn't match: 0.0.0
location searched: crates.io index
required by package `repro v0.1.0 (/home/dirbaio/repro)`
perhaps a crate was updated and forgotten to be re-vendored?
Possible Solution(s)
Looking with CARGO_LOG=trace
, it seems it's downloading this https://index.crates.io/em/be/embedded-hal-nb, and indeed v1.0.0-alpha.2
is missing.
It seems to be an issue of the new sparse protocol only. Forcing using the old one works: CARGO_REGISTRIES_CRATES_IO_PROTOCOL=git cargo build
Notes
No response
Version
[dirbaio@mars repro]$ cargo version --verbose
cargo 1.70.0-nightly (0e474cfd7 2023-03-31)
release: 1.70.0-nightly
commit-hash: 0e474cfd7b16b018cf46e95da3f6a5b2f1f6a9e7
commit-date: 2023-03-31
host: x86_64-unknown-linux-gnu
libgit2: 1.5.0 (sys:0.16.0 vendored)
libcurl: 8.0.1-DEV (sys:0.4.61+curl-8.0.1 vendored ssl:OpenSSL/1.1.1q)
os: Arch Linux Rolling Release [64-bit]