Skip to content

Add resolver version to cargo metadata #9145

@sunshowers

Description

@sunshowers

Describe the problem you are trying to solve
At the moment it appears that the resolver version isn't exposed in cargo metadata. It would be great to have that information so that tools know which version of the resolver is in use.

Tested by adding

cargo-features = ["resolver"]

[workspace]
resolver = "2"

to a workspace's Cargo.toml and then running cargo +nightly metadata | less, then searching for the string resolver in it.

Describe the solution you'd like
A top-level field in the cargo metadata JSON that has the resolver version in it.

Notes
Tested with cargo 1.51.0-nightly (c3abcfe8a 2021-01-25), which appears to be the current nightly (I might be wrong though!)

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-features2Area: issues specifically related to the v2 feature resolverC-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Command-metadataS-triageStatus: This issue is waiting on initial triage.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions