-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Closed
Labels
A-workspace-inheritanceArea: workspace inheritance RFC 2906Area: workspace inheritance RFC 2906C-bugCategory: bugCategory: bugS-triageStatus: This issue is waiting on initial triage.Status: This issue is waiting on initial triage.
Description
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
, notworkspace.package.badges
cargo new
will automatically add apackage.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
cargo_toml
doesn't acknowledge this- See their inheritable
workspace.package
fields: https://docs.rs/cargo_toml/0.19.2/cargo_toml/struct.Manifest.html - See their
badges
field: https://docs.rs/cargo_toml/0.19.2/cargo_toml/struct.Manifest.html
- See their inheritable
cargo_manifest
doesn't acknowledge this- See their inheritable
workspace.package
fields: https://docs.rs/cargo-manifest/0.13.0/cargo_manifest/struct.WorkspacePackage.html - See their
badges
field: https://docs.rs/cargo-manifest/0.13.0/cargo_manifest/struct.Manifest.html
- See their inheritable
Notes
Note: I'm in the middle of a big refactor: please don't touch this yet
Version
No response
Metadata
Metadata
Assignees
Labels
A-workspace-inheritanceArea: workspace inheritance RFC 2906Area: workspace inheritance RFC 2906C-bugCategory: bugCategory: bugS-triageStatus: This issue is waiting on initial triage.Status: This issue is waiting on initial triage.