Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cargo build fails #982

Open
3 tasks done
JustPassingBy06 opened this issue Dec 14, 2024 · 0 comments
Open
3 tasks done

Cargo build fails #982

JustPassingBy06 opened this issue Dec 14, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@JustPassingBy06
Copy link

Describe the bug

The cargo build fails

To Reproduce

Steps to reproduce the behavior:

  1. Install cargo
  2. Install linutil_tui using cargo

Expected behavior

Linutil being installed using cargo

Cargo command output

   Updating crates.io index
  Installing linutil_tui v24.9.28
    Updating crates.io index
     Locking 167 packages to latest compatible versions
      Adding ansi-to-tui v6.0.1 (available: v7.0.0)
      Adding ego-tree v0.6.3 (available: v0.10.0)
      Adding ratatui v0.28.1 (available: v0.29.0)
      Adding tree-sitter-highlight v0.23.2 (available: v0.24.5)
      Adding tui-term v0.1.13 (available: v0.2.0)
      Adding unicode-width v0.1.14 (available: v0.2.0)
  Downloaded serde v1.0.216
  Downloaded tree-sitter-language v0.1.3
  Downloaded serde_derive v1.0.216
  Downloaded cc v1.2.4
  Downloaded 4 crates (238.4 KB) in 0.51s
   Compiling proc-macro2 v1.0.92
   Compiling unicode-ident v1.0.14
   Compiling libc v0.2.168
   Compiling autocfg v1.4.0
   Compiling cfg-if v1.0.0
   Compiling rustversion v1.0.18
   Compiling equivalent v1.0.1
   Compiling allocator-api2 v0.2.21
   Compiling foldhash v0.1.3
   Compiling shlex v1.3.0
   Compiling rustix v0.38.42
   Compiling log v0.4.22
   Compiling fnv v1.0.7
   Compiling ident_case v1.0.1
   Compiling cc v1.2.4
   Compiling parking_lot_core v0.9.10
   Compiling signal-hook v0.3.17
   Compiling heck v0.5.0
   Compiling memchr v2.7.4
   Compiling strsim v0.11.1
   Compiling either v1.13.0
   Compiling utf8parse v0.2.2
   Compiling bitflags v2.6.0
   Compiling hashbrown v0.15.2
   Compiling linux-raw-sys v0.4.14
   Compiling serde v1.0.216
   Compiling lock_api v0.4.12
   Compiling smallvec v1.13.2
   Compiling scopeguard v1.2.0
   Compiling thiserror v1.0.69
   Compiling num-traits v0.2.19
   Compiling yansi v1.0.1
   Compiling itoa v1.0.14
   Compiling unicode-width v0.1.14
   Compiling quote v1.0.37
   Compiling paste v1.0.15
   Compiling diff v0.1.13
   Compiling castaway v0.2.3
   Compiling aho-corasick v1.1.3
   Compiling syn v2.0.90
   Compiling pretty_assertions v1.4.1
   Compiling itertools v0.13.0
   Compiling memoffset v0.6.5
   Compiling static_assertions v1.1.0
   Compiling unicode-segmentation v1.12.0
   Compiling indoc v2.0.5
   Compiling ryu v1.0.18
   Compiling byteorder v1.5.0
   Compiling regex-syntax v0.8.5
   Compiling compact_str v0.8.0
   Compiling indexmap v2.7.0
   Compiling lru v0.12.5
   Compiling tree-sitter v0.23.2
   Compiling vte_generate_state_changes v0.1.2
   Compiling anstyle-parse v0.2.6
   Compiling signal-hook-registry v1.4.2
   Compiling mio v1.0.3
   Compiling parking_lot v0.12.3
   Compiling termios v0.2.2
   Compiling signal-hook-mio v0.2.4
   Compiling ioctl-rs v0.1.6
   Compiling serial-core v0.4.0
   Compiling getrandom v0.2.15
   Compiling anstyle v1.0.10
   Compiling is_terminal_polyfill v1.70.1
   Compiling anyhow v1.0.94
   Compiling arrayvec v0.7.6
   Compiling anstyle-query v1.1.2
   Compiling unicode-truncate v1.1.0
   Compiling iana-time-zone v0.1.61
   Compiling colorchoice v1.0.3
   Compiling tree-sitter-language v0.1.3
   Compiling winnow v0.6.20
   Compiling cassowary v0.3.0
   Compiling crossterm v0.28.1
   Compiling anstream v0.6.18
   Compiling chrono v0.4.39
   Compiling vte v0.11.1
   Compiling regex-automata v0.4.9
   Compiling rand_core v0.6.4
   Compiling serial-unix v0.4.0
   Compiling tree-sitter-bash v0.23.3
   Compiling include_dir_macros v0.7.4
   Compiling darling_core v0.20.10
   Compiling pin-utils v0.1.0
   Compiling minimal-lexical v0.2.1
   Compiling home v0.5.9
   Compiling bitflags v1.3.2
   Compiling clap_lex v0.7.4
   Compiling nix v0.25.1
   Compiling clap_builder v4.5.23
   Compiling which v6.0.3
   Compiling linutil_tui v24.9.28
   Compiling nom v7.1.3
   Compiling include_dir v0.7.4
   Compiling vt100 v0.15.2
   Compiling serde_derive v1.0.216
   Compiling thiserror-impl v1.0.69
   Compiling darling_macro v0.20.10
   Compiling darling v0.20.10
   Compiling strum_macros v0.26.4
   Compiling zerocopy-derive v0.7.35
   Compiling instability v0.3.3
   Compiling regex v1.11.1
   Compiling filedescriptor v0.8.2
   Compiling clap_derive v4.5.18
   Compiling serial v0.4.0
   Compiling simdutf8 v0.1.5
   Compiling zerocopy v0.7.35
   Compiling temp-dir v0.1.14
   Compiling ego-tree v0.9.0
   Compiling downcast-rs v1.2.1
   Compiling shell-words v1.1.0
   Compiling lazy_static v1.5.0
   Compiling ppv-lite86 v0.2.20
   Compiling portable-pty v0.8.1
   Compiling zips v0.1.7
   Compiling oneshot v0.1.8
   Compiling ego-tree v0.6.3
   Compiling strum v0.26.3
   Compiling rand_chacha v0.3.1
   Compiling ratatui v0.28.1
   Compiling rand v0.8.5
   Compiling clap v4.5.23
   Compiling tui-term v0.1.13
   Compiling ansi-to-tui v6.0.1
   Compiling serde_spanned v0.6.8
   Compiling toml_datetime v0.6.8
   Compiling tree-sitter-highlight v0.23.2
   Compiling toml_edit v0.22.22
   Compiling toml v0.8.19
   Compiling linutil_core v24.10.31
