-
Notifications
You must be signed in to change notification settings - Fork 13.8k
Closed
Description
Bumping few packages can result in dependency cycle.
Single command reproducer:
$ cargo update --aggressive -p cargo
Updating crates.io index
Updating git repository `https://github.com/rust-lang/cargo`
error: cyclic package dependency: package `compiler_builtins v0.1.19` depends on itself. Cycle:
package `compiler_builtins v0.1.19`
... which is depended on by `alloc v0.0.0 (/home/mateusz/Projects/rust/rust/src/liballoc)`
... which is depended on by `panic_unwind v0.0.0 (/home/mateusz/Projects/rust/rust/src/libpanic_unwind)`
... which is depended on by `std v0.0.0 (/home/mateusz/Projects/rust/rust/src/libstd)`
... which is depended on by `proc_macro v0.0.0 (/home/mateusz/Projects/rust/rust/src/libproc_macro)`
... which is depended on by `test v0.0.0 (/home/mateusz/Projects/rust/rust/src/libtest)`
Activity
alexcrichton commentedon Oct 2, 2019
Looks like Cargo is correct here but it's a bad error message. I'll work on the error message independently, but the real error is:
This happens because
cc
now has theparallel
feature enabled when updatinglibgit2-sys
. I'm gonna close this since I'm about to fix the error message in Cargo and otherwise I believe this is a legitimate error.alexcrichton commentedon Oct 2, 2019
Note that this is an instance of rust-lang/cargo#4866 where the host
cfg-if
shouldn't haverustc-dep-of-std
enabled, but it does.mati865 commentedon Oct 2, 2019
Oh it's nasty one. Thanks for the explanation, it's clear now.
Improve error message for cyclic dependencies
Auto merge of #7470 - alexcrichton:cyclic-error, r=Eh2406