mirror of
https://github.com/rust-lang/cargo
synced 2024-10-31 08:59:36 +00:00
1a8bfdf0cf
When a user runs `cargo new` or `cargo init` within a workspace, Cargo will automatically add the new package to the members list in the workspace if necessary. The heuristic to add the new package is as follows: - If there is no `members` list in the workspace yet, a new `members` list is created. - If there is an `exclude` statement, Cargo checks if the new package should be excluded. If it doesn't match the `exclude` list, the package is added to the `members` list. - If there is a glob expression in the `members` list that matches the new package, the package is not added to the `members` list. - If the existent `members` list is sorted, Cargo tries to preserve the ordering when it adds the new package. This change doesn't try to format the resulting `members` list in any way, leaving the formatting decissions to the user. Signed-off-by: David Calavera <david.calavera@gmail.com> |
||
---|---|---|
.. | ||
mod.rs |