Skip to content

"Multiple dependencies listed for the same crate must all have the same name" error doesn't print the name of the crate #6601

Closed
@stanislav-tkach

Description

@stanislav-tkach

Problem

"Multiple dependencies listed for the same crate must all have the same name" error message contains the name of the problematic crate, but it doesn't print the name of the crate where this problem occurs. In workspaces with multiple packages it isn't so obvious where the problem is.

The problem can easily occur when giving different names in dependencies and dev-dependencies sections.

Steps

  1. Create a new empty project.
  2. Add a duplicated dependency, for example:
[dependencies]
r = { package = "rand", version = "0.6" }
ra = { package = "rand", version = "0.6" }
  1. Try to build it.

Notes

Output of cargo version: cargo 1.32.0 (8610973 2019-01-02)

Metadata

Metadata

Assignees

Labels

A-diagnosticsArea: Error and warning messages generated by Cargo itself.C-bugCategory: bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions