Canop / dysk

A linux utility to get information on filesystems, like df but better
https://dystroy.org/dysk
MIT License
890 stars 25 forks source link

install of v2.5.0 fails with errors about crossterm #53

Closed sourcefrog closed 1 year ago

sourcefrog commented 2 years ago
; nice cargo install lfs
    Updating crates.io index
  Installing lfs v2.5.0
   Compiling cfg-if v1.0.0
   Compiling autocfg v1.1.0
   Compiling libc v0.2.126
   Compiling proc-macro2 v1.0.42
   Compiling unicode-ident v1.0.2
   Compiling quote v1.0.20
   Compiling syn v1.0.98
   Compiling memchr v2.5.0
   Compiling once_cell v1.13.0
   Compiling scopeguard v1.1.0
   Compiling log v0.4.17
   Compiling crossbeam-utils v0.8.11
   Compiling smallvec v1.9.0
   Compiling signal-hook v0.3.14
   Compiling parking_lot_core v0.9.3
   Compiling parking_lot_core v0.8.5
   Compiling doc-comment v0.3.3
   Compiling crossbeam-queue v0.3.6
   Compiling regex-syntax v0.6.27
   Compiling bitflags v1.3.2
   Compiling heck v0.4.0
   Compiling unicode-segmentation v1.9.0
   Compiling serde v1.0.140
   Compiling argh_shared v0.1.8
   Compiling serde_json v1.0.82
   Compiling ryu v1.0.10
   Compiling unicode-width v0.1.9
   Compiling itoa v1.0.2
   Compiling file-size v1.0.3
   Compiling bet v1.0.1
   Compiling instant v0.1.12
   Compiling minimad v0.9.0
   Compiling lock_api v0.4.7
   Compiling memoffset v0.6.5
   Compiling crossbeam-epoch v0.9.10
   Compiling heck v0.3.3
   Compiling crossbeam-channel v0.5.6
   Compiling aho-corasick v0.7.18
   Compiling crossbeam-deque v0.8.2
   Compiling signal-hook-registry v1.4.0
   Compiling mio v0.8.4
   Compiling mio v0.7.14
   Compiling crossbeam v0.8.2
   Compiling parking_lot v0.11.2
   Compiling parking_lot v0.12.1
   Compiling signal-hook-mio v0.2.3
   Compiling crossterm v0.23.2
   Compiling crossterm v0.22.1
   Compiling regex v1.6.0
   Compiling coolor v0.5.0
   Compiling lazy-regex-proc_macros v2.3.0
   Compiling snafu-derive v0.7.1
   Compiling thiserror-impl v1.0.31
   Compiling argh_derive v0.1.8
   Compiling lazy-regex v2.3.0
   Compiling argh v0.1.8
   Compiling thiserror v1.0.31
   Compiling termimad v0.20.2
   Compiling snafu v0.7.1
   Compiling lfs-core v0.11.0
   Compiling lfs v2.5.0
error[E0308]: mismatched types
   --> /home/mbp/.cargo/registry/src/github.com-1ecc6299db9ec823/lfs-2.5.0/src/table.rs:111:38
    |
111 |         bold: CompoundStyle::with_fg(AnsiValue(SIZE_COLOR)), // size
    |                                      ^^^^^^^^^^^^^^^^^^^^^ expected enum `crossterm::style::types::color::Color`, found enum `Color`
    |
    = note: perhaps two different versions of crate `crossterm` are being used?

error[E0308]: mismatched types
   --> /home/mbp/.cargo/registry/src/github.com-1ecc6299db9ec823/lfs-2.5.0/src/table.rs:112:47
    |
112 |         inline_code: CompoundStyle::with_fgbg(AnsiValue(USED_COLOR), AnsiValue(AVAI_COLOR)), // use bar
    |                                               ^^^^^^^^^^^^^^^^^^^^^ expected enum `crossterm::style::types::color::Color`, found enum `Color`
    |
    = note: perhaps two different versions of crate `crossterm` are being used?

error[E0308]: mismatched types
   --> /home/mbp/.cargo/registry/src/github.com-1ecc6299db9ec823/lfs-2.5.0/src/table.rs:112:70
    |
112 |         inline_code: CompoundStyle::with_fgbg(AnsiValue(USED_COLOR), AnsiValue(AVAI_COLOR)), // use bar
    |                                                                      ^^^^^^^^^^^^^^^^^^^^^ expected enum `crossterm::style::types::color::Color`, found enum `Color`
    |
    = note: perhaps two different versions of crate `crossterm` are being used?

error[E0308]: mismatched types
   --> /home/mbp/.cargo/registry/src/github.com-1ecc6299db9ec823/lfs-2.5.0/src/table.rs:113:43
    |
113 |         strikeout: CompoundStyle::with_fg(AnsiValue(USED_COLOR)), // use%
    |                                           ^^^^^^^^^^^^^^^^^^^^^ expected enum `crossterm::style::types::color::Color`, found enum `Color`
    |
    = note: perhaps two different versions of crate `crossterm` are being used?

error[E0308]: mismatched types
   --> /home/mbp/.cargo/registry/src/github.com-1ecc6299db9ec823/lfs-2.5.0/src/table.rs:114:40
    |
114 |         italic: CompoundStyle::with_fg(AnsiValue(AVAI_COLOR)), // available
    |                                        ^^^^^^^^^^^^^^^^^^^^^ expected enum `crossterm::style::types::color::Color`, found enum `Color`
    |
    = note: perhaps two different versions of crate `crossterm` are being used?

For more information about this error, try `rustc --explain E0308`.
error: could not compile `lfs` due to 5 previous errors
error: failed to compile `lfs v2.5.0`, intermediate artifacts can be found at `/tmp/cargo-installx7f8hK`
; rustup show
Default host: x86_64-unknown-linux-gnu
rustup home:  /home/mbp/.rustup

installed toolchains
--------------------

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

active toolchain
----------------

stable-x86_64-unknown-linux-gnu (default)
rustc 1.62.1 (e092d0b6b 2022-07-16)

I have a tarball of the build directory if you want it.

I wonder if this is somehow connected to changes in the version resolver in recent releases?

It also fails under the nightly of 2022-07-24.

I also get a similar error on 1.59. I tried 1.56 but it does not yet have the strip feature stabilized.

Canop commented 2 years ago

I wonder if this is somehow connected to changes in the version resolver in recent releases?

Oh... I wondered why all crate resolutions were giving unexpected results... Now I understand.

And so I have a lot of work to fix that in two dozen programs...

Canop commented 2 years ago

@sourcefrog Can you try with

cargo install --locked lfs

?

(edit replaced broot with lfs)

sourcefrog commented 2 years ago

I actually installed broot on this machine the other day without --locked and it worked.

I tried --locked on lfs and I do get this warning:

 Installing lfs v2.5.0
warning: package `crossbeam-channel v0.5.2` in Cargo.lock is yanked in registry `crates-io`, consider running without --locked

but aside from that it does work.

Canop commented 2 years ago

Thanks. Please don't close this issue. We'll let it open so that people having the same problem see the solution.

I'll upgrade dependencies when coming back from holidays, I think.

sourcefrog commented 2 years ago

Have a good holiday!

joseluis commented 1 year ago

this is solved by bumping crossterm to the same version termimad depends on.