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

[BUG] Fails to build with ratatui #289

Closed
yonas opened this issue Jun 17, 2023 · 2 comments
Closed

[BUG] Fails to build with ratatui #289

yonas opened this issue Jun 17, 2023 · 2 comments
Labels
type/build-error Won't build or is panicking.

Comments

@yonas
Copy link

yonas commented Jun 17, 2023

Describe the bug
Lateset version fails to compile. I've tried both on FreeBSD 13.2 and Ubuntu 23.04.

To Reproduce
Steps to reproduce the behavior:

  1. cargo install --git https://github.com/Macchina-CLI/macchina

Expected behavior
Build should not fail.

Screenshots

  Compiling sqlite3-src v0.4.0
    Compiling libgit2-sys v0.14.2+1.5.1
     Building [======================>  ] 162/176: sqlite3-src(build), libgit2-sys(build)                                                                                                                           
    Building [======================>  ] 163/176: sqlite3-src, libgit2-sys(build)                                                                                                                                  
    Building [======================>  ] 164/176: libgit2-sys, sqlite3-src                                                                                                                                         
�[K   Compiling sqlite3-sys v0.14.0
     Building [======================>  ] 164/176: sqlite3-sys, libgit2-sys, sqlite3-src                                                                                                                            
    Building [======================>  ] 165/176: sqlite3-sys, libgit2-sys                                                                                                                                         
�[K   Compiling sqlite v0.27.3
     Building [======================>  ] 165/176: sqlite3-sys, libgit2-sys, sqlite                                                                                                                                 
    Building [======================>  ] 166/176: libgit2-sys, sqlite                                                                                                                                              
�[K   Compiling git2 v0.16.1
     Building [======================>  ] 166/176: libgit2-sys, sqlite, git2                                                                                                                                        
    Building [======================>  ] 167/176: sqlite, git2                                                                                                                                                     
    Building [======================>  ] 168/176: git2                                                                                                                                                             
�[K   Compiling vergen v7.5.1
     Building [======================>  ] 168/176: vergen, git2                                                                                                                                                     
    Building [=======================> ] 169/176: vergen                                                                                                                                                           
�[K   Compiling libmacchina v7.1.0
    Compiling macchina v6.1.8 (/data/make-cd/files/macchina)
     Building [=======================> ] 170/176: libmacchina(build.rs), macchina(build.rs)                                                                                                                        
    Building [=======================> ] 171/176: libmacchina(build), macchina(build.rs)                                                                                                                           
    Building [=======================> ] 172/176: libmacchina, macchina(build.rs)                                                                                                                                  
    Building [=======================> ] 173/176: libmacchina, macchina(build)                                                                                                                                     
    Building [=======================> ] 174/176: libmacchina                                                                                                                                                      
    Building [=======================> ] 175/176: macchina(bin)                                                                                                                                                    
�[Kerror[E0308]: mismatched types
    --> src/ascii.rs:70:8
     |
 70  |     Ok(buffer.into_text().unwrap_or_default())
     |     -- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Text<'_>`, found `ratatui::text::Text<'_>`
     |     |
     |     arguments to this enum variant are incorrect
     |
     = note: `ratatui::text::Text<'_>` and `Text<'_>` have similar names, but are actually distinct types
 note: `ratatui::text::Text<'_>` is defined in crate `ratatui`
    --> /home/yonas/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ratatui-0.21.0/src/text.rs:264:1
     |
 264 | pub struct Text<'a> {
     | ^^^^^^^^^^^^^^^^^^^
 note: `Text<'_>` is defined in crate `ratatui`
    --> /home/yonas/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ratatui-0.20.1/src/text.rs:277:1
     |
 277 | pub struct Text<'a> {
     | ^^^^^^^^^^^^^^^^^^^
     = note: perhaps two different versions of crate `ratatui` are being used?
 help: the type constructed contains `ratatui::text::Text<'_>` due to the type of the argument passed
    --> src/ascii.rs:70:5
     |
 70  |     Ok(buffer.into_text().unwrap_or_default())
     |     ^^^--------------------------------------^
     |        |
     |        this argument influences the type of `Ok`
 note: tuple variant defined here
    --> /wrkdirs/usr/ports/lang/rust/work/rustc-1.70.0-src/library/core/src/result.rs:507:5
 
     Building [=======================> ] 175/176: macchina(bin)                                                                                                                                                    
�[Kerror[E0308]: mismatched types
    --> src/ascii.rs:79:22
     |
 79  |     text.patch_style(Style::default().fg(color));
     |          ----------- ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `ratatui::style::Style`, found a different `ratatui::style::Style`
     |          |
     |          arguments to this method are incorrect
     |
     = note: `ratatui::style::Style` and `ratatui::style::Style` have similar names, but are actually distinct types
 note: `ratatui::style::Style` is defined in crate `ratatui`
    --> /home/yonas/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ratatui-0.20.1/src/style.rs:120:1
     |
 120 | pub struct Style {
     | ^^^^^^^^^^^^^^^^
 note: `ratatui::style::Style` is defined in crate `ratatui`
    --> /home/yonas/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ratatui-0.21.0/src/style.rs:121:1
     |
 121 | pub struct Style {
     | ^^^^^^^^^^^^^^^^
     = note: perhaps two different versions of crate `ratatui` are being used?
 note: method defined here
    --> /home/yonas/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ratatui-0.21.0/src/text.rs:353:12
     |
 353 |     pub fn patch_style(&mut self, style: Style) {
     |            ^^^^^^^^^^^
 
     Building [=======================> ] 175/176: macchina(bin)                                                                                                                                                    
�[Kerror[E0308]: mismatched types
    --> src/ascii.rs:80:8
     |
 80  |     Ok(text)
     |     -- ^^^^ expected `Text<'_>`, found `ratatui::text::Text<'_>`
     |     |
     |     arguments to this enum variant are incorrect
     |
     = note: `ratatui::text::Text<'_>` and `Text<'_>` have similar names, but are actually distinct types
 note: `ratatui::text::Text<'_>` is defined in crate `ratatui`
    --> /home/yonas/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ratatui-0.21.0/src/text.rs:264:1
     |
 264 | pub struct Text<'a> {
     | ^^^^^^^^^^^^^^^^^^^
 note: `Text<'_>` is defined in crate `ratatui`
    --> /home/yonas/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ratatui-0.20.1/src/text.rs:277:1
     |
 277 | pub struct Text<'a> {
     | ^^^^^^^^^^^^^^^^^^^
     = note: perhaps two different versions of crate `ratatui` are being used?
 help: the type constructed contains `ratatui::text::Text<'_>` due to the type of the argument passed
    --> src/ascii.rs:80:5
     |
 80  |     Ok(text)
     |     ^^^----^
     |        |
     |        this argument influences the type of `Ok`
 note: tuple variant defined here
    --> /wrkdirs/usr/ports/lang/rust/work/rustc-1.70.0-src/library/core/src/result.rs:507:5
 
     Building [=======================> ] 175/176: macchina(bin)                                                                                                                                                    
�[Kerror[E0308]: mismatched types
   --> src/theme/base.rs:14:24
    |
 14 | #[derive(Debug, Clone, Serialize, Deserialize)]
    |                        ^^^^^^^^^
    |                        |
    |                        expected `ratatui::style::Color`, found a different `ratatui::style::Color`
    |                        arguments to this function are incorrect
    |
    = note: `ratatui::style::Color` and `ratatui::style::Color` have similar names, but are actually distinct types
 note: `ratatui::style::Color` is defined in crate `ratatui`
   --> /home/yonas/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ratatui-0.20.1/src/style.rs:7:1
    |
 7  | pub enum Color {
    | ^^^^^^^^^^^^^^
 note: `ratatui::style::Color` is defined in crate `ratatui`
   --> /home/yonas/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ratatui-0.21.0/src/style.rs:8:1
    |
 8  | pub enum Color {
    | ^^^^^^^^^^^^^^
    = note: perhaps two different versions of crate `ratatui` are being used?
 note: function defined here
   --> /home/yonas/.cargo/registry/src/index.crates.io-6f17d22bba15001f/color-to-tui-0.3.0/src/lib.rs:7:8
    |
 7  | pub fn serialize<S: Serializer>(color: &Color, serializer: S) -> Result<S::Ok, S::Error> {
    |        ^^^^^^^^^
    = note: this error originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info)
 
     Building [=======================> ] 175/176: macchina(bin)                                                                                                                                                    
�[Kerror[E0308]: mismatched types
   --> src/theme/base.rs:14:35
    |
 14 | #[derive(Debug, Clone, Serialize, Deserialize)]
    |                                   ^^^^^^^^^^^ expected `ratatui::style::Color`, found a different `ratatui::style::Color`
    |
    = note: `ratatui::style::Color` and `ratatui::style::Color` have similar names, but are actually distinct types
 note: `ratatui::style::Color` is defined in crate `ratatui`
   --> /home/yonas/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ratatui-0.21.0/src/style.rs:8:1
    |
 8  | pub enum Color {
    | ^^^^^^^^^^^^^^
 note: `ratatui::style::Color` is defined in crate `ratatui`
   --> /home/yonas/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ratatui-0.20.1/src/style.rs:7:1
    |
 7  | pub enum Color {
    | ^^^^^^^^^^^^^^
    = note: perhaps two different versions of crate `ratatui` are being used?
    = note: this error originates in the macro `try` (in Nightly builds, run with -Z macro-backtrace for more info)
 
     Building [=======================> ] 175/176: macchina(bin)                                                                                                                                                    
�[Kerror[E0308]: mismatched types
    --> src/theme/components.rs:106:33
     |
 106 | #[derive(Debug, Default, Clone, Serialize, Deserialize)]
     |                                 ^^^^^^^^^
     |                                 |
     |                                 expected `ratatui::style::Color`, found a different `ratatui::style::Color`
     |                                 arguments to this function are incorrect
     |
     = note: `ratatui::style::Color` and `ratatui::style::Color` have similar names, but are actually distinct types
 note: `ratatui::style::Color` is defined in crate `ratatui`
    --> /home/yonas/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ratatui-0.20.1/src/style.rs:7:1
     |
 7   | pub enum Color {
     | ^^^^^^^^^^^^^^
 note: `ratatui::style::Color` is defined in crate `ratatui`
    --> /home/yonas/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ratatui-0.21.0/src/style.rs:8:1
     |
 8   | pub enum Color {
     | ^^^^^^^^^^^^^^
     = note: perhaps two different versions of crate `ratatui` are being used?
 note: function defined here
    --> /home/yonas/.cargo/registry/src/index.crates.io-6f17d22bba15001f/color-to-tui-0.3.0/src/optional.rs:4:8
     |
 4   | pub fn serialize<S: Serializer>(color: &Option<Color>, serializer: S) -> Result<S::Ok, S::Error> {
     |        ^^^^^^^^^
     = note: this error originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info)
 
     Building [=======================> ] 175/176: macchina(bin)                                                                                                                                                    
�[Kerror[E0308]: mismatched types
    --> src/theme/components.rs:106:44
     |
 106 | #[derive(Debug, Default, Clone, Serialize, Deserialize)]
     |                                            ^^^^^^^^^^^ expected `ratatui::style::Color`, found a different `ratatui::style::Color`
     |
     = note: `ratatui::style::Color` and `ratatui::style::Color` have similar names, but are actually distinct types
 note: `ratatui::style::Color` is defined in crate `ratatui`
    --> /home/yonas/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ratatui-0.21.0/src/style.rs:8:1
     |
 8   | pub enum Color {
     | ^^^^^^^^^^^^^^
 note: `ratatui::style::Color` is defined in crate `ratatui`
    --> /home/yonas/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ratatui-0.20.1/src/style.rs:7:1
     |
 7   | pub enum Color {
     | ^^^^^^^^^^^^^^
     = note: perhaps two different versions of crate `ratatui` are being used?
     = note: this error originates in the macro `try` (in Nightly builds, run with -Z macro-backtrace for more info)
 
     Building [=======================> ] 175/176: macchina(bin)                                                                                                                                                    
�[KFor more information about this error, try `rustc --explain E0308`.
     Building [=======================> ] 175/176: macchina(bin)                                                                                                                                                    
�[Kerror: could not compile `macchina` (bin "macchina") due to 11 previous errors

System Information
You don't have to provide this information if you're not comfortable doing so, but it'll help us solve the issue a lot faster.

  • Operating System: FreeBSD 13.2
  • Macchina: 3114b61
@grtcdr
Copy link
Member

grtcdr commented Jun 28, 2023

It looks like another occurence of this.

I'm working on it.

@grtcdr grtcdr added the type/build-error Won't build or is panicking. label Jun 28, 2023
@grtcdr
Copy link
Member

grtcdr commented Jun 28, 2023

Fixed in 089c831.

Thank you for bringing this to my attention.

@grtcdr grtcdr closed this as completed Jun 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/build-error Won't build or is panicking.
Development

No branches or pull requests

2 participants