-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Closed
Labels
C-bugCategory: bugCategory: bugCommand-newS-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
In #12779, cargo adds new packages to [workspace.members] automatically. This is great when workspace.member
array alreay exists, but the format doesn't look good when workspace
array is missing.
Steps
cargo new foo
&& cd foocargo add bar --lib
And you'll get the resulting TOML
workspace = { members = ["bar"] }
[package]
name = "foo"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
Possible Solution(s)
Don't add the new package to workspace.members
if there is no existing workspace
in Cargo.toml.
Notes
No response
Version
cargo 1.77.0-nightly (1ae631085 2024-01-17)
release: 1.77.0-nightly
commit-hash: 1ae631085f01c1a72d05df1ec81f3759a8360042
commit-date: 2024-01-17
Metadata
Metadata
Assignees
Labels
C-bugCategory: bugCategory: bugCommand-newS-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