spencerwi / cliflux

A terminal client for Miniflux RSS reader
MIT License
14 stars 3 forks source link

unresolved import `tuirealm::tui::text::Spans` #11

Closed 0atman closed 8 months ago

0atman commented 8 months ago

What am I doing wrong here? Thank you!

❯ cargo install cliflux
    Updating crates.io index
  Installing cliflux v1.4.1
    Updating crates.io index
   Compiling proc-macro2 v1.0.79
   Compiling unicode-ident v1.0.12
   Compiling libc v0.2.153
   Compiling cfg-if v1.0.0
   Compiling autocfg v1.2.0
   Compiling once_cell v1.19.0
   Compiling parking_lot_core v0.9.9
   Compiling scopeguard v1.2.0
   Compiling smallvec v1.13.2
   Compiling log v0.4.21
   Compiling version_check v0.9.4
   Compiling serde v1.0.197
   Compiling zerocopy v0.7.32
   Compiling memchr v2.7.2
   Compiling itoa v1.0.11
   Compiling allocator-api2 v0.2.16
   Compiling pin-project-lite v0.2.14
   Compiling syn v1.0.109
   Compiling ppv-lite86 v0.2.17
   Compiling pkg-config v0.3.30
   Compiling siphasher v0.3.11
   Compiling vcpkg v0.2.15
   Compiling cc v1.0.90
   Compiling futures-core v0.3.30
   Compiling bytes v1.6.0
   Compiling rustversion v1.0.14
   Compiling bitflags v2.5.0
   Compiling futures-sink v0.3.30
   Compiling signal-hook v0.3.17
   Compiling futures-task v0.3.30
   Compiling equivalent v1.0.1
   Compiling pin-utils v0.1.0
   Compiling ryu v1.0.17
   Compiling new_debug_unreachable v1.0.6
   Compiling futures-io v0.3.30
   Compiling tracing-core v0.1.32
   Compiling regex-syntax v0.8.3
   Compiling foreign-types-shared v0.1.1
   Compiling futures-channel v0.3.30
   Compiling openssl v0.10.64
   Compiling phf_shared v0.10.0
   Compiling fnv v1.0.7
   Compiling mac v0.1.1
   Compiling foreign-types v0.3.2
   Compiling futf v0.1.5
   Compiling heck v0.4.1
   Compiling httparse v1.8.0
   Compiling unicode-width v0.1.11
   Compiling paste v1.0.14
   Compiling tinyvec_macros v0.1.1
   Compiling utf-8 v0.7.6
   Compiling ahash v0.8.11
   Compiling precomputed-hash v0.1.1
   Compiling native-tls v0.2.11
   Compiling tinyvec v1.6.0
   Compiling percent-encoding v2.3.1
   Compiling either v1.10.0
   Compiling phf v0.10.1
   Compiling lock_api v0.4.11
   Compiling slab v0.4.9
   Compiling tendril v0.4.3
   Compiling openssl-probe v0.1.5
   Compiling thiserror v1.0.58
   Compiling try-lock v0.2.5
   Compiling static_assertions v1.1.0
   Compiling form_urlencoded v1.2.1
   Compiling unicode-bidi v0.3.15
   Compiling serde_json v1.0.115
   Compiling tower-service v0.3.2
   Compiling want v0.3.1
   Compiling tracing v0.1.40
   Compiling httpdate v1.0.3
   Compiling aho-corasick v1.1.3
   Compiling itertools v0.12.1
   Compiling http v0.2.12
   Compiling unicode-segmentation v1.11.0
   Compiling indoc v2.0.5
   Compiling cassowary v0.3.0
   Compiling winnow v0.5.40
   Compiling base64 v0.21.7
   Compiling smawk v0.3.2
   Compiling quote v1.0.35
   Compiling unicode-linebreak v0.1.5
   Compiling encoding_rs v0.8.33
   Compiling hashbrown v0.14.3
   Compiling mime v0.3.17
   Compiling sync_wrapper v0.1.2
   Compiling ipnet v2.9.0
   Compiling pathdiff v0.2.1
   Compiling stringreader v0.1.1
   Compiling syn v2.0.58
   Compiling rustls-pemfile v1.0.4
   Compiling textwrap v0.16.1
   Compiling signal-hook-registry v1.4.1
   Compiling getrandom v0.2.12
   Compiling mio v0.8.11
   Compiling num_cpus v1.16.0
   Compiling socket2 v0.5.6
   Compiling dirs-sys v0.3.7
   Compiling castaway v0.2.2
   Compiling open v3.2.0
   Compiling compact_str v0.7.1
   Compiling parking_lot v0.12.1
   Compiling rand_core v0.6.4
   Compiling unicode-normalization v0.1.23
   Compiling directories v4.0.1
   Compiling rand_chacha v0.3.1
   Compiling signal-hook-mio v0.2.3
   Compiling openssl-sys v0.9.102
   Compiling crossterm v0.27.0
   Compiling rand v0.8.5
   Compiling indexmap v2.2.6
   Compiling lru v0.12.3
   Compiling http-body v0.4.6
   Compiling idna v0.5.0
   Compiling regex-automata v0.4.6
   Compiling url v2.5.0
   Compiling phf_generator v0.10.0
   Compiling string_cache_codegen v0.5.2
   Compiling phf_codegen v0.10.0
   Compiling markup5ever v0.11.0
   Compiling regex v1.10.4
   Compiling serde_derive v1.0.197
   Compiling futures-macro v0.3.30
   Compiling tokio-macros v2.2.0
   Compiling openssl-macros v0.1.1
   Compiling strum_macros v0.26.2
   Compiling thiserror-impl v1.0.58
   Compiling lazy-regex-proc_macros v3.1.0
   Compiling html5ever v0.26.0
   Compiling stability v0.1.1
   Compiling tuirealm_derive v1.0.0
   Compiling tokio v1.37.0
   Compiling futures-util v0.3.30
   Compiling lazy-regex v3.1.0
   Compiling strum v0.26.2
   Compiling ratatui v0.26.1
   Compiling tuirealm v1.9.2
   Compiling futures-executor v0.3.30
   Compiling futures v0.3.30
   Compiling tui-realm-stdlib v1.3.2
   Compiling tokio-util v0.7.10
   Compiling tokio-native-tls v0.3.1
   Compiling string_cache v0.8.7
   Compiling serde_spanned v0.6.5
   Compiling toml_datetime v0.6.5
   Compiling serde_urlencoded v0.7.1
   Compiling toml_edit v0.19.15
   Compiling h2 v0.3.26
   Compiling xml5ever v0.17.0
   Compiling html2text v0.5.1
   Compiling toml v0.7.8
   Compiling hyper v0.14.28
   Compiling hyper-tls v0.5.0
   Compiling reqwest v0.11.27
   Compiling cliflux v1.4.1
error[E0432]: unresolved import `tuirealm::tui::text::Spans`
 --> /home/oatman/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cliflux-1.4.1/src/ui/components/read_entry_view.rs:2:178
  |
2 | ...:{Text, Span, Spans}, style::{Style, Modifier, Color}}, command::{Cmd, CmdResult, Di...
  |                  ^^^^^
  |                  |
  |                  no `Spans` in `text`
  |                  help: a similar name exists in the module: `Span`

error[E0061]: this function takes 2 arguments but 1 argument was supplied
   --> /home/oatman/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cliflux-1.4.1/src/ui/components/keyboard_help.rs:51:22
    |
51  |   ...   let widget = Table::new(
    |  ____________________^^^^^^^^^^-
52  | | ...       vec![
53  | | ...           Row::new(vec!["", "Global"]).style(Style::default().add_modifier(Modi...
54  | | ...           Row::new(vec!["", "q", "Quit", ""]),
...   |
82  | | ...       ]
83  | | ...   ).block(
    | |_______- an argument is missing
    |
note: associated function defined here
   --> /home/oatman/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ratatui-0.26.1/src/widgets/table/table.rs:263:12
    |
263 |     pub fn new<R, C>(rows: R, widths: C) -> Self
    |            ^^^
help: provide the argument
    |
51  ~         let widget = Table::new(vec![
52  +                 Row::new(vec!["", "Global"]).style(Style::default().add_modifier(Modifier::BOLD)),
53  +                 Row::new(vec!["", "q", "Quit", ""]),
54  +                 Row::new(vec!["", "?", "Show keyboard help", ""]),
55  +                 Row::new(vec![""]),
56  +
57  +                 Row::new(vec!["", "Unread/Starred Entries view"]).style(Style::default().add_modifier(Modifier::BOLD)),
58  +                 Row::new(vec!["", "j", "Scroll down"]),
59  +                 Row::new(vec!["", "Down arrow", "Scroll down"]),
60  +                 Row::new(vec!["", "k", "Scroll up"]),
61  +                 Row::new(vec!["", "Up arrow", "Scroll up"]),
62  +                 Row::new(vec!["", "m", "Mark as read/unread"]),
63  +                 Row::new(vec!["", "s", "Toggle starred"]),
64  +                 Row::new(vec!["", "Enter", "Read entry"]),
65  +                 Row::new(vec!["", "v", "Swap view (Unread Entries/Starred Entries)"]),
66  +                 Row::new(vec![""]),
67  +
68  +                 Row::new(vec!["", "Read entry view"]).style(Style::default().add_modifier(Modifier::BOLD)),
69  +                 Row::new(vec!["", "j", "Scroll down"]),
70  +                 Row::new(vec!["", "Down arrow", "Scroll down"]),
71  +                 Row::new(vec!["", "k", "Scroll up"]),
72  +                 Row::new(vec!["", "Up arrow", "Scroll up"]),
73  +                 Row::new(vec!["", "u", "Mark as unread"]),
74  +                 Row::new(vec!["", "s", "Toggle starred"]),
75  +                 Row::new(vec!["", "o", "Open in browser"]),
76  +                 Row::new(vec!["", "b", "Back to Unread Entries view"]),
77  +                 Row::new(vec![""]),
78  +
79  +                 Row::new(vec!["", "Keyboard help view"]).style(Style::default().add_modifier(Modifier::BOLD)),
80  +                 Row::new(vec!["", "Esc", "Close keyboard help"]),
81  ~             ], /* widths */).block(
    |

Some errors have detailed explanations: E0061, E0432.
For more information about an error, try `rustc --explain E0061`.
error: could not compile `cliflux` (bin "cliflux") due to 2 previous errors
error: failed to compile `cliflux v1.4.1`, intermediate artifacts can be found at `/tmp/cargo-installuETcWm`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.
0atman commented 8 months ago

But also:

❯ cargo install cliflux --locked
    Updating crates.io index
  Installing cliflux v1.4.1
    Updating crates.io index
warning: package `ahash v0.7.6` in Cargo.lock is yanked in registry `crates-io`, consider running without --locked
warning: package `hermit-abi v0.3.1` in Cargo.lock is yanked in registry `crates-io`, consider running without --locked
    Updating crates.io index
   Compiling proc-macro2 v1.0.60
   Compiling unicode-ident v1.0.9
   Compiling quote v1.0.28
   Compiling autocfg v1.1.0
   Compiling libc v0.2.146
   Compiling memchr v2.5.0
   Compiling cfg-if v1.0.0
   Compiling parking_lot_core v0.9.8
   Compiling smallvec v1.10.0
   Compiling once_cell v1.18.0
   Compiling scopeguard v1.1.0
   Compiling log v0.4.19
   Compiling serde v1.0.164
   Compiling pin-project-lite v0.2.9
   Compiling futures-core v0.3.28
   Compiling ppv-lite86 v0.2.17
   Compiling syn v1.0.109
   Compiling pkg-config v0.3.27
   Compiling siphasher v0.3.10
   Compiling cc v1.0.79
   Compiling vcpkg v0.2.15
   Compiling futures-sink v0.3.28
   Compiling bytes v1.4.0
   Compiling futures-task v0.3.28
   Compiling futures-channel v0.3.28
   Compiling version_check v0.9.4
   Compiling regex-syntax v0.7.2
   Compiling futures-util v0.3.28
   Compiling itoa v1.0.6
   Compiling pin-utils v0.1.0
   Compiling futures-io v0.3.28
   Compiling new_debug_unreachable v1.0.4
   Compiling signal-hook v0.3.15
   Compiling fnv v1.0.7
   Compiling foreign-types-shared v0.1.1
   Compiling mac v0.1.1
   Compiling openssl v0.10.60
   Compiling tracing-core v0.1.31
   Compiling futf v0.1.5
   Compiling foreign-types v0.3.2
   Compiling httparse v1.8.0
   Compiling native-tls v0.2.11
   Compiling phf_shared v0.10.0
   Compiling precomputed-hash v0.1.1
   Compiling utf-8 v0.7.6
   Compiling unicode-width v0.1.10
   Compiling bitflags v2.4.1
   Compiling equivalent v1.0.1
   Compiling hashbrown v0.14.3
   Compiling tinyvec_macros v0.1.1
   Compiling try-lock v0.2.4
   Compiling openssl-probe v0.1.5
   Compiling thiserror v1.0.40
   Compiling phf v0.10.1
   Compiling lock_api v0.4.10
   Compiling slab v0.4.8
   Compiling tokio v1.28.2
   Compiling indexmap v1.9.3
   Compiling ahash v0.7.6
   Compiling tendril v0.4.3
   Compiling tinyvec v1.6.0
   Compiling percent-encoding v2.3.0
   Compiling bitflags v1.3.2
   Compiling want v0.3.1
   Compiling hashbrown v0.12.3
   Compiling ryu v1.0.13
   Compiling httpdate v1.0.2
   Compiling cassowary v0.3.0
   Compiling serde_json v1.0.97
   Compiling tower-service v0.3.2
   Compiling http v0.2.9
   Compiling form_urlencoded v1.2.0
   Compiling unicode-segmentation v1.10.1
   Compiling unicode-bidi v0.3.13
   Compiling tracing v0.1.37
   Compiling winnow v0.4.7
   Compiling smawk v0.3.1
   Compiling encoding_rs v0.8.32
   Compiling mime v0.3.17
   Compiling base64 v0.21.2
   Compiling ipnet v2.7.2
   Compiling pathdiff v0.2.1
   Compiling aho-corasick v1.0.2
   Compiling open v3.2.0
   Compiling stringreader v0.1.1
   Compiling syn v2.0.18
   Compiling getrandom v0.2.10
   Compiling signal-hook-registry v1.4.1
   Compiling mio v0.8.8
   Compiling num_cpus v1.15.0
   Compiling socket2 v0.4.9
   Compiling indexmap v2.1.0
   Compiling dirs-sys v0.3.7
   Compiling openssl-sys v0.9.96
   Compiling rand_core v0.6.4
   Compiling parking_lot v0.12.1
   Compiling directories v4.0.1
error[E0635]: unknown feature `stdsimd`
  --> /home/oatman/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ahash-0.7.6/src/lib.rs:33:42
   |
33 | #![cfg_attr(feature = "stdsimd", feature(stdsimd))]
   |                                          ^^^^^^^

   Compiling rand_chacha v0.3.1
   Compiling unicode-normalization v0.1.22
For more information about this error, try `rustc --explain E0635`.
error: could not compile `ahash` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
error: failed to compile `cliflux v1.4.1`, intermediate artifacts can be found at `/tmp/cargo-installW35MlJ`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.
spencerwi commented 8 months ago

Hmm. It looks like some of my dependencies have changed out from under me since I last did a cargo install on this project. I'll dig into this when time permits, sorry for the blocker here!

spencerwi commented 8 months ago

Could you provide the output of cargo --version and rustc --version? That might help in debugging here.

0atman commented 8 months ago

No problem at all, thank you for making the client!

❯ rustc --version
rustc 1.79.0-nightly (385fa9d84 2024-04-04)

❯ cargo --version
cargo 1.79.0-nightly (0637083df 2024-04-02)

Well thank you very much! :smiley:

0atman commented 8 months ago

(same error on stable)

spencerwi commented 8 months ago

Looks like some breaking changes happened to ratatui and tuirealm.

I'm pushing up some compatibility fixes, I think v1.4.2 should work now.

0atman commented 8 months ago

Works great! Thank you so much! I've got an unrelated question, but I'll open another issue. :smile: