veeso / termscp

🖥 A feature rich terminal UI file transfer and explorer with support for SCP/SFTP/FTP/S3/SMB
https://termscp.veeso.dev
MIT License
1.65k stars 48 forks source link

[BUG] - Failing to build tui-realm-stdlib crate component on rust 1.76 #237

Closed hlmtre closed 7 months ago

hlmtre commented 7 months ago

Description

Can't build the latest release on Debian 11, rust version 1.76

Steps to reproduce

cargo install termscp

Expected behaviour

Application builds successfully

Environment

Log

   Compiling tui-realm-stdlib v1.3.1                                                                                              error[E0061]: this function takes 2 arguments but 1 argument was supplied                                                            --> /home/hlmtre/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tui-realm-stdlib-1.3.1/src/components/table.rs:351:29
    |
351 |             let mut table = TuiTable::new(rows)
    |                             ^^^^^^^^^^^^^------ an argument is missing
    |
note: associated function defined here
   --> /home/hlmtre/.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
    |
351 |             let mut table = TuiTable::new(rows, /* widths */)
    |                                          ~~~~~~~~~~~~~~~~~~~~

error[E0277]: the trait bound `tuirealm::tui::text::Text<'_>: From<&std::string::String>` is not satisfied
   --> /home/hlmtre/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tui-realm-stdlib-1.3.1/src/components/table.rs:373:48
    |
373 |                 table = table.highlight_symbol(hg_str);
    |                               ---------------- ^^^^^^ the trait `From<&std::string::String>` is not implemented for `tuirealm::tui::text::Text<'_>`
    |                               |
    |                               required by a bound introduced by this call
    |
    = help: the following other types implement trait `From<T>`:
              <tuirealm::tui::text::Text<'a> as From<&'a Masked<'_>>>
              <tuirealm::tui::text::Text<'a> as From<Masked<'a>>>
              <tuirealm::tui::text::Text<'a> as From<std::string::String>>
              <tuirealm::tui::text::Text<'a> as From<&'a str>>
              <tuirealm::tui::text::Text<'a> as From<Cow<'a, str>>>
              <tuirealm::tui::text::Text<'a> as From<tuirealm::tui::text::Span<'a>>>
              <tuirealm::tui::text::Text<'a> as From<tuirealm::tui::text::Line<'a>>>
              <tuirealm::tui::text::Text<'a> as From<std::vec::Vec<tuirealm::tui::text::Line<'a>>>>
    = note: required for `&std::string::String` to implement `Into<tuirealm::tui::text::Text<'_>>`
note: required by a bound in `tuirealm::tui::widgets::Table::<'a>::highlight_symbol`
   --> /home/hlmtre/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ratatui-0.26.1/src/widgets/table/table.rs:501:32
    |
501 |     pub fn highlight_symbol<T: Into<Text<'a>>>(mut self, highlight_symbol: T) -> Self {
    |                                ^^^^^^^^^^^^^^ required by this bound in `Table::<'a>::highlight_symbol`

Some errors have detailed explanations: E0061, E0277.
For more information about an error, try `rustc --explain E0061`.
error: could not compile `tui-realm-stdlib` (lib) due to 2 previous errors
warning: build failed, waiting for other jobs to finish...

Additional information

Obviously not really a bug specific to termscp but maybe a locked prior version or requiring a previous rust version will fix it.

veeso commented 7 months ago

Probably tui-realm-stdlib is broken after the update to ratatui 0.26.

In the meantime you can try to build termscp with --locked arg

hlmtre commented 7 months ago

Oh, great. That did indeed work. Thank you!

On Mon, Mar 4, 2024 at 9:57 AM Christian Visintin @.***> wrote:

Probably tui-realm-stdlib is broken after the update to ratatui 0.26.

In the meantime you can try to build termscp with --locked arg

— Reply to this email directly, view it on GitHub https://github.com/veeso/termscp/issues/237#issuecomment-1977155419, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADNGGIWHRBIRVU5WS4IOV3YWSY2FAVCNFSM6AAAAABEFUBBRGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNZXGE2TKNBRHE . You are receiving this because you authored the thread.Message ID: @.***>

veeso commented 7 months ago

fixed with tui-realm-stdlib 1.3.2