Skip to content
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

Allow changing the case of a crate's name with a republish #1451

Closed
carols10cents opened this issue Jul 3, 2018 · 5 comments
Closed

Allow changing the case of a crate's name with a republish #1451

carols10cents opened this issue Jul 3, 2018 · 5 comments
Labels
A-publish C-enhancement ✨ Category: Adding new behavior or a change to the way an existing feature works

Comments

@carols10cents
Copy link
Member

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.

@jasonwilliams
Copy link
Member

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

@Rantanen
Copy link

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.. :)

@jtgeibel
Copy link
Member

I'm closing this based on #3034 (comment). 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.

@jasonwilliams
Copy link
Member

jasonwilliams commented Nov 25, 2020

@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.

@jtgeibel
Copy link
Member

@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.

@Turbo87 Turbo87 added C-enhancement ✨ Category: Adding new behavior or a change to the way an existing feature works and removed C-feature-request labels Feb 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-publish C-enhancement ✨ Category: Adding new behavior or a change to the way an existing feature works
Projects
None yet
Development

No branches or pull requests

5 participants