Skip to content

Package spec in build plan and metadata? #7267

Closed
@Hoverbear

Description

@Hoverbear

Describe the problem you are trying to solve

I'd like to selectively prebuild some or all of the dependencies of my crate.

I can do this with cargo build --package log which is super awesome.

If I have two version of log, I need to specify which one with a package spec. Cargo gives me the ability to do cargo metadata and cargo build --build-plan, it also gives me the option to get an ID with cargo pkgid (https://doc.rust-lang.org/cargo/reference/pkgid-spec.html)

Unfortunately, I can't make them play together. metadata and --build-plan don't provide package specs, so I end up forced to do manual parsing if I want to hope to make all these tools interact.

Describe the solution you'd like

Include a package spec in the output of cargo metadata and/or cargo build --build-plan

Notes
Related to #2644 since that was essentially what I was trying to do.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Command-metadata

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions