-
Notifications
You must be signed in to change notification settings - Fork 612
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Allowing "-"/"_" renaming on crates.io and treat them the same in Cargo.toml dependencies #728
Comments
If we were to do something like this, it would almost certainly need an RFC as it affects cargo as well as crates.io |
I think I will open a discussion in the internals forum first ;=) |
Link to internals discussion: https://internals.rust-lang.org/t/maybe-pre-rfc-improving---in-cargo-crates-io/5251/11 |
I'm confused, if |
I was approaching this problem from the angle that I would like to rename a I agree that one Also by now the main reason why this features would be nice to have is general usability, especially for new people which might read |
Our motivation is the other way round: we have |
I seem to have run into a particularly unfortunate combination of edge cases here, with the end result that I have locked myself out of making the cargo plugin with the name I wanted. My unfortunate steps:
I completely understand the reasons why renaming crates is not allowed. However, it also seems like the particular predicament I'm in (100% by my own fault, to be clear) is undesirable. As one example, perhaps crates.io and/or cargo could warn about and/or reject crate names that simultaneously contain underscores and start with |
(replying here for lack of a better plan) Keep the (I'd also like to (re?) second just entirely removing everything which cares about Footnotes
|
Thanks. It's a reasonable workaround. I just don't think it's for me. In the end, I decided that the risk of confusion was too great, and just renamed and republished the crate as |
rust-lang/rfcs#3660 proposes a way for crate authors to delete their crates (and then be able to reregister them, potentially with underscores instead of hyphens or vice-versa). It seems unlikely at this point that crates.io and cargo will implement such a breaking change of allowing renames, since the whole ecosystem is expecting us to work a certain way and changing it could have various unintended side effects. If you would like the ability to rename your packages then I would recommend reviewing the RFC and supporting it to move it forward. |
I recently undusted a old crate of mine and published it to crates.io.
Through I made the mistake to forgot to rename "checked_command" to "checked-command"...
There is currently no good way to "fix" this as it is neither possible to publish it with the correct name ("-" instead of "_") nor can it be renamed. This makes sense to a certain degree, as renaming it would brake
dependencies.
I think it would be good if:
This can also be helpful for some old crates published when using "-" wasn't the way to go.
It would also make it slightly nicer for new users as they can place the same name
in the
[dependencies]
section they use withextern crate
.The text was updated successfully, but these errors were encountered: