-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Include registry names in cargo metadata output #9052
Copy link
Copy link
Open
Labels
A-registriesArea: registriesArea: registriesC-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-metadataS-needs-team-inputStatus: Needs input from team on whether/how to proceed.Status: Needs input from team on whether/how to proceed.
Metadata
Metadata
Assignees
Labels
A-registriesArea: registriesArea: registriesC-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-metadataS-needs-team-inputStatus: Needs input from team on whether/how to proceed.Status: Needs input from team on whether/how to proceed.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Describe the problem you are trying to solve
For some automated tooling built on top of guppy, I'd like to be able to reconstruct
Cargo.tomldependency lines fromcargo metadataoutput. This is possible to do forcrates.io, path and Git dependencies, but doesn't appear to be possible to do for non-default registries.Specifically, the bit that's missing is the name of the registry. The output format has a
"registry"field in the dependencies section, but that contains the URL and not the name. The URL cannot be specified inCargo.toml's registry field -- it must be a name.Describe the solution you'd like
There's a few ways to do this, but I think the cleanest way would be to add a new top-level section to
cargo metadataoutput, sayregistries, which has: