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

joshuto compile error #371

Closed
og900aero opened this issue Jul 20, 2023 · 12 comments
Closed

joshuto compile error #371

og900aero opened this issue Jul 20, 2023 · 12 comments
Labels
bug Something isn't working

Comments

@og900aero
Copy link

I want build/compile joshuto on Debian unstable. I type the following commands:

  1. sudo cargo build
  2. sudo cargo install --path=. --force

And I get the following error messages on the end:

error[E0308]: mismatched types
   --> src/ui/widgets/tui_file_preview.rs:44:45
    |
44  |                     buf.set_line(area.x, y, line, area.width);
    |                         --------            ^^^^ expected struct `ratatui::text::Line`, found struct `ratatui::text::line::Line`
    |                         |
    |                         arguments to this function are incorrect
    |
    = note: struct `ratatui::text::line::Line` and struct `ratatui::text::Line` have similar names, but are actually distinct types
note: struct `ratatui::text::line::Line` is defined in crate `ratatui`
   --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/ratatui-0.22.0/src/text/line.rs:8:1
    |
8   | pub struct Line<'a> {
    | ^^^^^^^^^^^^^^^^^^^
note: struct `ratatui::text::Line` is defined in crate `ratatui`
   --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/ratatui-0.21.0/src/text/line.rs:6:1
    |
6   | pub struct Line<'a> {
    | ^^^^^^^^^^^^^^^^^^^
    = note: perhaps two different versions of crate `ratatui` are being used?
note: associated function defined here
   --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/ratatui-0.21.0/src/buffer.rs:333:12
    |
333 |     pub fn set_line(&mut self, x: u16, y: u16, line: &Line<'_>, width: u16) -> (u16, u16) {
    |            ^^^^^^^^

For more information about this error, try `rustc --explain E0308`.
error: could not compile `joshuto` due to previous error
error: failed to compile `joshuto v0.9.5 (https://github.com/kamiyaa/joshuto.git#a8dca77e)`, intermediate artifacts can be found at `/tmp/cargo-installxNDZMN`
@S1M1S
Copy link

S1M1S commented Jul 21, 2023

Exact same error here when running cargo install-update joshuto

@hotleave
Copy link

I have the same error when install with cargo install --path . --force,but cargo build --release is OK,so just copy target/release/joshuto to ~/.cargo/bin,and done

@og900aero
Copy link
Author

I have the same error when install with cargo install --path . --force,but cargo build --release is OK,so just copy target/release/joshuto to ~/.cargo/bin,and done

Thx. Working great.

@kamiyaa
Copy link
Owner

kamiyaa commented Jul 23, 2023

Should be fixed in 715b5fb

@kamiyaa kamiyaa added the bug Something isn't working label Jul 23, 2023
@S1M1S
Copy link

S1M1S commented Jul 23, 2023

cargo install --git https://github.com/kamiyaa/joshuto/ --branch main working with no errors for me

@og900aero
Copy link
Author

Should be fixed in 715b5fb

I try, but not work.

@kamiyaa
Copy link
Owner

kamiyaa commented Jul 30, 2023

Should be fixed in 715b5fb

I try, but not work.

Whats the error?

@og900aero
Copy link
Author

Should be fixed in 715b5fb

I try, but not work.

Whats the error?

Same the first comment.

@xfzv
Copy link
Contributor

xfzv commented Aug 7, 2023

Can confirm I'm also getting the error reported by OP with cargo install joshuto.

@EvanCarroll
Copy link

The version on cargo is 0.9.5, which doesn't have the fix in 715b5fb. So cargo install joshuto won't work yet, use the previously provided command

cargo install --git https://github.com/kamiyaa/joshuto/ --branch main

for now until @kamiyaa pushes out a new version.

@ubuntupunk
Copy link

bump on raspberry pi

@og900aero
Copy link
Author

cargo intall --locked xplr works.

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

7 participants