-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Add --name suggestion for cargo new #8675
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
I feel like suggesting |
How does something like "if you need the directory name to not match the project name consider the --name flag" sound? |
On Wed, Sep 09, 2020 at 03:04:17PM -0700, Jacob Finkelman wrote:
How does something like "if you need the directory name to not match the project name consider the --name flag" sound?
That sounds great.
|
@ehuss how does this seam to you? |
Just rephrase as "If you need a crate name to not match the directory name, consider using --name flag." So the whole message would be something like
I did not choose the suggestion approach mentioned in this comment because in real world the situation is more complex and may lead to suggest another invalid name. |
The most recent update looks good to me! |
Sounds like the team is on board! |
📌 Commit c6fcb0e has been approved by |
☀️ Test successful - checks-actions |
Update cargo 6 commits in 875e0123259b0b6299903fe4aea0a12ecde9324f..8777a6b1e8834899f51b7e09cc9b8d85b2417110 2020-09-08 20:17:21 +0000 to 2020-09-15 19:11:03 +0000 - updated yank error message (rust-lang/cargo#8697) - Fix non-determinism with new feature resolver. (rust-lang/cargo#8701) - Display formatted output for JSON diffing in tests. (rust-lang/cargo#8692) - Add --name suggestion for cargo new (rust-lang/cargo#8675) - Sweep unrelated message from unnecessary workspace infromation (rust-lang/cargo#8681) - Docs: Make it more clear we have two types of workspaces (rust-lang/cargo#8666)
Resolves #8613
Since
check_name
have already got a parameter to show name help, I reuse the logic and sync the behavior betweencargo init
andcargo new
. The divergence seems to be intentionally made in #7959:...Only print the --name suggestion for
cargo init
.Feel free to discuss.