rust-lang / crates.io

The Rust package registry
https://crates.io
Apache License 2.0
3.01k stars 603 forks source link

Yanking a crate should update its max_version #76

Closed alexcrichton closed 7 years ago

alexcrichton commented 10 years ago

If a crate has its max version yanked, it should update the max_version field to go back to the otherwise maximum version.

huonw commented 9 years ago

Suggestions for how this would handle yanking every version of a crate (e.g. publish a crate for the first time accidentally and then yank it, leaving no valid version at all)?

alexcrichton commented 9 years ago

That's a good question! I think that the returned value would just be null in that case as we just won't have a maximum version available.

emk commented 9 years ago

Right now, this bug makes it look like the Rust url crate is completely gone, leaving a big hole in the ecosystem. Apparently, this is not the case, but I was badly confused by it the other day.

SimonSapin commented 9 years ago

I just published url 0.4.0 to avoid confusion until this is fixed. It’s identical to 0.2.38, which is not compatible with 0.3.0 which was yanked. When the change from 0.3.0 lands again it’ll be 0.5.0. Version numbers are cheap.

kamalmarhubi commented 8 years ago

Surprising this issue has been around so long. Poor crates.io!

carols10cents commented 7 years ago

Poor crates.io indeed! Let's get this issue on the mentored list :)

Here's how I see the fix for this going:

And also tests, we should have tests for each of these cases. This is sounding like a medium.

retep998 commented 7 years ago

And don't forget to update all the existing cases where max_version is currently yanked.

yodaldevoid commented 7 years ago

Has anyone started work on this? If not, I would like to volunteer.

yodaldevoid commented 7 years ago

One situation that has not been covered is if the version being yanked is the last unyanked version. Should the max version be set to zero, the current version, or the max yanked version?

retep998 commented 7 years ago

@yodaldevoid Is this earlier comment not sufficient?

yodaldevoid commented 7 years ago

@retep998 Ah, thank you for reminding me of that. Guess I should take a short break if I am missing a comment in a set of 11 comments.

carols10cents commented 7 years ago

We decided to remove the max_version column instead, in #592.