Package spec in build plan and metadata? · Issue #7267 · rust-lang/cargo (original) (raw)
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.