regexident / cargo-modules

Visualize/analyze a Rust crate's internal structure

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Installing cargo-modules 0.12.0 fails on 'ra_ap_hir_ty'

dainbrump opened this issue · comments

Running cargo install cargo-modules on Pop OS using Rust 1.72.1 fails to build. Output:

Updating crates.io index
  Downloaded cargo-modules v0.12.0
  Downloaded 1 crate (987.9 KB) in 0.87s
  Installing cargo-modules v0.12.0
    Updating crates.io index
  Downloaded clap_lex v0.6.0
  Downloaded nohash-hasher v0.2.0
  Downloaded perf-event v0.4.7
  Downloaded anstyle v1.0.4
  Downloaded dashmap v5.4.0
  Downloaded memmap2 v0.5.10
  Downloaded lock_api v0.4.11
  Downloaded dissimilar v1.0.7
  Downloaded notify v6.1.1
  Downloaded indoc v2.0.4
  Downloaded clap_builder v4.4.11
  Downloaded anstyle-parse v0.2.3
  Downloaded unicode-properties v0.1.0
  Downloaded always-assert v0.1.3
  Downloaded la-arena v0.3.1
  Downloaded itertools v0.12.0
  Downloaded anstream v0.6.5
  Downloaded rust-analyzer-salsa-macros v0.17.0-pre.4
  Downloaded cargo_metadata v0.18.1
  Downloaded object v0.32.1
  Downloaded rowan v0.15.15
  Downloaded ena v0.14.2
  Downloaded drop_bomb v0.1.5
  Downloaded dot v0.1.4
  Downloaded countme v3.0.1
  Downloaded chalk-recursive v0.95.0
  Downloaded anstyle-query v1.0.2
  Downloaded json v0.12.4
  Downloaded anyhow v1.0.75
  Downloaded text-size v1.1.1
  Downloaded pulldown-cmark v0.9.3
  Downloaded humantime v2.1.0
  Downloaded cov-mark v2.0.0-pre.1
  Downloaded pulldown-cmark-to-cmark v10.0.4
  Downloaded getopts v0.2.21
  Downloaded env_logger v0.10.1
  Downloaded fst v0.4.7
  Downloaded snap v1.1.1
  Downloaded smol_str v0.2.0
  Downloaded ra-ap-rustc_index v0.20.0
  Downloaded petgraph v0.6.4
  Downloaded scoped-tls v1.0.1
  Downloaded ra_ap_test_utils v0.0.188
  Downloaded ra-ap-rustc_index_macros v0.20.0
  Downloaded perf-event-open-sys v1.0.1
  Downloaded oorandom v11.1.3
  Downloaded jod-thread v0.1.2
  Downloaded clap v4.4.11
  Downloaded rayon-core v1.12.0
  Downloaded smallvec v1.11.2
  Downloaded is-terminal v0.4.9
  Downloaded ra_ap_base_db v0.0.188
  Downloaded chalk-solve v0.95.0
  Downloaded rayon v1.8.0
  Downloaded typed-arena v2.0.2
  Downloaded clap_derive v4.4.7
  Downloaded ra_ap_intern v0.0.188
  Downloaded ra-ap-rustc_lexer v0.20.0
  Downloaded ra-ap-rustc_abi v0.20.0
  Downloaded ra_ap_limit v0.0.188
  Downloaded chalk-ir v0.95.0
  Downloaded yansi v0.5.1
  Downloaded wyz v0.6.1
  Downloaded inotify v0.9.6
  Downloaded rust-analyzer-salsa v0.17.0-pre.4
  Downloaded ra_ap_tt v0.0.188
  Downloaded ra_ap_toolchain v0.0.188
  Downloaded ra_ap_ide_db v0.0.188
  Downloaded ra_ap_paths v0.0.188
  Downloaded line-index v0.1.0
  Downloaded ra_ap_load-cargo v0.0.188
  Downloaded ra_ap_rustc-dependencies v0.0.188
  Downloaded parking_lot_core v0.9.9
  Downloaded ra_ap_text_edit v0.0.188
  Downloaded ra_ap_stdx v0.0.188
  Downloaded synstructure v0.13.0
  Downloaded ra_ap_ide_diagnostics v0.0.188
  Downloaded ra_ap_proc_macro_api v0.0.188
  Downloaded triomphe v0.1.11
  Downloaded ra-ap-rustc_parse_format v0.20.0
  Downloaded chalk-derive v0.95.0
  Downloaded ra_ap_profile v0.0.188
  Downloaded ra_ap_hir_ty v0.0.188
  Downloaded ra_ap_hir v0.0.188
  Downloaded ra_ap_cfg v0.0.188
  Downloaded ra_ap_ide_ssr v0.0.188
  Downloaded ra_ap_hir_expand v0.0.188
  Downloaded ra_ap_vfs v0.0.188
  Downloaded ra_ap_project_model v0.0.188
  Downloaded ra_ap_parser v0.0.188
  Downloaded ra_ap_syntax v0.0.188
  Downloaded ra_ap_mbe v0.0.188
  Downloaded ra_ap_vfs-notify v0.0.188
  Downloaded ra_ap_ide_assists v0.0.188
  Downloaded ra_ap_ide_completion v0.0.188
  Downloaded ra_ap_hir_def v0.0.188
  Downloaded ra_ap_ide v0.0.188
  Downloaded 97 crates (6.6 MB) in 1.66s (largest was `fst` at 1.6 MB)
   Compiling proc-macro2 v1.0.70
   Compiling unicode-ident v1.0.12
   Compiling libc v0.2.151
   Compiling cfg-if v1.0.0
   Compiling autocfg v1.1.0
   Compiling once_cell v1.19.0
   Compiling crossbeam-utils v0.8.16
   Compiling log v0.4.20
   Compiling smallvec v1.11.2
   Compiling scopeguard v1.2.0
   Compiling rustc-hash v1.1.0
   Compiling unicode-xid v0.2.4
   Compiling parking_lot_core v0.9.9
   Compiling hashbrown v0.14.3
   Compiling pin-project-lite v0.2.13
   Compiling bitflags v1.3.2
   Compiling hashbrown v0.12.3
   Compiling equivalent v1.0.1
   Compiling always-assert v0.1.3
   Compiling jod-thread v0.1.2
   Compiling tracing-core v0.1.32
   Compiling either v1.9.0
   Compiling arrayvec v0.7.4
   Compiling text-size v1.1.1
   Compiling lock_api v0.4.11
   Compiling memoffset v0.9.0
   Compiling unicode-properties v0.1.0
   Compiling itertools v0.12.0
   Compiling smol_str v0.2.0
   Compiling ra-ap-rustc_lexer v0.20.0
   Compiling la-arena v0.3.1
   Compiling heck v0.4.1
   Compiling triomphe v0.1.11
   Compiling fst v0.4.7
   Compiling crossbeam-channel v0.5.8
   Compiling quote v1.0.33
   Compiling indexmap v2.1.0
   Compiling ra_ap_paths v0.0.188
   Compiling bitflags v2.4.1
   Compiling syn v2.0.40
   Compiling ra_ap_limit v0.0.188
   Compiling perf-event-open-sys v1.0.1
   Compiling ra_ap_stdx v0.0.188
   Compiling nohash-hasher v0.2.0
   Compiling drop_bomb v0.1.5
   Compiling memchr v2.6.4
   Compiling dashmap v5.4.0
   Compiling cov-mark v2.0.0-pre.1
   Compiling perf-event v0.4.7
   Compiling ra_ap_tt v0.0.188
   Compiling parking_lot v0.12.1
   Compiling oorandom v11.1.3
   Compiling countme v3.0.1
   Compiling dissimilar v1.0.7
   Compiling ra_ap_cfg v0.0.188
   Compiling crossbeam-epoch v0.9.15
   Compiling fixedbitset v0.4.2
   Compiling ra_ap_profile v0.0.188
   Compiling ra_ap_text_edit v0.0.188
   Compiling rowan v0.15.15
   Compiling ra_ap_vfs v0.0.188
   Compiling ra_ap_test_utils v0.0.188
   Compiling serde v1.0.193
   Compiling lazy_static v1.4.0
   Compiling petgraph v0.6.4
   Compiling ra_ap_intern v0.0.188
   Compiling ena v0.14.2
   Compiling rayon-core v1.12.0
   Compiling typed-arena v2.0.2
   Compiling crossbeam-deque v0.8.3
   Compiling scoped-tls v1.0.1
   Compiling serde_json v1.0.108
   Compiling line-index v0.1.0
   Compiling itoa v1.0.10
   Compiling ryu v1.0.16
   Compiling version_check v0.9.4
   Compiling tinyvec_macros v0.1.1
   Compiling tinyvec v1.6.0
   Compiling pulldown-cmark v0.9.3
   Compiling camino v1.1.6
   Compiling rayon v1.8.0
   Compiling unicase v2.7.0
   Compiling thiserror v1.0.50
   Compiling semver v1.0.20
   Compiling unicode-width v0.1.11
   Compiling getopts v0.2.21
   Compiling inotify-sys v0.1.5
   Compiling snap v1.1.1
   Compiling rustix v0.38.28
   Compiling unicode-bidi v0.3.14
   Compiling unicode-normalization v0.1.22
   Compiling synstructure v0.13.0
   Compiling anyhow v1.0.75
   Compiling percent-encoding v2.3.1
   Compiling same-file v1.0.6
   Compiling utf8parse v0.2.1
   Compiling home v0.5.5
   Compiling anstyle-parse v0.2.3
   Compiling walkdir v2.4.0
   Compiling ra_ap_toolchain v0.0.188
   Compiling idna v0.5.0
   Compiling form_urlencoded v1.2.1
   Compiling inotify v0.9.6
   Compiling aho-corasick v1.1.2
   Compiling filetime v0.2.23
   Compiling mio v0.8.10
   Compiling anstyle-query v1.0.2
   Compiling radium v0.7.0
   Compiling regex-syntax v0.8.2
   Compiling colorchoice v1.0.0
   Compiling tap v1.0.1
   Compiling anstyle v1.0.4
   Compiling linux-raw-sys v0.4.12
   Compiling url v2.5.0
   Compiling anstream v0.6.5
   Compiling notify v6.1.1
   Compiling pulldown-cmark-to-cmark v10.0.4
   Compiling object v0.32.1
   Compiling regex-automata v0.4.3
   Compiling memmap2 v0.5.10
   Compiling dot v0.1.4
   Compiling clap_lex v0.6.0
   Compiling strsim v0.10.0
   Compiling tracing-attributes v0.1.27
   Compiling ra-ap-rustc_index_macros v0.20.0
   Compiling rust-analyzer-salsa-macros v0.17.0-pre.4
   Compiling chalk-derive v0.95.0
   Compiling serde_derive v1.0.193
   Compiling ra-ap-rustc_index v0.20.0
   Compiling ra-ap-rustc_parse_format v0.20.0
   Compiling thiserror-impl v1.0.50
   Compiling chalk-ir v0.95.0
   Compiling rust-analyzer-salsa v0.17.0-pre.4
   Compiling tracing v0.1.40
   Compiling ra-ap-rustc_abi v0.20.0
   Compiling ra_ap_vfs-notify v0.0.188
   Compiling ra_ap_rustc-dependencies v0.0.188
   Compiling chalk-solve v0.95.0
   Compiling ra_ap_parser v0.0.188
   Compiling regex v1.10.2
   Compiling clap_derive v4.4.7
   Compiling clap_builder v4.4.11
   Compiling ra_ap_syntax v0.0.188
   Compiling is-terminal v0.4.9
   Compiling wyz v0.5.1
   Compiling funty v2.0.0
   Compiling humantime v2.1.0
   Compiling chalk-recursive v0.95.0
   Compiling termcolor v1.4.0
   Compiling wyz v0.6.1
   Compiling ra_ap_base_db v0.0.188
   Compiling ra_ap_mbe v0.0.188
   Compiling env_logger v0.10.1
   Compiling clap v4.4.11
   Compiling bitvec v1.0.1
   Compiling thread_local v1.1.7
   Compiling yansi v0.5.1
   Compiling ra_ap_hir_expand v0.0.188
   Compiling indoc v2.0.4
   Compiling json v0.12.4
   Compiling ra_ap_hir_def v0.0.188
   Compiling cargo-platform v0.1.5
   Compiling ra_ap_proc_macro_api v0.0.188
   Compiling cargo_metadata v0.18.1
   Compiling ra_ap_project_model v0.0.188
   Compiling ra_ap_hir_ty v0.0.188
error[E0308]: mismatched types
    --> $HOME/.local/share/cargo/registry/src/index.crates.io-6f17d22bba15001f/ra_ap_hir_ty-0.0.188/src/db.rs:28:1
     |
28   | #[salsa::query_group(HirDatabaseStorage)]
     | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `&[String]`, found `&Cycle`
...
38   |     #[salsa::cycle(crate::mir::mir_body_recover)]
     |                    ---------------------------- arguments to this function are incorrect
     |
     = note: expected reference `&[std::string::String]`
                found reference `&ra_ap_base_db::salsa::Cycle`
note: function defined here
    --> $HOME/.local/share/cargo/registry/src/index.crates.io-6f17d22bba15001f/ra_ap_hir_ty-0.0.188/src/mir/lower.rs:2111:8
     |
2111 | pub fn mir_body_recover(
     |        ^^^^^^^^^^^^^^^^
2112 |     _db: &dyn HirDatabase,
2113 |     _cycle: &[String],
     |     -----------------
     = note: this error originates in the attribute macro `salsa::query_group` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0308]: mismatched types
   --> $HOME/.local/share/cargo/registry/src/index.crates.io-6f17d22bba15001f/ra_ap_hir_ty-0.0.188/src/db.rs:28:1
    |
28  | #[salsa::query_group(HirDatabaseStorage)]
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `&[String]`, found `&Cycle`
...
45  |     #[salsa::cycle(crate::mir::monomorphized_mir_body_recover)]
    |                    ------------------------------------------ arguments to this function are incorrect
    |
    = note: expected reference `&[std::string::String]`
               found reference `&ra_ap_base_db::salsa::Cycle`
note: function defined here
   --> $HOME/.local/share/cargo/registry/src/index.crates.io-6f17d22bba15001f/ra_ap_hir_ty-0.0.188/src/mir/monomorphization.rs:301:8
    |
301 | pub fn monomorphized_mir_body_recover(
    |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
302 |     _: &dyn HirDatabase,
303 |     _: &[String],
    |     ------------
    = note: this error originates in the attribute macro `salsa::query_group` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0308]: mismatched types
    --> $HOME/.local/share/cargo/registry/src/index.crates.io-6f17d22bba15001f/ra_ap_hir_ty-0.0.188/src/db.rs:28:1
     |
28   | #[salsa::query_group(HirDatabaseStorage)]
     | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `&[String]`, found `&Cycle`
...
65   |     #[salsa::cycle(crate::lower::ty_recover)]
     |                    ------------------------ arguments to this function are incorrect
     |
     = note: expected reference `&[std::string::String]`
                found reference `&ra_ap_base_db::salsa::Cycle`
note: function defined here
    --> $HOME/.local/share/cargo/registry/src/index.crates.io-6f17d22bba15001f/ra_ap_hir_ty-0.0.188/src/lower.rs:1888:15
     |
1888 | pub(crate) fn ty_recover(db: &dyn HirDatabase, _cycle: &[String], def: &TyDefId) -> Binders<Ty> {
     |               ^^^^^^^^^^                       -----------------
     = note: this error originates in the attribute macro `salsa::query_group` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0308]: mismatched types
    --> $HOME/.local/share/cargo/registry/src/index.crates.io-6f17d22bba15001f/ra_ap_hir_ty-0.0.188/src/db.rs:28:1
     |
28   | #[salsa::query_group(HirDatabaseStorage)]
     | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `&[String]`, found `&Cycle`
...
72   |     #[salsa::cycle(crate::lower::impl_self_ty_recover)]
     |                    ---------------------------------- arguments to this function are incorrect
     |
     = note: expected reference `&[std::string::String]`
                found reference `&ra_ap_base_db::salsa::Cycle`
note: function defined here
    --> $HOME/.local/share/cargo/registry/src/index.crates.io-6f17d22bba15001f/ra_ap_hir_ty-0.0.188/src/lower.rs:1936:15
     |
1936 | pub(crate) fn impl_self_ty_recover(
     |               ^^^^^^^^^^^^^^^^^^^^
1937 |     db: &dyn HirDatabase,
1938 |     _cycle: &[String],
     |     -----------------
     = note: this error originates in the attribute macro `salsa::query_group` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0308]: mismatched types
   --> $HOME/.local/share/cargo/registry/src/index.crates.io-6f17d22bba15001f/ra_ap_hir_ty-0.0.188/src/db.rs:28:1
    |
28  | #[salsa::query_group(HirDatabaseStorage)]
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `&[String]`, found `&Cycle`
...
79  |     #[salsa::cycle(crate::consteval::const_eval_recover)]
    |                    ------------------------------------ arguments to this function are incorrect
    |
    = note: expected reference `&[std::string::String]`
               found reference `&ra_ap_base_db::salsa::Cycle`
note: function defined here
   --> $HOME/.local/share/cargo/registry/src/index.crates.io-6f17d22bba15001f/ra_ap_hir_ty-0.0.188/src/consteval.rs:185:15
    |
185 | pub(crate) fn const_eval_recover(
    |               ^^^^^^^^^^^^^^^^^^
186 |     _: &dyn HirDatabase,
187 |     _: &[String],
    |     ------------
    = note: this error originates in the attribute macro `salsa::query_group` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0308]: mismatched types
   --> $HOME/.local/share/cargo/registry/src/index.crates.io-6f17d22bba15001f/ra_ap_hir_ty-0.0.188/src/db.rs:28:1
    |
28  | #[salsa::query_group(HirDatabaseStorage)]
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `&[String]`, found `&Cycle`
...
88  |     #[salsa::cycle(crate::consteval::const_eval_static_recover)]
    |                    ------------------------------------------- arguments to this function are incorrect
    |
    = note: expected reference `&[std::string::String]`
               found reference `&ra_ap_base_db::salsa::Cycle`
note: function defined here
   --> $HOME/.local/share/cargo/registry/src/index.crates.io-6f17d22bba15001f/ra_ap_hir_ty-0.0.188/src/consteval.rs:195:15
    |
195 | pub(crate) fn const_eval_static_recover(
    |               ^^^^^^^^^^^^^^^^^^^^^^^^^
196 |     _: &dyn HirDatabase,
197 |     _: &[String],
    |     ------------
    = note: this error originates in the attribute macro `salsa::query_group` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0308]: mismatched types
   --> $HOME/.local/share/cargo/registry/src/index.crates.io-6f17d22bba15001f/ra_ap_hir_ty-0.0.188/src/db.rs:28:1
    |
28  | #[salsa::query_group(HirDatabaseStorage)]
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `&[String]`, found `&Cycle`
...
92  |     #[salsa::cycle(crate::consteval::const_eval_discriminant_recover)]
    |                    ------------------------------------------------- arguments to this function are incorrect
    |
    = note: expected reference `&[std::string::String]`
               found reference `&ra_ap_base_db::salsa::Cycle`
note: function defined here
   --> $HOME/.local/share/cargo/registry/src/index.crates.io-6f17d22bba15001f/ra_ap_hir_ty-0.0.188/src/consteval.rs:203:15
    |
203 | pub(crate) fn const_eval_discriminant_recover(
    |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
204 |     _: &dyn HirDatabase,
205 |     _: &[String],
    |     ------------
    = note: this error originates in the attribute macro `salsa::query_group` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0308]: mismatched types
   --> $HOME/.local/share/cargo/registry/src/index.crates.io-6f17d22bba15001f/ra_ap_hir_ty-0.0.188/src/db.rs:28:1
    |
28  | #[salsa::query_group(HirDatabaseStorage)]
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `&[String]`, found `&Cycle`
...
102 |     #[salsa::cycle(crate::layout::layout_of_adt_recover)]
    |                    ------------------------------------ arguments to this function are incorrect
    |
    = note: expected reference `&[std::string::String]`
               found reference `&ra_ap_base_db::salsa::Cycle`
note: function defined here
   --> $HOME/.local/share/cargo/registry/src/index.crates.io-6f17d22bba15001f/ra_ap_hir_ty-0.0.188/src/layout/adt.rs:141:8
    |
141 | pub fn layout_of_adt_recover(
    |        ^^^^^^^^^^^^^^^^^^^^^
142 |     _: &dyn HirDatabase,
143 |     _: &[String],
    |     ------------
    = note: this error originates in the attribute macro `salsa::query_group` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0308]: mismatched types
   --> $HOME/.local/share/cargo/registry/src/index.crates.io-6f17d22bba15001f/ra_ap_hir_ty-0.0.188/src/db.rs:28:1
    |
28  | #[salsa::query_group(HirDatabaseStorage)]
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `&[String]`, found `&Cycle`
...
111 |     #[salsa::cycle(crate::layout::layout_of_ty_recover)]
    |                    ----------------------------------- arguments to this function are incorrect
    |
    = note: expected reference `&[std::string::String]`
               found reference `&ra_ap_base_db::salsa::Cycle`
note: function defined here
   --> $HOME/.local/share/cargo/registry/src/index.crates.io-6f17d22bba15001f/ra_ap_hir_ty-0.0.188/src/layout.rs:432:8
    |
432 | pub fn layout_of_ty_recover(
    |        ^^^^^^^^^^^^^^^^^^^^
433 |     _: &dyn HirDatabase,
434 |     _: &[String],
    |     ------------
    = note: this error originates in the attribute macro `salsa::query_group` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0308]: mismatched types
    --> $HOME/.local/share/cargo/registry/src/index.crates.io-6f17d22bba15001f/ra_ap_hir_ty-0.0.188/src/db.rs:28:1
     |
28   | #[salsa::query_group(HirDatabaseStorage)]
     | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `&[String]`, found `&Cycle`
...
135  |     #[salsa::cycle(crate::lower::generic_predicates_for_param_recover)]
     |                    -------------------------------------------------- arguments to this function are incorrect
     |
     = note: expected reference `&[std::string::String]`
                found reference `&ra_ap_base_db::salsa::Cycle`
note: function defined here
    --> $HOME/.local/share/cargo/registry/src/index.crates.io-6f17d22bba15001f/ra_ap_hir_ty-0.0.188/src/lower.rs:1459:15
     |
1459 | pub(crate) fn generic_predicates_for_param_recover(
     |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1460 |     _db: &dyn HirDatabase,
1461 |     _cycle: &[String],
     |     -----------------
     = note: this error originates in the attribute macro `salsa::query_group` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0308]: mismatched types
    --> $HOME/.local/share/cargo/registry/src/index.crates.io-6f17d22bba15001f/ra_ap_hir_ty-0.0.188/src/db.rs:28:1
     |
28   | #[salsa::query_group(HirDatabaseStorage)]
     | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `&[String]`, found `&Cycle`
...
154  |     #[salsa::cycle(crate::lower::generic_defaults_recover)]
     |                    -------------------------------------- arguments to this function are incorrect
     |
     = note: expected reference `&[std::string::String]`
                found reference `&ra_ap_base_db::salsa::Cycle`
note: function defined here
    --> $HOME/.local/share/cargo/registry/src/index.crates.io-6f17d22bba15001f/ra_ap_hir_ty-0.0.188/src/lower.rs:1652:15
     |
1652 | pub(crate) fn generic_defaults_recover(
     |               ^^^^^^^^^^^^^^^^^^^^^^^^
1653 |     db: &dyn HirDatabase,
1654 |     _cycle: &[String],
     |     -----------------
     = note: this error originates in the attribute macro `salsa::query_group` (in Nightly builds, run with -Z macro-backtrace for more info)

For more information about this error, try `rustc --explain E0308`.
error: could not compile `ra_ap_hir_ty` (lib) due to 11 previous errors
warning: build failed, waiting for other jobs to finish...
error: failed to compile `cargo-modules v0.12.0`, intermediate artifacts can be found at `/tmp/cargo-installjZgVXX`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.

Exact same error here. I just run it on two linux machines, ubuntu 22.04 as well as 23.04 and it is the same error. One machine has rust stable, while the other has rust nightly, but it makes no difference.

Thanks for the report, @dainbrump and @pramatias for the confirmation!

Weirdly enough I haven't come across these errors on my macOS machine (which is currently running Rust 1.74.1). Nor have any of the project's Linux Github action workers (which are also currently running Rust 1.74.1).

I usually run cargo minimal-versions to make sure things are working fine during cargo install (and it has caught a couple of semver issues in the past!), but forcing the 1.72.1 toolchain is working just fine for me, too:

$ RUSTUP_TOOLCHAIN="1.72.1" cargo --version

cargo 1.72.1 (103a7ff2e 2023-08-15)
$ RUSTUP_TOOLCHAIN="1.72.1" cargo minimal-versions build --workspace --all-features --ignore-private -v

info: running `rustup run nightly cargo update -Z minimal-versions`
    Updating crates.io index
...
info: running `~/.rustup/toolchains/1.72.1-x86_64-apple-darwin/bin/cargo hack build --workspace --all-features`
info: running `cargo build --all-features` on cargo-modules (1/1)
...
   Compiling cargo-modules v0.12.0 (.../cargo-modules)
    Finished dev [unoptimized + debuginfo] target(s) in 56.84s
info: restoring .../cargo-modules/Cargo.toml
info: restoring .../cargo-modules/Cargo.lock

Diffing the source of ra_ap_hir_ty at versions 0.0.187 and 0.0.188 I however also couldn't find any changes that seem to indicate being connected to the type-mismatch reported above.

Running cargo install cargo-modules --force I do get the same error though! 🤔

Hello @regexident, i ran

$ RUSTUP_TOOLCHAIN="1.72.1" cargo --version
cargo 1.72.1 (103a7ff2e 2023-08-15)

$ RUSTUP_TOOLCHAIN="1.72.1" cargo minimal-versions build --workspace --all-features --ignore-private -v
info: modifying from /home/emporas/cargo-modules/Cargo.toml
info: running rustup run nightly cargo update -Z minimal-versions
Updating crates.io index
Removing anstyle v0.3.0
Removing assert_cmd v2.0.12
Downgrading bitflags v1.3.2 -> v1.3.1
Removing bstr v1.0.1
Removing byteorder v1.2.7
Removing console v0.15.4
Removing difflib v0.4.0
Removing doc-comment v0.3.0
Removing encode_unicode v0.3.0
Removing insta v1.34.0
Removing itertools v0.10.0
Removing linked-hash-map v0.5.6
Downgrading memoffset v0.6.5 -> v0.6.1
Removing predicates v3.0.1
Removing predicates-core v1.0.6
Removing predicates-tree v1.0.1
Downgrading regex v1.3.9 -> v1.3.0
Removing regex-automata v0.1.5
Downgrading regex-syntax v0.6.18 -> v0.6.12
Removing shellwords v1.1.0
Removing similar v2.1.0
Adding thread_local v0.3.6
Removing treeline v0.1.0
Downgrading triomphe v0.1.11 -> v0.1.10
Downgrading unicode-width v0.1.11 -> v0.1.5
Removing wait-timeout v0.2.0
Removing yaml-rust v0.4.5
info: running /home/emporas/.rustup/toolchains/1.72.1-x86_64-unknown-linux-gnu/bin/cargo hack build --workspace --all-features
error: no such command: hack

Did you mean `check`?

View all installed commands with `cargo --list`

info: restoring /home/emporas/cargo-modules/Cargo.toml
info: restoring /home/emporas/cargo-modules/Cargo.lock
error: process didn't exit successfully: /home/emporas/.rustup/toolchains/1.72.1-x86_64-unknown-linux-gnu/bin/cargo hack build --workspace --all-features (exit status: 101)

My cargo minimal versions:

$ cargo install cargo-minimal-versions
Updating crates.io index
Ignored package cargo-minimal-versions v0.1.22 is already installed, use --force to override

and my rustup toolchain:

$ rustup show
Default host: x86_64-unknown-linux-gnu
rustup home: /home/emporas/.rustup

installed toolchains

stable-x86_64-unknown-linux-gnu (default)
nightly-x86_64-unknown-linux-gnu
1.72.1-x86_64-unknown-linux-gnu

active toolchain

stable-x86_64-unknown-linux-gnu (default)
rustc 1.74.1 (a28077b28 2023-12-04)

Oh, and by cloning the repo and building it, everything compiles correctly, with
$ cargo build --release

Is there a way to run the target/release/cargo-modules by itself?

same problem in Debian 12.4 in WSL with rustc 1.74.1

Is there a way to run the target/release/cargo-modules by itself?

You can always run the binary from within its cargo project via …

cargo run --release -- <ARGS>

… where <ARGS> gets replaced with whatever you'd otherwise pass to cargo modules <ARGS> (or cargo-modules <ARGS>, if calling the tool directly).

(You definitely want --release here, as otherwise the execution will be slow as a snail, especially for commands that load the sysroot.)

Oh, i forgot about cargo run, thanks for the tip @regexident . I will test if it runs correctly the following days when i have time. If cargo install doesn't work for debian based systems, but git clone and cargo build works correctly, that's fine with me. If not, i will report the problem. Cheers!

That would be great!

That said you may want to try installing the just-released v0.13.0, which updated to rust-analyzer v0.0.189, among a bunch of other changes.

Compiling cargo-modules from source, using git clone and cargo build --release works fine. It was only when using cargo to install the package that it didn't build correctly.

I encountered some problems trying to install other Rust packages as well, that the build failed, but i didn't try to build from source. Maybe it is a bug in cargo. It was my first time building cargo-modules and i didn't think that a buggy cargo would be a possibility, but maybe it is. I will research it more, and i will report the error to the cargo repo, if that's the case.

Anyway, good job creating cargo-modules @regexident. Cheers!

Compiling cargo-modules from source, using git clone and cargo build --release works fine. It was only when using cargo to install the package that it didn't build correctly.

For both, 0.12.0, as well as 0.13.0?

I encountered some problems trying to install other Rust packages as well, that the build failed, but i didn't try to build from source. Maybe it is a bug in cargo. It was my first time building cargo-modules and i didn't think that a buggy cargo would be a possibility, but maybe it is. I will research it more, and i will report the error to the cargo repo, if that's the case.

Yeah. I unfortunately was only able to reproduce it temporarily on my local machine (or CI), which makes it sorta hard to investigate.

Anyway, good job creating cargo-modules @regexident. Cheers!

Thanks, glad you find it useful!

So i downloaded and tested each version:

Fails : cargo install cargo-modules --version 0.12.0
Succeeds : cargo install cargo-modules --version 0.13.0

Building from source succeeds for both versions.
Work as expected:
cd cargo-modules-0.12.0/
cargo run --release generate tree --lib

cd cargo-modules-0.13.0
cargo run --release structure --lib

It seems that the issue is resolved. Thanks @regexident.

cargo install cargo-modules works for 0.13.0 in Debian 12.4 in WSL with rustc 1.74.1

Ran into the same original errors with 0.12.0. Trying 0.13.0 installed fine. No errors. Thanks all.

Thanks for checking @pramatias!