Coder Social home page Coder Social logo

Comments (4)

Tahinli avatar Tahinli commented on June 12, 2024 1

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

this works fine on my Ubuntu/Debian

from joshuto.

maximiliankolb avatar maximiliankolb commented on June 12, 2024

I can reproduce this:

  • $ podman run --rm -it docker.io/library/rust:1.70-bookworm
  • $ cargo install joshuto
error[E0308]: mismatched types
   --> /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/joshuto-0.9.5/src/ui/widgets/tui_file_preview.rs:44:45
    |
44  |                     buf.set_line(area.x, y, line, area.width);
    |                         --------            ^^^^ expected `ratatui::text::Line<'_>`, found `Line<'_>`
    |                         |
    |                         arguments to this method are incorrect
    |
    = note: `Line<'_>` and `ratatui::text::Line<'_>` have similar names, but are actually distinct types
note: `Line<'_>` is defined in crate `ratatui`
   --> /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/ratatui-0.24.0/src/text/line.rs:7:1
    |
7   | pub struct Line<'a> {
    | ^^^^^^^^^^^^^^^^^^^
note: `ratatui::text::Line<'_>` is defined in crate `ratatui`
   --> /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/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: method defined here
   --> /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/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` (bin "joshuto") due to previous error
error: failed to compile `joshuto v0.9.5`, intermediate artifacts can be found at `/tmp/cargo-installsHm6xN`
  • $ cargo install --git https://github.com/kamiyaa/joshuto.git within the same container works just fine:
...
   Compiling joshuto v0.9.5 (/usr/local/cargo/git/checkouts/joshuto-a6af16d32728ea1c/2796e82)
    Finished release [optimized] target(s) in 1m 45s
  Installing /usr/local/cargo/bin/joshuto
   Installed package `joshuto v0.9.5 (https://github.com/kamiyaa/joshuto.git#2796e82a)` (executable `joshuto`)

$ joshuto --version
joshuto-0.9.5

$ uname -a
Linux 23c043e966eb 6.5.9-200.fc38.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Oct 25 20:40:49 UTC 2023 x86_64 GNU/Linux

I am OK if you close this issue with "won't fix" because it's documented correctly in the README: https://github.com/kamiyaa/joshuto#for-single-user-with-cargo

from joshuto.

Tahinli avatar Tahinli commented on June 12, 2024

I can reproduce this:

* `$ podman run --rm -it docker.io/library/rust:1.70-bookworm`

* `$ cargo install joshuto`
error[E0308]: mismatched types
   --> /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/joshuto-0.9.5/src/ui/widgets/tui_file_preview.rs:44:45
    |
44  |                     buf.set_line(area.x, y, line, area.width);
    |                         --------            ^^^^ expected `ratatui::text::Line<'_>`, found `Line<'_>`
    |                         |
    |                         arguments to this method are incorrect
    |
    = note: `Line<'_>` and `ratatui::text::Line<'_>` have similar names, but are actually distinct types
note: `Line<'_>` is defined in crate `ratatui`
   --> /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/ratatui-0.24.0/src/text/line.rs:7:1
    |
7   | pub struct Line<'a> {
    | ^^^^^^^^^^^^^^^^^^^
note: `ratatui::text::Line<'_>` is defined in crate `ratatui`
   --> /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/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: method defined here
   --> /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/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` (bin "joshuto") due to previous error
error: failed to compile `joshuto v0.9.5`, intermediate artifacts can be found at `/tmp/cargo-installsHm6xN`
* `$ cargo install --git https://github.com/kamiyaa/joshuto.git` within the same container works just fine:
...
   Compiling joshuto v0.9.5 (/usr/local/cargo/git/checkouts/joshuto-a6af16d32728ea1c/2796e82)
    Finished release [optimized] target(s) in 1m 45s
  Installing /usr/local/cargo/bin/joshuto
   Installed package `joshuto v0.9.5 (https://github.com/kamiyaa/joshuto.git#2796e82a)` (executable `joshuto`)

$ joshuto --version
joshuto-0.9.5

$ uname -a
Linux 23c043e966eb 6.5.9-200.fc38.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Oct 25 20:40:49 UTC 2023 x86_64 GNU/Linux

I am OK if you close this issue with "won't fix" because it's documented correctly in the README: https://github.com/kamiyaa/joshuto#for-single-user-with-cargo

Can you try this inside of docker ?

rustup update

If I'm not wrong, it seems like some update issue.

from joshuto.

maximiliankolb avatar maximiliankolb commented on June 12, 2024

Thanks for your suggestion. I've tested this but to no avail:

$ podman run --rm -it docker.io/library/rust:1.70-bookworm

$ rustup update
$ cargo install joshuto
$ rustup update
$ cargo install joshuto

This results in the same error as above.

stdout from your suggestion (same before and after failed installation):

$ rustup update
info: no updatable toolchains installed
info: checking for self-update
info: cleaning up downloads & tmp directories

from joshuto.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.