-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Cyclic dependency detected when running analysis-stats on future-rs #2414
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I think the reason of cycle dependencys is similar to rust-lang/cargo#4242 And see #1282 |
Yeah, the problem is that a crate can have a dev-dep onto itself: [package]
name = "foo"
version = "0.1.0"
edition = "2018"
[dev-dependencies]
foo = { path = "." } The solution here is to start "duplicating" crates when lowering |
I'm seeing something similar to this in Cargo, where cargo has a dev-dep on cargo-test-support while cargo-test-support depends on cargo.
|
We see this issue because our packages have [dev-dependencies] on each other. Does it break anything? |
This removes the not-really-cyclic dependency that confuses rust-analyzer. See also: rust-lang/rust-analyzer#2414
Closing in favor of #14167 |
I also had to change the logic for whether they get put into test mode or not: * Bin crates now only get put into test mode if they're a part of the current workspace, because otherwise dev dependencies don't work * this didn't actually change anything because bin crates outside the current workspace are already ignored but idk it's better to make it explicit? * The version of a lib crate with test mode enabled is now separate from the normal version of the lib crate, since it's allowed to depend on the normal version as a dev dependency. (as suggested in rust-lang#2414 (comment)) * The test-mode version of the lib crate is also only created if it's a part of the current workspace.
Uh oh!
There was an error while loading. Please reload this page.
When running
analysis-stats
(4d753fa) onfutures-rs
:The text was updated successfully, but these errors were encountered: