You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 web UI correctly shows the latest version, but other sites incorrectly use the versions[0] - first entry in the API response, which is still showing yanked alpha version. For example, popular shield.io site uses versions[0].license (see code) for detecting latest version.
I believe it would be better to sort versions array first by yanked status and then by version.
we are sorting them by publish date. whether yanking matters or not is up for the client to decide but it should not be based only on the default sorting.
Current Behavior
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 web UI correctly shows the latest version, but other sites incorrectly use the
versions[0]
- first entry in the API response, which is still showing yanked alpha version. For example, popularshield.io
site usesversions[0].license
(see code) for detecting latest version.I believe it would be better to sort versions array first by yanked status and then by version.
Relevant portion of the API response for https://crates.io/api/v1/crates/martin
Expected Behavior
Sort versions first by yanked (ASC), and then by semver (DESC)
Steps To Reproduce
No response
Environment
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: