Skip to content

fix: Don't warn on cyclic dependencies in the crate graph#21806

Open
Wilfred wants to merge 1 commit intorust-lang:masterfrom
Wilfred:dont_warn_on_cyclic_deps
Open

fix: Don't warn on cyclic dependencies in the crate graph#21806
Wilfred wants to merge 1 commit intorust-lang:masterfrom
Wilfred:dont_warn_on_cyclic_deps

Conversation

@Wilfred
Copy link
Contributor

@Wilfred Wilfred commented Mar 12, 2026

This is legal when there are dev-dependencies, and rust-analyzer itself even does this. This causes spurious warnings in several cases, such as generating SCIP for rust-analyzer:

$ cargo run --bin rust-analyzer --release -- scip .
2026-03-12T18:40:33.824092Z  WARN cyclic deps: cfg(Idx::<CrateBuilder>(21)) -> cfg(Idx::<CrateBuilder>(21)), alternative path: cfg(Idx::<CrateBuilder>(21))

In this case, the cfg crate enables its tt feature by depending on itself in dev-dependencies.

Instead, lower the log level to info.

This is legal when there are dev-dependencies, and rust-analyzer
itself even does this. This causes spurious warnings in several cases,
such as generating SCIP for rust-analyzer:

```
$ cargo run --bin rust-analyzer --release -- scip .
2026-03-12T18:40:33.824092Z  WARN cyclic deps: cfg(Idx::<CrateBuilder>(21)) -> cfg(Idx::<CrateBuilder>(21)), alternative path: cfg(Idx::<CrateBuilder>(21))
```

In this case, the `cfg` crate enables its `tt` feature by depending
on itself in dev-dependencies.

Instead, lower the log level to info.
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants