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 install failed #70

Open
tjex opened this issue May 29, 2024 · 2 comments
Open

cargo install failed #70

tjex opened this issue May 29, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@tjex
Copy link

tjex commented May 29, 2024

OS/Arch: Darwin arm64

cargo install nostui

error[E0308]: mismatched types
    --> /Users/tjex/.local/share/cargo/registry/src/index.crates.io-6f17d22bba15001f/nostui-0.1.0/src/components/home.rs:287:34
     |
287  |             self.input.set_block(block);
     |                        --------- ^^^^^ expected `ratatui::widgets::block::Block<'_>`, found `ratatui::widgets::Block<'_>`
     |                        |
     |                        arguments to this method are incorrect
     |
     = 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`
    --> /Users/tjex/.local/share/cargo/registry/src/index.crates.io-6f17d22bba15001f/ratatui-0.25.0/src/widgets/block.rs:233:1
     |
233  | pub struct Block<'a> {
     | ^^^^^^^^^^^^^^^^^^^^
note: `ratatui::widgets::block::Block<'_>` is defined in crate `ratatui`
    --> /Users/tjex/.local/share/cargo/registry/src/index.crates.io-6f17d22bba15001f/ratatui-0.26.3/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
    --> /Users/tjex/.local/share/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 + '_: ratatui::widgets::Widget` is not satisfied
   --> /Users/tjex/.local/share/cargo/registry/src/index.crates.io-6f17d22bba15001f/nostui-0.1.0/src/components/home.rs:288:29
    |
288 |             f.render_widget(self.input.widget(), input_area);
    |               ------------- ^^^^^^^^^^^^^^^^^^^ the trait `ratatui::widgets::Widget` is not implemented for `impl ratatui::widgets::Widget + '_`
    |               |
    |               required by a bound introduced by this call
    |
    = help: the following other types implement trait `ratatui::widgets::Widget`:
              text_note::TextNote
              BarChart<'a>
              ratatui::widgets::Block<'a>
              Canvas<'a, F>
              Chart<'a>
              ratatui::widgets::Clear
              Gauge<'a>
              LineGauge<'a>
            and 5 others
note: required by a bound in `ratatui::Frame::<'_>::render_widget`
   --> /Users/tjex/.local/share/cargo/registry/src/index.crates.io-6f17d22bba15001f/ratatui-0.25.0/src/terminal.rs:614:12
    |
612 |     pub fn render_widget<W>(&mut self, widget: W, area: Rect)
    |            ------------- required by a bound in this associated function
613 |     where
614 |         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 `nostui` (bin "nostui") due to 2 previous errors
error: failed to compile `nostui v0.1.0`, intermediate artifacts can be found at `/var/folders/45/5qcnyymn0gj_241x_c9trs1m0000gn/T/cargo-installT0JXBu`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.
@akiomik akiomik added the bug Something isn't working label May 31, 2024
@akiomik akiomik self-assigned this May 31, 2024
@akiomik
Copy link
Owner

akiomik commented May 31, 2024

Thank you for your reporting

@asoltys
Copy link

asoltys commented Sep 18, 2024

I also just ran into this trying to cargo install on my PopOS laptop (x86_64)

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

3 participants