Skip to content

Resolver errors should include version requirements #6201

Closed
@Eh2406

Description

@Eh2406

Currently if the resolver fails the error messages give lots of information on the paths that caused the problems, like:

cargo/tests/testsuite/build.rs

Lines 1356 to 1358 in 0b530c3

previously selected package `bad v1.0.0`
... which is depended on by `bar v0.1.0`
... which is depended on by `incompatible_dependencies v0.0.1 ([..])`

It would be nice to have the vershone requirements like: (wording needs improvement)

  previously selected package `bad v1.0.0`
    ... which is depended on by `bar v0.1.0` which requires `bad: "=1.0.0"`
    ... which is depended on by `incompatible_dependencies v0.0.1 ([..])` which requires `bar: "0.1.0"`

The data is easily available thanks to #5428 we just need to get it into the correct place, and find good wording. We almost had this working in #5402 before it bitroted.

I am willing to mentor someone on getting this done. It may be a good place to start looking at the resolver without having to stare into the void at its core. If it would be useful I can rebase #5452 so that only the wording is left.

cc @necaris would you be interested?

Metadata

Metadata

Assignees

Labels

A-dependency-resolutionArea: dependency resolution and the resolverA-diagnosticsArea: Error and warning messages generated by Cargo itself.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions