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

cargo new: automatically add to workspace #10670

Closed
theduke opened this issue May 15, 2022 · 4 comments
Closed

cargo new: automatically add to workspace #10670

theduke opened this issue May 15, 2022 · 4 comments
Labels
C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`

Comments

@theduke
Copy link

theduke commented May 15, 2022

Problem

When running cargo new in a workspace a warning is printed, but you have to manually add the new crate to the members = [] section.

Proposed Solution

Add a new --workspace / -w flag to cargo new that automatically adds the new crate with the correct path to members.

Print a hint about the flag when cargo new is run in a workspace.

This is admittedly a small quality of life feature, but I do it often enough that it becomes annoying.

@theduke theduke added the C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` label May 15, 2022
@ehuss
Copy link
Contributor

ehuss commented May 15, 2022

Thanks for the report. This is a known issue, closing as a duplicate of #8365.

@ehuss ehuss closed this as completed May 15, 2022
@theduke
Copy link
Author

theduke commented May 15, 2022

@ehuss these are two different requests.

The other issue is about creating an empty workspace.

This issue is about automatically modifying the members declaration in a workspace when running 'new' inside a workspace.

@ehuss
Copy link
Contributor

ehuss commented May 15, 2022

Sorry, I should have linked to #6378.

@felipetesc
Copy link

Any news about this proposal ? What's the current situation ? Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`
Projects
None yet
Development

No branches or pull requests

3 participants