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

Do not rename packages on cargo new. #5013

Merged
merged 2 commits into from
Feb 6, 2018

Commits on Feb 5, 2018

  1. 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.
    boats committed Feb 5, 2018
    Configuration menu
    Copy the full SHA
    3e7c75a View commit details
    Browse the repository at this point in the history
  2. Remove tests related to stripping names.

    boats committed Feb 5, 2018
    Configuration menu
    Copy the full SHA
    e101b92 View commit details
    Browse the repository at this point in the history