hlisdero / cargo-check-deadlock

Find deadlocks in Rust code with Petri net model checking
Apache License 2.0
26 stars 1 forks source link

can't find crate for `rustc_ast_pretty` on macOS #25

Closed gitmalong closed 10 months ago

gitmalong commented 1 year ago

cargo install cargo-check-deadlock

Updating crates.io index

Installing cargo-check-deadlock v1.0.4 Updating crates.io index Compiling libc v0.2.150 Compiling proc-macro2 v1.0.69 Compiling unicode-ident v1.0.12 Compiling cfg-if v1.0.0 Compiling utf8parse v0.2.1 Compiling colorchoice v1.0.0 Compiling memchr v2.6.4 Compiling ppv-lite86 v0.2.17 Compiling anstyle v1.0.4 Compiling anstyle-parse v0.2.2 Compiling rustix v0.38.23 Compiling anstyle-query v1.0.0 Compiling heck v0.4.1 Compiling bitflags v2.4.1 Compiling anstream v0.6.4 Compiling regex-syntax v0.8.2 Compiling clap_lex v0.6.0 Compiling aho-corasick v1.1.2 Compiling strsim v0.10.0 Compiling log v0.4.20 Compiling clap_builder v4.4.8 Compiling humantime v2.1.0 Compiling termcolor v1.4.0 Compiling regex-automata v0.4.3 Compiling xml-rs v0.8.19 Compiling quote v1.0.33 Compiling syn v2.0.39 Compiling getrandom v0.2.11 Compiling rand_core v0.6.4 Compiling errno v0.3.6 Compiling rand_chacha v0.3.1 Compiling rand v0.8.5 Compiling is-terminal v0.4.9 Compiling regex v1.10.2 Compiling env_logger v0.10.1 Compiling uuid-macro-internal v1.5.0 Compiling clap_derive v4.4.7 Compiling uuid v1.5.0 Compiling netcrab v1.0.0 Compiling clap v4.4.8 Compiling clap-verbosity-flag v2.1.0 Compiling cargo-check-deadlock v1.0.4 error[E0463]: can't find crate for rustc_ast_pretty --> /Users/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cargo-check-deadlock-1.0.4/src/lib.rs:20:1 | 20 | extern crate rustc_ast_pretty; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't find crate

hlisdero commented 11 months ago

Hi @gitmalong You should install additional rustup components for the installation to work since the crate uses the internal crates of rustc.

Try installing them using:

rustup component add rust-src rustc-dev llvm-tools-preview

Hope that helps! Cheers