regexident / cargo-modules

Visualize/analyze a Rust crate's internal structure

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Install cargo-modules fails

fhaefemeier opened this issue · comments

I tried to install cargo-moduleswith latest rust version 1.53 (rustc 1.53.0 (53cb7b09b 2021-06-17) using latest docker image rust:1.53 and nativ on MacOSX). The command cargo install cargo-modules print the error message

   Compiling synstructure v0.12.5
   Compiling env_logger v0.8.4
   Compiling ra_ap_vfs-notify v0.0.49
error[E0599]: no function or associated item named `new_immediate` found for trait object `dyn Watcher` in the current scope
  --> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/ra_ap_vfs-notify-0.0.49/src/lib.rs:83:69
   |
83 | ...                   let watcher = log_notify_error(Watcher::new_immediate(move |event| {
   |                                                               ^^^^^^^^^^^^^ function or associated item not found in `dyn Watcher`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0599`.
error: could not compile `ra_ap_vfs-notify`

same problem.

Thanks for the report on this, @fhaefemeier (and the +1, @paulhsu)!

It looks like this is a transitive breakage due to ra_ap_vfs-notify 0.0.49 depending on notify 5.0.0-pre.3, which cargo resolves to notify v5.0.0-pre.11. Somewhere between 5.0.0-pre.3 and 5.0.0-pre.11 Watcher::new_immediate seems to have been removed.

Unfortunately another unrelated breaking change to rust-analyzer currently prevents us from updating rust-analyzer's library crates from 0.0.49 to the latest 0.0.66. So we will have to wait for this to be fixed first before we can make progress.

This should be fixed with v0.5.1.

cargo install cargo-modules --version "0.5.1"

Hat-tip to @diaevd for the fix!