Closed beroy closed 1 month ago
Even after clearing the cache I can't reproduce this issue. It downloaded the crate and all worked just fine.
cargo update -p flate2
Updating crates.io index
Locking 1 package to latest compatible version
Updating flate2 v1.0.33 -> v1.0.34
note: pass `--verbose` to see 127 unchanged dependencies behind latest
gitoxide ( merge) +2 -2 [$!⇕⇡1⇣1] took 3s
❯ cargo check
Downloaded flate2 v1.0.34
Downloaded 1 crate (109.2 KB) in 0.34s
Checking flate2 v1.0.34
Compiling gitoxide v0.38.0 (/Users/byron/dev/github.com/Byron/gitoxide)
Let's close this until this reproduces cleanly. Meantime, maybe it's an issue with crates.io if it's serving incorrect crates? Their issues are here.
I and a few other team members get this (on my M1):
$cargo update -p flate2
Updating crates.io index
Locking 0 packages to latest compatible versions
note: pass `--verbose` to see 83 unchanged dependencies behind latest
$ cargo check
Downloaded flate2 v1.0.34
error: failed to verify the checksum of `flate2 v1.0.34````
It could be that some edge-cache has a broken disk and distributes faulty files. It's not the first time this happens, I think. My recommendation is to create an issue there and they fix it.
What is the checksum for flate2
in your Cargo.lock
file?
Does it match the output of sha256sum ${HOME}/.cargo/registry/cache/index.crates.io-*/flate2-1.0.34.crate
or shasum -a 256 ${HOME}/.cargo/registry/cache/index.crates.io-*/flate2-1.0.34.crate
?
It could be that your local index is corrupt. Try running cargo cache --remove-dir registry-index
and check if the problem is still present.
It's started to show up very recently on MacOS. I tried clearing the cache and cleaning the build as well but none fixes the issue.
This is how to reproduce the issue (this doesn't happen in Linux)