orhun / systeroid

A more powerful alternative to sysctl(8) with a terminal user interface 🐧
https://systeroid.cli.rs
Apache License 2.0
1.28k stars 23 forks source link

Compilation Failure - 'cargo install systeroid-tui' #136

Closed daveman1010221 closed 1 year ago

daveman1010221 commented 1 year ago

Compiler is stable, rustc 1.72.0 (5680fa18f 2023-08-23)

Just a guess, maybe the pinned dependency version for ratatui has required an update? I see it's pinned to "=0.22.0" in systeroid-tui-0.4.3, but clearly I'm seeing 0.23.0 for some reason in the logs below.

   Compiling systeroid-tui v0.4.3
error[E0308]: mismatched types
    --> /home/d/.cargo/registry/src/index.crates.io-6f17d22bba15001f/systeroid-tui-0.4.3/src/ui.rs:485:22
     |
485  |         .style_trace(Style::default().fg(TuiColor::DarkGray))
     |          ----------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `ratatui::style::Style`, found `Style`
     |          |
     |          arguments to this method are incorrect
     |
     = note: `Style` and `ratatui::style::Style` have similar names, but are actually distinct types
note: `Style` is defined in crate `ratatui`
    --> /home/d/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ratatui-0.22.0/src/style.rs:252:1
     |
252  | pub struct Style {
     | ^^^^^^^^^^^^^^^^
note: `ratatui::style::Style` is defined in crate `ratatui`
    --> /home/d/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ratatui-0.23.0/src/style.rs:253:1
     |
253  | pub struct Style {
     | ^^^^^^^^^^^^^^^^
     = note: perhaps two different versions of crate `ratatui` are being used?
note: method defined here
    --> /home/d/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tui-logger-0.9.6/src/lib.rs:1338:12
     |
1338 |     pub fn style_trace(mut self, style: Style) -> Self {
     |            ^^^^^^^^^^^

error[E0308]: mismatched types
    --> /home/d/.cargo/registry/src/index.crates.io-6f17d22bba15001f/systeroid-tui-0.4.3/src/ui.rs:486:22
     |
486  |         .style_debug(Style::default().fg(TuiColor::Blue))
     |          ----------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `ratatui::style::Style`, found `Style`
     |          |
     |          arguments to this method are incorrect
     |
     = note: `Style` and `ratatui::style::Style` have similar names, but are actually distinct types
note: `Style` is defined in crate `ratatui`
    --> /home/d/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ratatui-0.22.0/src/style.rs:252:1
     |
252  | pub struct Style {
     | ^^^^^^^^^^^^^^^^
note: `ratatui::style::Style` is defined in crate `ratatui`
    --> /home/d/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ratatui-0.23.0/src/style.rs:253:1
     |
253  | pub struct Style {
     | ^^^^^^^^^^^^^^^^
     = note: perhaps two different versions of crate `ratatui` are being used?
note: method defined here
    --> /home/d/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tui-logger-0.9.6/src/lib.rs:1342:12
     |
1342 |     pub fn style_debug(mut self, style: Style) -> Self {
     |            ^^^^^^^^^^^

error[E0308]: mismatched types
    --> /home/d/.cargo/registry/src/index.crates.io-6f17d22bba15001f/systeroid-tui-0.4.3/src/ui.rs:487:21
     |
487  |         .style_warn(Style::default().fg(TuiColor::Yellow))
     |          ---------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `ratatui::style::Style`, found `Style`
     |          |
     |          arguments to this method are incorrect
     |
     = note: `Style` and `ratatui::style::Style` have similar names, but are actually distinct types
note: `Style` is defined in crate `ratatui`
    --> /home/d/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ratatui-0.22.0/src/style.rs:252:1
     |
252  | pub struct Style {
     | ^^^^^^^^^^^^^^^^
note: `ratatui::style::Style` is defined in crate `ratatui`
    --> /home/d/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ratatui-0.23.0/src/style.rs:253:1
     |
253  | pub struct Style {
     | ^^^^^^^^^^^^^^^^
     = note: perhaps two different versions of crate `ratatui` are being used?
note: method defined here
    --> /home/d/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tui-logger-0.9.6/src/lib.rs:1330:12
     |
1330 |     pub fn style_warn(mut self, style: Style) -> Self {
     |            ^^^^^^^^^^

error[E0308]: mismatched types
    --> /home/d/.cargo/registry/src/index.crates.io-6f17d22bba15001f/systeroid-tui-0.4.3/src/ui.rs:488:22
     |
488  |         .style_error(Style::default().fg(TuiColor::Red))
     |          ----------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `ratatui::style::Style`, found `Style`
     |          |
     |          arguments to this method are incorrect
     |
     = note: `Style` and `ratatui::style::Style` have similar names, but are actually distinct types
note: `Style` is defined in crate `ratatui`
    --> /home/d/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ratatui-0.22.0/src/style.rs:252:1
     |
252  | pub struct Style {
     | ^^^^^^^^^^^^^^^^
note: `ratatui::style::Style` is defined in crate `ratatui`
    --> /home/d/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ratatui-0.23.0/src/style.rs:253:1
     |
253  | pub struct Style {
     | ^^^^^^^^^^^^^^^^
     = note: perhaps two different versions of crate `ratatui` are being used?
note: method defined here
    --> /home/d/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tui-logger-0.9.6/src/lib.rs:1326:12
     |
1326 |     pub fn style_error(mut self, style: Style) -> Self {
     |            ^^^^^^^^^^^

error[E0308]: mismatched types
    --> /home/d/.cargo/registry/src/index.crates.io-6f17d22bba15001f/systeroid-tui-0.4.3/src/ui.rs:489:21
     |
489  |         .style_info(Style::default().fg(TuiColor::Green))
     |          ---------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `ratatui::style::Style`, found `Style`
     |          |
     |          arguments to this method are incorrect
     |
     = note: `Style` and `ratatui::style::Style` have similar names, but are actually distinct types
note: `Style` is defined in crate `ratatui`
    --> /home/d/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ratatui-0.22.0/src/style.rs:252:1
     |
252  | pub struct Style {
     | ^^^^^^^^^^^^^^^^
note: `ratatui::style::Style` is defined in crate `ratatui`
    --> /home/d/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ratatui-0.23.0/src/style.rs:253:1
     |
253  | pub struct Style {
     | ^^^^^^^^^^^^^^^^
     = note: perhaps two different versions of crate `ratatui` are being used?
note: method defined here
    --> /home/d/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tui-logger-0.9.6/src/lib.rs:1334:12
     |
1334 |     pub fn style_info(mut self, style: Style) -> Self {
     |            ^^^^^^^^^^

error[E0308]: mismatched types
    --> /home/d/.cargo/registry/src/index.crates.io-6f17d22bba15001f/systeroid-tui-0.4.3/src/ui.rs:490:26
     |
490  |         .highlight_style(colors.get_fg_style())
     |          --------------- ^^^^^^^^^^^^^^^^^^^^^ expected `ratatui::style::Style`, found `Style`
     |          |
     |          arguments to this method are incorrect
     |
     = note: `Style` and `ratatui::style::Style` have similar names, but are actually distinct types
note: `Style` is defined in crate `ratatui`
    --> /home/d/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ratatui-0.22.0/src/style.rs:252:1
     |
252  | pub struct Style {
     | ^^^^^^^^^^^^^^^^
note: `ratatui::style::Style` is defined in crate `ratatui`
    --> /home/d/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ratatui-0.23.0/src/style.rs:253:1
     |
253  | pub struct Style {
     | ^^^^^^^^^^^^^^^^
     = note: perhaps two different versions of crate `ratatui` are being used?
note: method defined here
    --> /home/d/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tui-logger-0.9.6/src/lib.rs:1310:12
     |
1310 |     pub fn highlight_style(mut self, style: Style) -> Self {
     |            ^^^^^^^^^^^^^^^

error[E0308]: mismatched types
    --> /home/d/.cargo/registry/src/index.crates.io-6f17d22bba15001f/systeroid-tui-0.4.3/src/ui.rs:491:23
     |
491  |         .border_style(colors.get_fg_style())
     |          ------------ ^^^^^^^^^^^^^^^^^^^^^ expected `ratatui::style::Style`, found `Style`
     |          |
     |          arguments to this method are incorrect
     |
     = note: `Style` and `ratatui::style::Style` have similar names, but are actually distinct types
note: `Style` is defined in crate `ratatui`
    --> /home/d/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ratatui-0.22.0/src/style.rs:252:1
     |
252  | pub struct Style {
     | ^^^^^^^^^^^^^^^^
note: `ratatui::style::Style` is defined in crate `ratatui`
    --> /home/d/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ratatui-0.23.0/src/style.rs:253:1
     |
253  | pub struct Style {
     | ^^^^^^^^^^^^^^^^
     = note: perhaps two different versions of crate `ratatui` are being used?
note: method defined here
    --> /home/d/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tui-logger-0.9.6/src/lib.rs:1314:12
     |
1314 |     pub fn border_style(mut self, style: Style) -> Self {
     |            ^^^^^^^^^^^^

error[E0308]: mismatched types
    --> /home/d/.cargo/registry/src/index.crates.io-6f17d22bba15001f/systeroid-tui-0.4.3/src/ui.rs:492:22
     |
492  |         .border_type(BorderType::Rounded)
     |          ----------- ^^^^^^^^^^^^^^^^^^^ expected `BorderType`, found a different `BorderType`
     |          |
     |          arguments to this method are incorrect
     |
     = note: `BorderType` and `BorderType` have similar names, but are actually distinct types
note: `BorderType` is defined in crate `ratatui`
    --> /home/d/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ratatui-0.22.0/src/widgets/block.rs:14:1
     |
14   | pub enum BorderType {
     | ^^^^^^^^^^^^^^^^^^^
note: `BorderType` is defined in crate `ratatui`
    --> /home/d/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ratatui-0.23.0/src/widgets/block.rs:16:1
     |
16   | pub enum BorderType {
     | ^^^^^^^^^^^^^^^^^^^
     = note: perhaps two different versions of crate `ratatui` are being used?
note: method defined here
    --> /home/d/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tui-logger-0.9.6/src/lib.rs:1318:12
     |
1318 |     pub fn border_type(mut self, border_type: BorderType) -> Self {
     |            ^^^^^^^^^^^

error[E0308]: mismatched types
    --> /home/d/.cargo/registry/src/index.crates.io-6f17d22bba15001f/systeroid-tui-0.4.3/src/ui.rs:493:16
     |
493  |         .style(colors.get_bg_style())
     |          ----- ^^^^^^^^^^^^^^^^^^^^^ expected `ratatui::style::Style`, found `Style`
     |          |
     |          arguments to this method are incorrect
     |
     = note: `Style` and `ratatui::style::Style` have similar names, but are actually distinct types
note: `Style` is defined in crate `ratatui`
    --> /home/d/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ratatui-0.22.0/src/style.rs:252:1
     |
252  | pub struct Style {
     | ^^^^^^^^^^^^^^^^
note: `ratatui::style::Style` is defined in crate `ratatui`
    --> /home/d/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ratatui-0.23.0/src/style.rs:253:1
     |
253  | pub struct Style {
     | ^^^^^^^^^^^^^^^^
     = note: perhaps two different versions of crate `ratatui` are being used?
note: method defined here
    --> /home/d/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tui-logger-0.9.6/src/lib.rs:1322:12
     |
1322 |     pub fn style(mut self, style: Style) -> Self {
     |            ^^^^^

error[E0277]: the trait bound `TuiLoggerSmartWidget<'_>: Widget` is not satisfied
   --> /home/d/.cargo/registry/src/index.crates.io-6f17d22bba15001f/systeroid-tui-0.4.3/src/ui.rs:501:25
    |
501 |     frame.render_widget(logger_widget, rect);
    |           ------------- ^^^^^^^^^^^^^ the trait `Widget` is not implemented for `TuiLoggerSmartWidget<'_>`
    |           |
    |           required by a bound introduced by this call
    |
    = help: the following other types implement trait `Widget`:
              Canvas<'a, F>
              LineGauge<'a>
              BarChart<'a>
              ratatui::widgets::Block<'a>
              Chart<'a>
              Clear
              Gauge<'a>
              List<'a>
            and 4 others
note: required by a bound in `Frame::<'a, B>::render_widget`
   --> /home/d/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ratatui-0.22.0/src/terminal.rs:89:12
    |
87  |     pub fn render_widget<W>(&mut self, widget: W, area: Rect)
    |            ------------- required by a bound in this associated function
88  |     where
89  |         W: Widget,
    |            ^^^^^^ required by this bound in `Frame::<'a, B>::render_widget`

Some errors have detailed explanations: E0277, E0308.
For more information about an error, try `rustc --explain E0277`.
error: could not compile `systeroid-tui` (lib) due to 10 previous errors
warning: build failed, waiting for other jobs to finish...
error: failed to compile `systeroid-tui v0.4.3`, intermediate artifacts can be found at `/tmp/cargo-installGz8EVJ`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.
orhun commented 1 year ago

I just released 0.4.4 which should fix this.

Thanks for reporting! 🐻