serayuzgur / crates

crates is an extension aims to help people to manage their dependencies for rust (crates.io & TOML).
https://marketplace.visualstudio.com/items?itemName=serayuzgur.crates
MIT License
237 stars 35 forks source link

Wrong version reported when renaming crates #169

Open pentamassiv opened 1 year ago

pentamassiv commented 1 year ago

Describe the bug It is possible to use the package field to rename a crate. Here is an example:

[dependencies.cairo]
package = "cairo-sys-rs"
git = "https://github.com/gtk-rs/gtk-rs-core"
version = "0.16"

The crate's name is cairo-sys-rs and the current version is 0.15.1. However the extensions searches for the version of the crate "cairo" instead. In this case that crate exists and the extension reports the version to be 0.0.4 but that is the most recent version of the wrong crate.

To Reproduce Steps to reproduce the behavior:

  1. Add the above mentioned snippet to the Cargo.toml file
  2. Observe the version numbers
  3. Compare it with the correct version number on https://crates.io/crates/cairo-sys-rs

Expected behavior The displayed version should have been 0.15.1

Screenshots image

Desktop (please complete the following information):

kands-code commented 1 year ago

I also meet this prolem.

image

but

image