kbknapp / cargo-outdated

A cargo subcommand for displaying when Rust dependencies are out of date
MIT License
1.17k stars 87 forks source link

Not working with sparse registry #347

Closed secana closed 1 year ago

secana commented 1 year ago

Since Rust 1.68 it is possible to use the new sparse registry protocol instead of the git based index from crates.io. See: https://blog.rust-lang.org/2023/03/09/Rust-1.68.0.html

Issue: If crates.io is set to use the sparse registry, cargo outdated fails with the following error message.

cargo outdated
error: failed to get `anyhow` as a dependency of package `common v0.1.0 (...)`

Caused by:
  failed to load source for dependency `anyhow`

Caused by:
  Unable to update registry `crates-io`

Caused by:
  usage of sparse registries requires `-Z sparse-registry`

Setting the -Z sparse-registry is not required anymore, so I would expect that outdated works with the new protocol.

If any more info is needed, I'm happy to help.