Closed edwin0cheng closed 4 years ago
We recently added a check in CI to be sure rust-analyzer
doesn't panic when running analysis-stats
in the rust-analyzer
repository. I wonder if we should expand that check to cover the rustc
repository as well.
But rustc
is so big to fetch from github and there are some others project which are more challenging to analyze too. So I don't see why rustc
are so special for us to check explicitly.
However, I think it is a good idea to have external tools to check a bunch of projects analysis-stats. :)
yeah, I think we probably should not block on rustc, both becuase that would take ages, and because rustc is kind of an ultimately horrible code base, so it's OK if we break on it.
But adding a corpus of some other challenging crates might be good idea!
Updated: there is a new panic:
`DotDotPat` requires special handling and should not be mapped to a Pat.', crates\ra_hir_def\src\body\lower.rs:669:39
Submitted #3999 for details
I think these are fixed.
cc @flodiebold
Stack Traces
``` env RUST_BACKTRACE=full cargo run --release -p rust-analyzer -- analysis-stats D:\sandbox\rust-root\rust-src Finished release [optimized] target(s) in 0.51s Running `target\release\rust-analyzer.exe analysis-stats D:\sandbox\rust-root\rust-src` [ERROR ra_project_model] cyclic dependency cargo -> cargo-test-support [ERROR ra_project_model] cyclic dependency core -> rand [ERROR ra_project_model] cyclic dependency getrandom -> wasi Database loaded, 520 roots, 4.6309733s Crates in this dir: 163 Total modules found: 2544 Total declarations: 54460 Total functions: 41283 Item Collection: 65.5696109s, 0b allocated 0b resident 8894/41283 21% processing: box_region::newthread 'main' panicked at 'index out of bounds: the len is 1 but the index is 1', C:\Users\Edwin\.cargo\git\checkouts\chalk-7b02fa8caa2cec94\039fc90\chalk-ir\src\fold\subst.rs:56:19 stack backtrace: 0: backtrace::backtrace::trace_unsynchronized at C:\Users\VssAdministrator\.cargo\registry\src\github.com-1ecc6299db9ec823\backtrace-0.3.40\src\backtrace\mod.rs:66 1: std::sys_common::backtrace::_print_fmt at /rustc/b8cedc00407a4c56a3bda1ed605c6fc166655447\/src\libstd\sys_common\backtrace.rs:77 2: std::sys_common::backtrace::_print::{{impl}}::fmt at /rustc/b8cedc00407a4c56a3bda1ed605c6fc166655447\/src\libstd\sys_common\backtrace.rs:59 3: core::fmt::write at /rustc/b8cedc00407a4c56a3bda1ed605c6fc166655447\/src\libcore\fmt\mod.rs:1052 4: std::io::Write::write_fmt