Skip to content

Print a note when cargo new is editing workspace.members #13403

Closed
@weihanglo

Description

@weihanglo

Problem

Starting from #12779, cargo new automatically adds the new package to workspace.members when invoked inside from a directory of a workspace. This is a great feature, however sometimes a bit less noticeable.

Proposed Solution

Print a notice when a workspace is found and cargo new are editing workspace.members of it. For example,

      Creating binary (application) `foo` package
+ note: adding `foo` as a workspace member of workspace `bar` at `/home/projects/bar`
  note: see more `Cargo.toml` keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Notes

version

cargo 1.77.0-beta.1 (7bb7b5395 2024-01-20)
release: 1.77.0-beta.1
commit-hash: 7bb7b539558dc88bea44cee4168b6269bf8177b0
commit-date: 2024-01-20

Metadata

Metadata

Assignees

Labels

A-diagnosticsArea: Error and warning messages generated by Cargo itself.A-workspacesArea: workspacesC-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Command-newE-easyExperience: EasyS-acceptedStatus: Issue or feature is accepted, and has a team member available to help mentor or review

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions