Skip to content

Running 'cargo new' with 'workspace.package.name' set creates an invalid manifest #13258

Open
@TheNeikos

Description

@TheNeikos

Problem

I have a workspace that has workspace.package.name set. I am aware that it is not a supported key.

When creating a new crate with cargo new it will set package.name.workspace = true. This is not supported, and will then fail to build the crate.

Steps

  1. Workspace with workspace.package.name set to a string
  2. cargo new
  3. Observe it fail to build

Possible Solution(s)

Special case 'name' to not be inherited, even if it is set in the workspace?

Notes

No response

Version

cargo 1.75.0 (1d8b05cdd 2023-11-20)
release: 1.75.0
commit-hash: 1d8b05cdd1287c64467306cf3ca2c8ac60c11eb0
commit-date: 2023-11-20
host: x86_64-unknown-linux-gnu
libgit2: 1.7.1 (sys:0.18.1 vendored)
libcurl: 8.4.0-DEV (sys:0.4.68+curl-8.4.0 vendored ssl:OpenSSL/1.1.1u)
ssl: OpenSSL 1.1.1u  30 May 2023
os: NixOS 24.5.0 [64-bit]

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-workspace-inheritanceArea: workspace inheritance RFC 2906C-bugCategory: bugCommand-newS-needs-designStatus: Needs someone to work further on the design for the feature or fix. NOT YET accepted.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions