Crates.io: Allow changing the case of a crate's name with a republish

Created on 3 Jul 2018  ·  5Comments  ·  Source: rust-lang/crates.io

For the purposes of deciding whether a name is the same crate or a different crate, we consider names to be for the same crate no matter what case is used. Similarly, the URL to a crate is case-insensitive. I've just filed a feature request with Cargo to make index lookups case-insensitive.

If that Cargo feature is implemented, the only remaining reason to care about the crate casing is for aesthetics of display on crates.io. We should continue to display the case as published, but if someone changes their mind about how their crate name should be capitalized, we should allow them to change it by changing it in the crate's Cargo.toml and republishing (similarly to, say, the documentation URL currently-- that the last publish changes the crate's info in the database).

Currently, crates.io thinks you're trying to publish a new crate and tells you the name has already been taken if you change the case, even if you're the owner of the crate.

A-publish C-feature-request

Most helpful comment

Is it possible for anyone to look into this?
Boa is stuck being Boa instead of boa

All 5 comments

Is it possible for anyone to look into this?
Boa is stuck being Boa instead of boa

I started implementing a solution to this, but encountered a complication with the download functionality. If this is still something crates.io would like to support, I'd love some comments on whether the solution over at #3034 is something that would be okay.

Personally I'd love this to be supported. I ended up making the same mistake last night when publishing Metamorfish - which I could have (grudgingly) lived with, if not for protofish and automafish being published with lower case names already. Of course the irony here is that since automafish referred to metamorfish in the README.md, I wanted to squat that name before someone else got to it. ;_;

So instead of working on publishing a proper version of metamorfish, I ended up trying to solve this issue.. :)

I'm closing this based on https://github.com/rust-lang/crates.io/pull/3034#issuecomment-733311308. We can always reopen this issue if there is a crates.io specific approach with fewer sharp edges, but it looks like this probably requires an RFC across crates.io, cargo, and the language to resolve.

@jtgeibel can we at least put some effort into warning users new crate casings are permanent and that cargo is case sensitive? I feel like its very easy to fall into this trap without any way back.

Most crates are lowercase, if someone publishes a crate with uppercase letters there should some “are you sure” style notice. To be honest i wasn’t even aware uppercase in a name was unconventional until it was too late.

@jasonwilliams it was buried in that other thread, and I should link directly from this thread too. Hopefully my proposal in rust-lang/cargo#8883 will help prevent users from publishing under the wrong name.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lilianmoraru picture lilianmoraru  ·  8Comments

kejadlen picture kejadlen  ·  4Comments

carols10cents picture carols10cents  ·  7Comments

pczarn picture pczarn  ·  7Comments

carols10cents picture carols10cents  ·  9Comments