GitIndex
does not find latest versions (?)
#160
-
Says the latest version is 0.3.0 but there is actually also 0.4.0 and 0.5.0. What gives? https://crates.io/crates/hydroflow/0.5.0 vs[dependencies]
crates-index = { version = "2.5.0", features = [ "git" ] } use crates_index::GitIndex;
fn main() {
let index = GitIndex::new_cargo_default().unwrap();
let c = index.crate_("hydroflow").unwrap();
println!("{:#?}", c.versions().iter().map(|v| v.version()).collect::<Vec<_>>());
}
|
Beta Was this translation helpful? Give feedback.
Answered by
Byron
Jan 27, 2024
Replies: 2 comments 6 replies
-
Only goes up to |
Beta Was this translation helpful? Give feedback.
0 replies
-
You will want to call use crates_index::GitIndex;
fn main() {
let mut index = GitIndex::new_cargo_default().unwrap();
// ------------------------
index.update().unwrap();
// ------------------------
let c = index.crate_("gix-path").unwrap();
println!("{:#?}", c.versions().iter().map(|v| v.version()).collect::<Vec<_>>());
} |
Beta Was this translation helpful? Give feedback.
6 replies
Answer selected by
Byron
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You will want to call
update()
to be sure it's the latest version of the Git index.