Rustc panics when running on a workspace
I am not really sure what is causing this so I'm going to provide as much detail as I can. I'm using cargo-udeps in a workspace with ~15 crates on 1.44 nightly. The workspace contains 3 proc macro crates. All three of those proc macro crates fail to compile in cargo-udeps, but not with a regular cargo build, with this error:
error: internal compiler error: cannot lex `source_file` without source: /home/alex/.cargo/registry/src/github.com-1ecc6299db9ec823/quote-1.0.3/src/lib.rs
thread 'rustc' panicked at 'Box<Any>', src/librustc_errors/lib.rs:880:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports
note: rustc 1.44.0-nightly (f509b26a7 2020-03-18) running on x86_64-unknown-linux-gnu
note: compiler flags: -Z save-analysis -C prefer-dynamic -C debuginfo=2 -C incremental --crate-type proc-macro
note: some of the compiler flags provided by cargo are hidden
error: aborting due to previous error
So, it seems that perhaps the quote dependency inside of the proc macros in the workspace is triggering it?
Anyway, if I can provide any more detail, please let me know. This tool is great and I am torn by temporarily not being able to use it. :smile:
I can run cargo-udeps on git checkouts of the quote and failure crates just fine, where failure depends on a proc macro crate that uses quote. I'm not sure how to reproduce it. I remember running into it myself but can't remember on which project.
A minimal reproducible example, or just any example, would be of great help.
Sure thing. Our workspace is pretty hairy, I'll try to pare it down and put something together today.
Likely this isn't due to cargo-udeps but a bug in save analysis creation.
I've recently added a backend not based on save analysis but on binary dep depinfo.
@sezna could you install latest cargo-udeps master (cargo install --locked --git https://github.com/est31/cargo-udeps) and run cargo udeps --backend depinfo? Does that work? Also cc @lovesegfault as he reported problems with current cargo-udeps as well.
I'll try and repro my issue again; it had happened as I attempted to move my company to a new nightly, and then we encountered an ICE in the cargo-udeps step of our CI.
I will attempt a bump again in the coming weeks, if I find the issue I'll report back with more details :)
I'll close this, as the save-analysis backend is in the process of removal. If an ICE occurs again, please write or open a new issue. Thanks!