-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Incorrect version shown for crates.io #9453
Comments
Badge tested using |
See also rust-lang/crates.io#6946 |
Seems reasonable to me to elide any and all yanked versions |
For download count and license, get the correct latest version from the versions array. Fix badges#9453
@calebcartwright I just submitted a PR to fix this and related issue (download count) -- I simply search for the needed version in the versions array using crates's own latest stable version. Makes things far simpler I think. |
For download count and license, get the correct latest version from the versions array. Fix badges#9453
For download count and license, get the correct latest version from the versions array. Fix badges#9453
For download count and license, get the correct latest version from the versions array. Fix badges#9453
For download count and license, get the correct latest version from the versions array. Fix badges#9453
For download count and license, get the correct latest version from the versions array. Fix badges#9453
For download count and license, get the correct latest version from the versions array. Fix badges#9453
For download count and license, get the correct latest version from the versions array. Fix badges#9453
Are you experiencing an issue with...
shields.io
🐞 Description
The martin crate, currently at v0.8.7, at one point published a v1.0.0-alpha version that was later yanked. The crates.io API returns versions in semver-DESC order, which means the yanked alpha version is accessed as the most recent one by this code (license access). As the result, instead of showing correct license info, it shows obsolete and non-refreshing data.
shields/services/crates/crates-license.service.js
Line 38 in 7d966ab
Relevant portion of the API response for https://crates.io/api/v1/crates/martin
🔗 Link to the badge
https://img.shields.io/crates/l/martin.svg
💡 Possible Solution
I believe it would be better to pick the first non-yanked version from the array instead, plus probably parse the version value and ignore all the pre-released too.
The text was updated successfully, but these errors were encountered: