Commit d99e46c
authored
chore: silence rust-analyzer's cyclic-deps log spam (#294)
Follow-up to f6e49c5. Opening the workspace floods the rust-analyzer
server log with "cyclic deps" warnings, one per dev-dependency cycle in
the crate graph.
They are all dev-dependency cycles, which Cargo allows. rust-analyzer
keeps one crate-graph node per package and does not separate dev-deps
from normal deps, so the standard "A dev-depends on B, B depends on A"
pattern always looks like a cycle to it. Nearly all of ours are upstream
reth's — reth-trie-db and reth-provider dev-depend on each other, and so
on. The two that touch our crates are reth-seismic-node's dev-dep on
itself, copied verbatim from reth-optimism-node, and
reth-seismic-primitives dev-depending on reth-seismic-test-utils for a
single test module. None of it is worth restructuring; upstream reth
configures nothing for these and lives with them.
So filter the log instead. RA_LOG is a tracing Targets filter, and
add_dep_inner is the only tracing::warn! in project_model::workspace, so
raising just that module to "error" drops these lines and keeps
everything else: the module's own tracing::error! calls still pass, and
every other module stays at "warn", rust-analyzer's own default.
Measured with the 1.95.0 rust-analyzer, running analysis-stats over
seismic-reth/crates/seismic/test-utils: 19 "cyclic deps" lines before, 0
after, and no other WARN or ERROR output in either run.
This does not address the separate task_pool.rs SendError panic on
server shutdown — that is a known upstream bug
(rust-lang/rust-analyzer#18055), unrelated to
logging config.1 parent f6e49c5 commit d99e46c
1 file changed
Lines changed: 17 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
93 | 110 | | |
94 | 111 | | |
0 commit comments