Comments (4)
cargo install --git https://github.com/kamiyaa/joshuto.git
this works fine on my Ubuntu/Debian
from joshuto.
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.
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.
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)
- Latest release doesn't build HOT 1
- v0.9.7 - `Cargo.toml` does not match `Cargo.lock` HOT 2
- feature request: change, simplify joshuto image preview HOT 2
- [BUG] Fatal crash when I return to joshuto from a shell HOT 4
- Use of `--change-directory` command line argument? HOT 1
- Configure ratatui-image preview background/frame color.
- [BUG] Linemode 'sizemtime' unknown. HOT 1
- [FEATURE] More linemodes and sort modes
- linux gnu build error
- Directory chooser HOT 2
- [Help wanted] Creating a custom script to use joshuto to control imv. HOT 1
- Feature request: delete colon to exit command mode
- Feature request: implement scrollable preview area HOT 2
- [Bug] File preview(with bat) does not update after file modification with vim
- Feature request: Add options to pre-select a file on start HOT 2
- Unable to select neovim config with NVIM_APPNAME environment variable
- Feature Request: add more useful variables for shell/spawn commands HOT 1
- Feature request: keybinding `v` by default to mark all files / folders in current view
- Feature request: add `bat` as fallback for viewing HTML / JSON in `preview_file.sh`
- symlink not work on macos
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from joshuto.