Skip to content

Undocumented, inconsisten inheritance of [badges] #13643

@epage

Description

@epage

Problem

Despite the [workspace.package] not mentioning it, you can specify workspace.package.badges to inherit badges (note its not package.badges

Problems

  • This feature is undocumented
  • We should be inheriting from workspace.badges, not workspace.package.badges
  • cargo new will automatically add a package.badges.workspace = true

Steps

Create the following workspace:

[workspace]
members = ["child"]
resolver = "2"

[workspace.package.badges]
maintenance = { status = "actively-maintained" }

Run:

$ cargo new child
$ cat child/Cargo.toml  # see `package.badges.workspace = true`
$ cargo package -p child
$ cat target/package/child-0.1.0/Cargo.toml  # see `badges` table

Possible Solution(s)

Maybe we break this as no one likely knows this exists?

For example, even looking at packages that try to implement Cargo.toml support

Notes

Note: I'm in the middle of a big refactor: please don't touch this yet

Version

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-workspace-inheritanceArea: workspace inheritance RFC 2906C-bugCategory: bugS-triageStatus: This issue is waiting on initial triage.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions