Skip to content

Update yanked after crates are already built #614

@sunjay

Description

@sunjay

There was a very similar bug in crates.io two years ago and now it seems to have popped up on docs.rs too: rust-lang/crates.io#1144

All the details are in that bug (just replace crates.io/crates with docs.rs), but I'll describe it here as well.

Reproduction Steps

To reproduce the bug, go to https://docs.rs/turtle

Expected: This should redirect to the latest version: https://docs.rs/turtle/1.0.0-rc.3
Actual: You are taken to an old version: https://docs.rs/turtle/0.1.3

More Details

This doesn't happen for crates that already have a non-alpha/non-rc latest version (e.g. https://docs.rs/serde)

This was working until recently. Something must have changed in the last few weeks to cause this bug.

Interestingly, the "Go to latest version" link still appears and works as expected. It's just the version resolution for the URL that isn't working as expected anymore.


Update: Looking into it further, it seems to be an intentional change made as part of #223. So I guess the real bug is that yanked versions aren't being considered when we filter for the versions available. For example, for the turtle crate used in the steps above, all the non-alpha/non-rc versions are yanked. So docs.rs should choose the latest alpha/rc version instead of loading docs for a yanked version.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions