]> git.proxmox.com Git - cargo.git/commitdiff
Auto merge of #7470 - alexcrichton:cyclic-error, r=Eh2406
authorbors <bors@rust-lang.org>
Tue, 8 Oct 2019 01:16:07 +0000 (01:16 +0000)
committerbors <bors@rust-lang.org>
Tue, 8 Oct 2019 01:16:07 +0000 (01:16 +0000)
Improve error message for cyclic dependencies

First reported in rust-lang/rust#65014 it looks like our error message
on cyclic dependencies may be confusing at times. It looks like this is
an issue because there are multiple paths through a graph for a
dependency, so using the generic `path_to_top` function isn't producing
the most useful path for this purpose.

We're already walking the graph though, so this commit adds an extra
parameter which collects the list of packages we've visited so far to
produce a hopefully always-accurate error message showing the chain of
dependencies end-to-end for what depends on what.


Trivial merge