-
Couldn't load subscription status.
- Fork 13.9k
Closed
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.D-crate-version-mismatchDiagnostics: Errors or lints caused be the use of two different crate versions.Diagnostics: Errors or lints caused be the use of two different crate versions.S-needs-reproStatus: This issue has no reproduction and needs a reproduction to make progress.Status: This issue has no reproduction and needs a reproduction to make progress.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
Consider three crates High, Mid and Low, where:
- Mid depends on Low;
- High depends on both Mid and Low.
This is a quite common case.
Now, it sometimes happens that the dependency of Mid is bumped to a more recent version of Low. If, however, the developer fails to bump the dependency of High to a more recent version of Low, surprising error messages arise.
In particular,
"error: the trait `Foo` is not implemented for the type `Bar`"
may arise, without any change to the code of either Foo or Bar.
It would be great if the compiler could detect the error and somehow print something along the liens of
"error: using conflicting versions of the trait `Foo` for type `Bar`. You are probably using two distinct versions of the same library."
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.D-crate-version-mismatchDiagnostics: Errors or lints caused be the use of two different crate versions.Diagnostics: Errors or lints caused be the use of two different crate versions.S-needs-reproStatus: This issue has no reproduction and needs a reproduction to make progress.Status: This issue has no reproduction and needs a reproduction to make progress.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.