-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Closed
Labels
C-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Command-newE-mediumExperience: MediumExperience: MediumS-acceptedStatus: Issue or feature is accepted, and has a team member available to help mentor or reviewStatus: Issue or feature is accepted, and has a team member available to help mentor or review
Description
Problem
When I create a new workspace, cargo new
populates some fields but leaves me to fill in the rest. If I run it within a workspace with workspace.package
fields set, I most likely intend to inherit those in this new crate as well.
Proposed Solution
When cargo new
is run, search up for a possible workspace. If one is found, check which workspace.package
fields are set and then in the new package, set those fields to <field>.workspace = true
.
Notes
See #10859
I don't think this is blocked on #6378 because cargo new
in a workspace that uses globs in members
will automatically pick up the new crate and doesn't need #6378 to take advantage of this.
weihanglo, Googleton, Rudxain and stefnotch
Metadata
Metadata
Assignees
Labels
C-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Command-newE-mediumExperience: MediumExperience: MediumS-acceptedStatus: Issue or feature is accepted, and has a team member available to help mentor or reviewStatus: Issue or feature is accepted, and has a team member available to help mentor or review