mirror of
https://github.com/rust-lang/cargo.git
synced 2025-09-25 11:14:46 +00:00

Add new packages to [workspace.members] automatically ### What does this PR try to resolve? If a new package is created in a workspace, this change adds the package's path to the workspace's members list automatically. It doesn't add the package to the list if the path is in the workspace's exclude list, or if the members list doesn't exist already. I noticed that a `cargo_new` test broke if I create the members list when it doesn't exist. This is because the workspace's manifest can be used for package templating. I think it's better to not break that use case. Fixes #6378 ### How should we test and review this PR? I've included tests in the `cargo_new` suite.