Skip to content

Allowing "-"/"_" renaming on crates.io and treat them the same in Cargo.toml dependencies #728

Closed as not planned
@rustonaut

Description

@rustonaut

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:

  1. cargo+crates.io treat "-" and "_" as the same character in all places, including the dependencies field
  2. if 1. is implemented renaming "-" to "_" can be added

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 with extern crate.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-publishC-enhancement ✨Category: Adding new behavior or a change to the way an existing feature works

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions