-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Provide a json output format of cargo package --list #11666
Copy link
Copy link
Closed
Labels
C-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Command-packageS-needs-designStatus: Needs someone to work further on the design for the feature or fix. NOT YET accepted.Status: Needs someone to work further on the design for the feature or fix. NOT YET accepted.
Metadata
Metadata
Assignees
Labels
C-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Command-packageS-needs-designStatus: Needs someone to work further on the design for the feature or fix. NOT YET accepted.Status: Needs someone to work further on the design for the feature or fix. NOT YET accepted.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Problem
Currently
cargo package --listoutputs filenames line by line, it works fine normally. But whenCargo.tomlcontains metadata that uses relative path to point to parent directory, there is no way to get that information. For examplereadme = "../README.md:cargo package --listoutputsinstead of
It makes sense because it's the filesystem layout in the
.cratefile, but for downstream tooling like maturin it doesn't know that theREADMD.mdis actually coming from../README.md, which causes PyO3/maturin#1431Proposed Solution
Add a json output format, for example
cargo package --list=jsonoutputs something like{ "README.md": "../README.md", "src/lib.rs": "src/lib.rs" }as proposed by @konstin in PyO3/maturin#1442 (comment)
Notes
No response