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

v0.25 does not install via cargo install #2090

Closed
twirrim opened this issue Feb 21, 2024 · 6 comments
Closed

v0.25 does not install via cargo install #2090

twirrim opened this issue Feb 21, 2024 · 6 comments
Labels
documentation Improvements or additions to documentation
Milestone

Comments

@twirrim
Copy link

twirrim commented Feb 21, 2024

Describe the bug
On trying to upgrade gitui, it's failing to compile, due to a few different issues in the gitui code.

To Reproduce
Steps to reproduce the behavior:

  1. cargo install gitui

Expected behavior
gitui compiles and installs

Screenshots

error[E0308]: mismatched types
    --> /home/<redacted>/.cargo/registry/src/index.crates.io-6f17d22bba15001f/gitui-0.25.0/src/components/textinput.rs:151:28
     |
151  |                 .set_cursor_line_style(self.theme.text(true, false));
     |                  --------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `ratatui::style::Style`, found a different `ratatui::style::Style`
     |                  |
     |                  arguments to this method are incorrect
     |
     = note: `ratatui::style::Style` and `ratatui::style::Style` have similar names, but are actually distinct types
note: `ratatui::style::Style` is defined in crate `ratatui`
    --> /home/<redacted>/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ratatui-0.24.0/src/style.rs:192:1
     |
192  | pub struct Style {
     | ^^^^^^^^^^^^^^^^
note: `ratatui::style::Style` is defined in crate `ratatui`
    --> /home/<redacted>/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ratatui-0.26.1/src/style.rs:227:1
     |
227  | pub struct Style {
     | ^^^^^^^^^^^^^^^^
     = note: perhaps two different versions of crate `ratatui` are being used?
note: method defined here
    --> /home/<redacted>/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tui-textarea-0.4.0/src/textarea.rs:1770:12
     |
1770 |     pub fn set_cursor_line_style(&mut self, style: Style) {
     |            ^^^^^^^^^^^^^^^^^^^^^

error[E0308]: mismatched types
    --> /home/<redacted>/.cargo/registry/src/index.crates.io-6f17d22bba15001f/gitui-0.25.0/src/components/textinput.rs:154:5
     |
153  |               text_area.set_placeholder_style(
     |                         --------------------- arguments to this method are incorrect
154  | /                 self.theme
155  | |                     .text(self.selected.unwrap_or_default(), false),
     | |___________________________________________________________________^ expected `ratatui::style::Style`, found a different `ratatui::style::Style`
     |
     = note: `ratatui::style::Style` and `ratatui::style::Style` have similar names, but are actually distinct types
note: `ratatui::style::Style` is defined in crate `ratatui`
    --> /home/<redacted>/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ratatui-0.24.0/src/style.rs:192:1
     |
192  | pub struct Style {
     | ^^^^^^^^^^^^^^^^
note: `ratatui::style::Style` is defined in crate `ratatui`
    --> /home/<redacted>/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ratatui-0.26.1/src/style.rs:227:1
     |
227  | pub struct Style {
     | ^^^^^^^^^^^^^^^^
     = note: perhaps two different versions of crate `ratatui` are being used?
note: method defined here
    --> /home/<redacted>/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tui-textarea-0.4.0/src/textarea.rs:1850:12
     |
1850 |     pub fn set_placeholder_style(&mut self, style: Style) {
     |            ^^^^^^^^^^^^^^^^^^^^^

error[E0308]: mismatched types
    --> /home/<redacted>/.cargo/registry/src/index.crates.io-6f17d22bba15001f/gitui-0.25.0/src/components/textinput.rs:158:5
     |
157  |             text_area.set_style(
     |                       --------- arguments to this method are incorrect
158  |                 self.theme.text(self.selected.unwrap_or(true), false),
     |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `ratatui::style::Style`, found a different `ratatui::style::Style`
     |
     = note: `ratatui::style::Style` and `ratatui::style::Style` have similar names, but are actually distinct types
note: `ratatui::style::Style` is defined in crate `ratatui`
    --> /home/<redacted>/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ratatui-0.24.0/src/style.rs:192:1
     |
192  | pub struct Style {
     | ^^^^^^^^^^^^^^^^
note: `ratatui::style::Style` is defined in crate `ratatui`
    --> /home/<redacted>/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ratatui-0.26.1/src/style.rs:227:1
     |
227  | pub struct Style {
     | ^^^^^^^^^^^^^^^^
     = note: perhaps two different versions of crate `ratatui` are being used?
note: method defined here
    --> /home/<redacted>/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tui-textarea-0.4.0/src/textarea.rs:1629:12
     |
1629 |     pub fn set_style(&mut self, style: Style) {
     |            ^^^^^^^^^

error[E0308]: mismatched types
    --> /home/<redacted>/.cargo/registry/src/index.crates.io-6f17d22bba15001f/gitui-0.25.0/src/components/textinput.rs:163:6
     |
162  |                   text_area.set_block(
     |                             --------- arguments to this method are incorrect
163  | /                     Block::default()
164  | |                         .borders(Borders::ALL)
165  | |                         .border_style(
166  | |                             ratatui::style::Style::default()
...    |
170  | |                         )
171  | |                         .title(self.title.clone()),
     | |__________________________________________________^ expected `ratatui::widgets::block::Block<'_>`, found `ratatui::widgets::Block<'_>`
     |
     = note: `ratatui::widgets::Block<'_>` and `ratatui::widgets::block::Block<'_>` have similar names, but are actually distinct types
note: `ratatui::widgets::Block<'_>` is defined in crate `ratatui`
    --> /home/<redacted>/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ratatui-0.24.0/src/widgets/block.rs:230:1
     |
230  | pub struct Block<'a> {
     | ^^^^^^^^^^^^^^^^^^^^
note: `ratatui::widgets::block::Block<'_>` is defined in crate `ratatui`
    --> /home/<redacted>/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ratatui-0.26.1/src/widgets/block.rs:64:1
     |
64   | pub struct Block<'a> {
     | ^^^^^^^^^^^^^^^^^^^^
     = note: perhaps two different versions of crate `ratatui` are being used?
note: method defined here
    --> /home/<redacted>/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tui-textarea-0.4.0/src/textarea.rs:1648:12
     |
1648 |     pub fn set_block(&mut self, block: Block<'a>) {
     |            ^^^^^^^^^

error[E0277]: the trait bound `impl ratatui::widgets::Widget + '_: Widget` is not satisfied
   --> /home/<redacted>/.cargo/registry/src/index.crates.io-6f17d22bba15001f/gitui-0.25.0/src/components/textinput.rs:638:20
    |
638 |             f.render_widget(ta.widget(), area);
    |               ------------- ^^^^^^^^^^^ the trait `Widget` is not implemented for `impl ratatui::widgets::Widget + '_`
    |               |
    |               required by a bound introduced by this call
    |
    = help: the following other types implement trait `Widget`:
              BarChart<'a>
              ratatui::widgets::Block<'a>
              Canvas<'a, F>
              Chart<'a>
              ratatui::widgets::Clear
              Gauge<'a>
              LineGauge<'a>
              ratatui::widgets::List<'a>
            and 4 others
note: required by a bound in `ratatui::Frame::<'_>::render_widget`
   --> /home/<redacted>/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ratatui-0.24.0/src/terminal.rs:598:12
    |
596 |     pub fn render_widget<W>(&mut self, widget: W, area: Rect)
    |            ------------- required by a bound in this associated function
597 |     where
598 |         W: Widget,
    |            ^^^^^^ required by this bound in `Frame::<'_>::render_widget`

Some errors have detailed explanations: E0277, E0308.
For more information about an error, try `rustc --explain E0277`.
error: could not compile `gitui` (bin "gitui") due to 5 previous errors

Context (please complete the following information):

  • OS/Distro + Version: Ubuntu 23.10
  • GitUI Version: 0.25.0
  • Rust version: 1.76.0 (07dca489a 2024-02-04)

Previous version of gitui, v0.24.3, compiled and installed fine.

@twirrim twirrim added the bug Something isn't working label Feb 21, 2024
@extrawurst
Copy link
Collaborator

please install via cargo install gitui --locked see #2079 (comment) where this came up already.

also note how this was fixed in the readme via 4da1cc4

@extrawurst extrawurst changed the title v0.25 not compiling, complaining about type errors v0.25 does not install via cargo install Feb 21, 2024
@extrawurst extrawurst added documentation Improvements or additions to documentation and removed bug Something isn't working labels Feb 21, 2024
@extrawurst
Copy link
Collaborator

but yeah this trips up enough people to warrant a patch release probably

@extrawurst extrawurst added this to the v0.25.1 milestone Feb 21, 2024
@extrawurst
Copy link
Collaborator

extrawurst commented Feb 21, 2024

it is technically fixed already by pinning ratatui version via 5cff322 but yeah cargo install will not use master and requires a new release.

going to wait if there is more stuff popping up before cutting a patch release maybe tomorrow.

leaving this issue open till then

@extrawurst
Copy link
Collaborator

released as 0.25.1 see https://crates.io/crates/gitui/0.25.1

@ximex
Copy link

ximex commented Feb 24, 2024

still see this errors:

error[E0308]: mismatched types
    --> /home/ximex/.cargo/registry/src/index.crates.io-6f17d22bba15001f/gitui-0.25.1/src/components/textinput.rs:151:28
     |
151  |                 .set_cursor_line_style(self.theme.text(true, false));
     |                  --------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `ratatui::style::Style`, found a different `ratatui::style::Style`
     |                  |
     |                  arguments to this method are incorrect
     |
     = note: `ratatui::style::Style` and `ratatui::style::Style` have similar names, but are actually distinct types
note: `ratatui::style::Style` is defined in crate `ratatui`
    --> /home/ximex/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ratatui-0.24.0/src/style.rs:192:1
     |
192  | pub struct Style {
     | ^^^^^^^^^^^^^^^^
note: `ratatui::style::Style` is defined in crate `ratatui`
    --> /home/ximex/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ratatui-0.26.1/src/style.rs:227:1
     |
227  | pub struct Style {
     | ^^^^^^^^^^^^^^^^
     = note: perhaps two different versions of crate `ratatui` are being used?
note: method defined here
    --> /home/ximex/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tui-textarea-0.4.0/src/textarea.rs:1770:12
     |
1770 |     pub fn set_cursor_line_style(&mut self, style: Style) {
     |            ^^^^^^^^^^^^^^^^^^^^^

error[E0308]: mismatched types
    --> /home/ximex/.cargo/registry/src/index.crates.io-6f17d22bba15001f/gitui-0.25.1/src/components/textinput.rs:154:5
     |
153  |               text_area.set_placeholder_style(
     |                         --------------------- arguments to this method are incorrect
154  | /                 self.theme
155  | |                     .text(self.selected.unwrap_or_default(), false),
     | |___________________________________________________________________^ expected `ratatui::style::Style`, found a different `ratatui::style::Style`
     |
     = note: `ratatui::style::Style` and `ratatui::style::Style` have similar names, but are actually distinct types
note: `ratatui::style::Style` is defined in crate `ratatui`
    --> /home/ximex/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ratatui-0.24.0/src/style.rs:192:1
     |
192  | pub struct Style {
     | ^^^^^^^^^^^^^^^^
note: `ratatui::style::Style` is defined in crate `ratatui`
    --> /home/ximex/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ratatui-0.26.1/src/style.rs:227:1
     |
227  | pub struct Style {
     | ^^^^^^^^^^^^^^^^
     = note: perhaps two different versions of crate `ratatui` are being used?
note: method defined here
    --> /home/ximex/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tui-textarea-0.4.0/src/textarea.rs:1850:12
     |
1850 |     pub fn set_placeholder_style(&mut self, style: Style) {
     |            ^^^^^^^^^^^^^^^^^^^^^

error[E0308]: mismatched types
    --> /home/ximex/.cargo/registry/src/index.crates.io-6f17d22bba15001f/gitui-0.25.1/src/components/textinput.rs:158:5
     |
157  |             text_area.set_style(
     |                       --------- arguments to this method are incorrect
158  |                 self.theme.text(self.selected.unwrap_or(true), false),
     |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `ratatui::style::Style`, found a different `ratatui::style::Style`
     |
     = note: `ratatui::style::Style` and `ratatui::style::Style` have similar names, but are actually distinct types
note: `ratatui::style::Style` is defined in crate `ratatui`
    --> /home/ximex/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ratatui-0.24.0/src/style.rs:192:1
     |
192  | pub struct Style {
     | ^^^^^^^^^^^^^^^^
note: `ratatui::style::Style` is defined in crate `ratatui`
    --> /home/ximex/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ratatui-0.26.1/src/style.rs:227:1
     |
227  | pub struct Style {
     | ^^^^^^^^^^^^^^^^
     = note: perhaps two different versions of crate `ratatui` are being used?
note: method defined here
    --> /home/ximex/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tui-textarea-0.4.0/src/textarea.rs:1629:12
     |
1629 |     pub fn set_style(&mut self, style: Style) {
     |            ^^^^^^^^^

error[E0308]: mismatched types
    --> /home/ximex/.cargo/registry/src/index.crates.io-6f17d22bba15001f/gitui-0.25.1/src/components/textinput.rs:163:6
     |
162  |                   text_area.set_block(
     |                             --------- arguments to this method are incorrect
163  | /                     Block::default()
164  | |                         .borders(Borders::ALL)
165  | |                         .border_style(
166  | |                             ratatui::style::Style::default()
...    |
170  | |                         )
171  | |                         .title(self.title.clone()),
     | |__________________________________________________^ expected `Block<'_>`, found `ratatui::widgets::Block<'_>`
     |
     = note: `ratatui::widgets::Block<'_>` and `Block<'_>` have similar names, but are actually distinct types
note: `ratatui::widgets::Block<'_>` is defined in crate `ratatui`
    --> /home/ximex/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ratatui-0.24.0/src/widgets/block.rs:230:1
     |
230  | pub struct Block<'a> {
     | ^^^^^^^^^^^^^^^^^^^^
note: `Block<'_>` is defined in crate `ratatui`
    --> /home/ximex/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ratatui-0.26.1/src/widgets/block.rs:64:1
     |
64   | pub struct Block<'a> {
     | ^^^^^^^^^^^^^^^^^^^^
     = note: perhaps two different versions of crate `ratatui` are being used?
note: method defined here
    --> /home/ximex/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tui-textarea-0.4.0/src/textarea.rs:1648:12
     |
1648 |     pub fn set_block(&mut self, block: Block<'a>) {
     |            ^^^^^^^^^

error[E0277]: the trait bound `impl ratatui::widgets::Widget + '_: Widget` is not satisfied
   --> /home/ximex/.cargo/registry/src/index.crates.io-6f17d22bba15001f/gitui-0.25.1/src/components/textinput.rs:638:20
    |
638 |             f.render_widget(ta.widget(), area);
    |               ------------- ^^^^^^^^^^^ the trait `Widget` is not implemented for `impl ratatui::widgets::Widget + '_`
    |               |
    |               required by a bound introduced by this call
    |
    = help: the following other types implement trait `Widget`:
              BarChart<'a>
              ratatui::widgets::Block<'a>
              Canvas<'a, F>
              Chart<'a>
              ratatui::widgets::Clear
              Gauge<'a>
              LineGauge<'a>
              ratatui::widgets::List<'a>
            and 4 others
note: required by a bound in `ratatui::Frame::<'_>::render_widget`
   --> /home/ximex/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ratatui-0.24.0/src/terminal.rs:598:12
    |
596 |     pub fn render_widget<W>(&mut self, widget: W, area: Rect)
    |            ------------- required by a bound in this associated function
597 |     where
598 |         W: Widget,
    |            ^^^^^^ required by this bound in `Frame::<'_>::render_widget`

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

@extrawurst
Copy link
Collaborator

See #2098

@nuke-web3 nuke-web3 mentioned this issue Mar 25, 2024
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

3 participants