-
Notifications
You must be signed in to change notification settings - Fork 212
Update yanked
after crates are already built
#614
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
Comments
If docs.rs doesn't currently deal with yanked crates, an easy workaround just for my particular case might be to delete the old non-1.0 versions of the turtle crate. I asked for that in #158 a few years ago, but I guess no one had a chance to get around to it. |
This is a very strange bug to see, because we explicitly filter out yanked versions in the |
Maybe these versions were published before that information started being stored? |
yanked
for crates built before it was tracked
This doesn't need to be fixed in code then I think, I can just write a one-off shell script. |
Ah so the problem is we never update the |
yanked
for crates built before it was trackedyanked
after crates are already built
@jyn514 any update on this issue? Is there a way to fix this? |
with #739 yanked is now automatically updated for new crates, and @jyn514 has just imported missing yanks up to now, so https://docs.rs/turtle now redirects to the latest prerelease. |
Thanks! This is awesome. Everything works really well now 😊 |
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
withdocs.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.
The text was updated successfully, but these errors were encountered: