Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

candidate versions found which didn't match: 0.2.17, 0.2.16, 0.2.15, ... #150

Closed
SkyperTHC opened this issue Mar 8, 2023 · 5 comments
Closed

Comments

@SkyperTHC
Copy link

I'm not a rust person and but thought i might not be the only person who sees this:

Cargo.toml

bstr = "1"

cargo build

error: failed to select a version for the requirement `bstr = "=1.3.0"`
candidate versions found which didn't match: 0.2.17, 0.2.16, 0.2.15, ...
location searched: crates.io index
@BurntSushi
Copy link
Owner

Can you please provide a full reproduction? Also, what version of Rust are you using?

@LPGhatguy
Copy link

I hit this on a project today using Rust 1.58.1. Here is the GitHub Actions output from the MSRV build from that project: https://github.com/rojo-rbx/rojo/actions/runs/4774441218/jobs/8488120958

Upgrading to Rust 1.68.2 fixed the issue. It looks like Cargo filters out versions that require a newer version of Rust than what you're running. This UX seems bad, but nothing that needs to be fixed about bstr.

@BurntSushi
Copy link
Owner

@epage Sorry to ping you again, but this is another Cargo issue I'm not sure about. I believe I've run into this myself, where basically, a dependency has rust-version set and Cargo will just refuse to even see that crate if your version of Rust is too old. That in turn leads to really opaque errors that basically say "no version available."

I thought the main point of rust-version was to get an explicit error saying that the current version of Rust is too old? But it looks like Cargo is actually using it in version resolution somehow?

@epage
Copy link

epage commented Apr 23, 2023

No, its that the index entry is not understood by old versions of cargo. See rust-lang/cargo#10623

@BurntSushi
Copy link
Owner

Ah wow, didn't realize that. Thank you!

@BurntSushi BurntSushi closed this as not planned Won't fix, can't repro, duplicate, stale May 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants