cognitive-engineering-lab / argus

An IDE extension for debugging trait errors in Rust.
MIT License
97 stars 3 forks source link

Argus panics when analysing code in an example crate #48

Open wprzytula opened 1 week ago

wprzytula commented 1 week ago

Problem

Argus panicked when analysing code in an example crate.

Logs

OS: linux (6.11.5-100.fc39.x86_64) VSCode: 1.95.1 Error message

thread 'main' panicked at /home/wojciech/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rustc_plugin-0.10.0-nightly-2024-05-20/src/cli.rs:184:10:
internal error: entered unreachable code: unexpected cargo crate type: example
stack backtrace:
   0: rust_begin_unwind
             at /rustc/d84b9037541f45dc2c52a41d723265af211c0497/library/std/src/panicking.rs:652:5
   1: core::panicking::panic_fmt
             at /rustc/d84b9037541f45dc2c52a41d723265af211c0497/library/core/src/panicking.rs:72:14
   2: rustc_plugin::cli::only_run_on_file
   3: rustc_plugin::cli::cli_main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

Full log: https://paste.rs/vm3sL

wprzytula commented 1 week ago

Analogous to #43.

gavinleroy commented 1 week ago

Yes, currently Argus panics if the crate being analyzed is not the main application. This is a limitation of the underlying rustc_plugin crate, or at least our integration with it 😅

It's on my long list of todos :)