Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not rename packages on
cargo new
.
Prior to this commit, packages beginning with `rust` or ending with `rs` were renamed automatically when created, unless they were binaries. The ostensible purpose of this code was to avoid people uploading "redundant" names to crates.io, which is a repository of Rust packages. This behavior was overly opinionated. It is not cargo's responsibility to discourage users from naming their packages any particular way. Without a sound technical reasons why packages cannot be named a certain way, cargo should not be intervening in users' package naming decisions. It also did this by automatically renaming the package for the user, as opposed to erroring. Though it printed a message about the behavior, it did not give the user a choice to abort the process; to overrule cargo they had to delete the new project and start again using the `--name` argument. `cargo new` is many users' first entrypoint to the Rust ecosystem. This behavior teaches a user that Rust is opinionated and magical, both of which are divisive attributes for a tool, and attributes which do not generally describe Rust's attitude toward things like names and formatting. If crates.io wishes to enforce that users not upload packages with names like this, it should be enforced by crates.io at publish time.
- Loading branch information