error[E0308]: mismatched types
   --> /home/myname/.cargo/registry/src/index.crates.io-6f17d22bba15001f/linutil_tui-24.9.28/src/filter.rs:47:51
    |
47  |             let curr = tabs[current_tab].tree.get(node).unwrap();
    |                                               --- ^^^^ expected `linutil_core::ego_tree::NodeId`, found `ego_tree::NodeId`
    |                                               |
    |                                               arguments to this method are incorrect
    |
    = note: `ego_tree::NodeId` and `linutil_core::ego_tree::NodeId` have similar names, but are actually distinct types
note: `ego_tree::NodeId` is defined in crate `ego_tree`
   --> /home/myname/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ego-tree-0.6.3/src/lib.rs:53:1
    |
53  | pub struct NodeId(NonZeroUsize);
    | ^^^^^^^^^^^^^^^^^
note: `linutil_core::ego_tree::NodeId` is defined in crate `ego_tree`
   --> /home/myname/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ego-tree-0.9.0/src/lib.rs:56:1
    |
56  | pub struct NodeId(NonZeroUsize);
    | ^^^^^^^^^^^^^^^^^
    = note: perhaps two different versions of crate `ego_tree` are being used?
note: method defined here
   --> /home/myname/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ego-tree-0.9.0/src/lib.rs:155:12
    |
