mirror of
https://github.com/rust-lang/cargo
synced 2024-10-31 07:46:57 +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> |
||
---|---|---|
.. | ||
add_members_to_workspace_format_previous_items | ||
add_members_to_workspace_format_sorted | ||
add_members_to_workspace_with_absolute_package_path | ||
add_members_to_workspace_with_empty_members | ||
add_members_to_workspace_with_exclude_list | ||
add_members_to_workspace_with_members_glob | ||
help | ||
inherit_workspace_lints | ||
inherit_workspace_package_table | ||
inherit_workspace_package_table.in | ||
inherit_workspace_package_table_with_edition | ||
inherit_workspace_package_table_with_registry | ||
inherit_workspace_package_table_without_version | ||
not_inherit_workspace_package_table_if_not_members | ||
mod.rs |