"Could not find requested crate" even for a direct dependency
Minoru opened this issue · comments
$ cargo new reproducer
Created binary (application) `reproducer` package
$ cd reproducer
$ cargo add fastrand@1.8.0
Updating crates.io index
Adding fastrand v1.8.0 to dependencies.
$ cargo crev crate diff fastrand -- -ruN
Updating crates.io index
Could not find requested crate. Try `-u` if the crate is not a dependency.
The expected output is a diff between fastrand 1.7.0 and 1.8.0 (because 1.7.0 is the latest reviewed version at the moment).
I bisected this to commit 68656a3 which added -u
.
- Please let us know:
- Which version are you using: cargo-crev 0.23.2
- How did you install
crev
: viacargo install
- What OS/platform are you running on: Debian 11.4
Hmm... it works here with 0.23.1 ...
Interesting. A workaround is to:
cargo crev crate diff -u fastrand -- -ruN
but I'll need to look into why non-unrelated codepaths can't look it up.
It does show up in cargo crev verify
...
Yup, adding -u works.
I was hoping you'll spot the problem immediately, but since you can't even reproduce it, I'll find time this weekend to step through it with a debugger and see what's going on.
I think this should be already fixed. See a6f1f12
Sorry, it's GitHub acting up. I commented via email on 26th of July, but it took GitHub 1.5 months to display the comment ._.