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

Auto update workspace.members when running cargo init within a parent crate #6906

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

Comments

@softprops
Copy link

softprops commented May 4, 2019

Describe the problem you are trying to solve

It's cumbersome and error prone authoring a multi crate project when you run cargo init inside a multi crate project and need to manually wire up workspace.members in the parent crate's Cargo.toml. That's even if you know you're supposed to to this.

When you run cargo commands in the parent project without doing this you may be surprised when they aren't applied to the new child project.

Describe the solution you'd like

An ideal solution would be for cargo init to detect where its being run and auto update the list of workspace.members in the crate its being run within. This makes doing right thing transparent for users easy and transparent.

Notes

Until rustc becomes fast for larger code bases splitting up crates into smaller crates is really the best option we have. Cargo should make that option as easy and straightforward as it can be.

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

ehuss commented May 4, 2019

I think this is the same as #6378. (init and new use the same underlying code)

@softprops
Copy link
Author

Thanks. Def a dup. I'll subscribe to that instead.

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

2 participants