155 |     pub fn get(&self, id: NodeId) -> Option<NodeRef<T>> {
    |            ^^^

error[E0308]: mismatched types
  --> /home/myname/.cargo/registry/src/index.crates.io-6f17d22bba15001f/linutil_tui-24.9.28/src/filter.rs:52:27
   |
52 |                     node: node.value().clone(),
   |                           ^^^^^^^^^^^^^^^^^^^^ expected `ListNode`, found `Rc<ListNode>`
   |
   = note: expected struct `ListNode`
              found struct `Rc<ListNode>`

error[E0308]: mismatched types
  --> /home/myname/.cargo/registry/src/index.crates.io-6f17d22bba15001f/linutil_tui-24.9.28/src/filter.rs:53:25
   |
53 |                     id: node.id(),
   |                         ^^^^^^^^^ expected `ego_tree::NodeId`, found `linutil_core::ego_tree::NodeId`
   |
   = note: `linutil_core::ego_tree::NodeId` and `ego_tree::NodeId` have similar names, but are actually distinct types
note: `linutil_core::ego_tree::NodeId` is defined in crate `ego_tree`
  --> /home/myname/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ego-tree-0.9.0/src/lib.rs:56:1
   |
56 | pub struct NodeId(NonZeroUsize);
   | ^^^^^^^^^^^^^^^^^
note: `ego_tree::NodeId` is defined in crate `ego_tree`
  --> /home/myname/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ego-tree-0.6.3/src/lib.rs:53:1
   |
53 | pub struct NodeId(NonZeroUsize);
   | ^^^^^^^^^^^^^^^^^
   = note: perhaps two different versions of crate `ego_tree` are being used?

error[E0308]: mismatched types
  --> /home/myname/.cargo/registry/src/index.crates.io-6f17d22bba15001f/linutil_tui-24.9.28/src/filter.rs:70:35
   |
70 | ...                   node: node.value().clone(),
   |                             ^^^^^^^^^^^^^^^^^^^^ expected `ListNode`, found `Rc<ListNode>`
   |
   = note: expected struct `ListNode`
              found struct `Rc<ListNode>`

error[E0308]: mismatched types
  --> /home/myname/.cargo/registry/src/index.crates.io-6f17d22bba15001f/linutil_tui-24.9.28/src/filter.rs:71:33
   |
71 | ...                   id: node.id(),
   |                           ^^^^^^^^^ expected `ego_tree::NodeId`, found `linutil_core::ego_tree::NodeId`
   |
   = note: `linutil_core::ego_tree::NodeId` and `ego_tree::NodeId` have similar names, but are actually distinct types
note: `linutil_core::ego_tree::NodeId` is defined in crate `ego_tree`
  --> /home/myname/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ego-tree-0.9.0/src/lib.rs:56:1
   |
56 | pub struct NodeId(NonZeroUsize);
   | ^^^^^^^^^^^^^^^^^
note: `ego_tree::NodeId` is defined in crate `ego_tree`
  --> /home/myname/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ego-tree-0.6.3/src/lib.rs:53:1
   |
53 | pub struct NodeId(NonZeroUsize);
   | ^^^^^^^^^^^^^^^^^
   = note: perhaps two different versions of crate `ego_tree` are being used?

error[E0308]: mismatched types
  --> /home/myname/.cargo/registry/src/index.crates.io-6f17d22bba15001f/linutil_tui-24.9.28/src/state.rs:83:13
   |
83 |             tabs,
   |             ^^^^ expected `Vec<Tab>`, found `TabList`
   |
   = note: expected struct `Vec<linutil_core::Tab>`
              found struct `TabList`
help: try using a conversion method
   |
83 |             tabs: tabs.to_vec(),
   |             +++++     +++++++++

error[E0308]: mismatched types
  --> /home/myname/.cargo/registry/src/index.crates.io-6f17d22bba15001f/linutil_tui-24.9.28/src/state.rs:85:31
   |
85 |             visit_stack: vec![root_id],
   |                               ^^^^^^^ expected `ego_tree::NodeId`, found `linutil_core::ego_tree::NodeId`
   |
   = note: `linutil_core::ego_tree::NodeId` and `ego_tree::NodeId` have similar names, but are actually distinct types
note: `linutil_core::ego_tree::NodeId` is defined in crate `ego_tree`
  --> /home/myname/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ego-tree-0.9.0/src/lib.rs:56:1
   |
56 | pub struct NodeId(NonZeroUsize);
   | ^^^^^^^^^^^^^^^^^
note: `ego_tree::NodeId` is defined in crate `ego_tree`
  --> /home/myname/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ego-tree-0.6.3/src/lib.rs:53:1
   |
53 | pub struct NodeId(NonZeroUsize);
   | ^^^^^^^^^^^^^^^^^
   = note: perhaps two different versions of crate `ego_tree` are being used?

error[E0609]: no field `multi_selectable` on type `&linutil_core::Tab`
   --> /home/myname/.cargo/registry/src/index.crates.io-6f17d22bba15001f/linutil_tui-24.9.28/src/state.rs:519:38
    |
519 |             .map_or(false, |tab| tab.multi_selectable)
    |                                      ^^^^^^^^^^^^^^^^ unknown field
    |
    = note: available fields are: `name`, `tree`

error[E0308]: mismatched types
   --> /home/myname/.cargo/registry/src/index.crates.io-6f17d22bba15001f/linutil_tui-24.9.28/src/state.rs:668:33
    |
668 |           self.visit_stack = vec![self.tabs[self.current_tab.selected().unwrap()]
    |  _________________________________^
669 | |             .tree
670 | |             .root()
671 | |             .id()];
    | |_________________^ expected `ego_tree::NodeId`, found `linutil_core::ego_tree::NodeId`
    |
    = note: `linutil_core::ego_tree::NodeId` and `ego_tree::NodeId` have similar names, but are actually distinct types
note: `linutil_core::ego_tree::NodeId` is defined in crate `ego_tree`
   --> /home/myname/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ego-tree-0.9.0/src/lib.rs:56:1
    |
56  | pub struct NodeId(NonZeroUsize);
    | ^^^^^^^^^^^^^^^^^
note: `ego_tree::NodeId` is defined in crate `ego_tree`
   --> /home/myname/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ego-tree-0.6.3/src/lib.rs:53:1
    |
53  | pub struct NodeId(NonZeroUsize);
    | ^^^^^^^^^^^^^^^^^
    = note: perhaps two different versions of crate `ego_tree` are being used?

Some errors have detailed explanations: E0308, E0609.
For more information about an error, try `rustc --explain E0308`.
error: could not compile `linutil_tui` (bin "linutil") due to 9 previous errors
error: failed to compile `linutil_tui v24.9.28`, intermediate artifacts can be found at `/tmp/cargo-install5YuWLP`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.

Additional context

I am using Ubuntu 22.10

Checklist

  • I checked for duplicate issues.
  • I checked already existing discussions.
  • This issue is not included in the roadmap.
  • [Not applicable] This issue is present on both stable and development branches.
@JustPassingBy06 JustPassingBy06 added the bug Something isn't working label Dec 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant