Closed eikeon closed 5 years ago
linking the docs here for my own reference - https://doc.rust-lang.org/cargo/reference/manifest.html#virtual-manifest
Breaking this was unintentional. I'll look into this. My initial guess is this is a limitation of read-manifest
not supporting virtual manifests.
Looks like cargo metadata --no-deps
might work in place of cargo cargo read-manifest
see: https://github.com/rust-lang/cargo/issues/2356
In my virtual manifest use case it's returning the expected metadata by the looks of it.
Thanks for the early bread crumbs
@eikeon that turned out to be a terrific tip!
I just tested the following on both a crate with a top level src, I'm learning is now referred to as a "package" as well as a project with workspace members which has multiple "packages" and a virtual manifest and it works in both cases.
cargo metadata --no-deps --format-version=1 \
| jq -r '.packages[] | .targets[] | select(.kind[] | contains("bin")) | .name'
I'll try to roll this out into a new release at the latest but the end of the weekend
Awesome; and thank you for lambda-rust!
The List executables with cargo change ea26ecc950f619be424ddd3df4f9a368086f4c68 does now work with a virtual manifest where the previous method did. Now getting:
Perhaps there's a way to continue to support the virtual manifest case? I've yet to dig in to look for one.