Skip to content

Could not compile on windows. #53

@chipbite

Description

@chipbite

Describe the bug
Tried to install as in readme, using e g cargo install so --no-default-features --features windows.
Compilation fails.

To Reproduce
Run on windows 11:

  1. cargo install so --no-default-features --features windows

Am using git bash on windows terminal.

Screenshots

Screenshot of compile log - Click me Image

Environment

  • OS: win 11 --- Microsoft Windows [Version 10.0.26100.4349]
  • Terminal: Windows Terminal (1.22.11141) running git-bash (from git for windows 2.49)
  • so --version: N/A

Additional context

Compile log - Click me
   Compiling directories v5.0.1
   Compiling webbrowser v1.0.5
   Compiling so v0.4.10
error[E0308]: mismatched types
   --> C:\Users\mawid6\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\so-0.4.10\src\term.rs:44:49
    |
44  |             inline_code: CompoundStyle::with_fg(Color::Cyan),
    |                          ---------------------- ^^^^^^^^^^^ expected `termimad::crossterm::style::Color`, found `crossterm::style::Color`
    |                          |
    |                          arguments to this function are incorrect
    |
note: two different versions of crate `crossterm` are being used; two types coming from two different versions of the same crate are different types even if they look the same
   --> C:\Users\mawid6\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\crossterm-0.28.1\src\style\types\color.rs:31:1
    |
31  | pub enum Color {
    | ^^^^^^^^^^^^^^ this is the found type `crossterm::style::Color`
    |
   ::: C:\Users\mawid6\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\crossterm-0.29.0\src\style\types\color.rs:31:1
    |
31  | pub enum Color {
    | ^^^^^^^^^^^^^^ this is the expected type `termimad::crossterm::style::Color`
    |
   ::: C:\Users\mawid6\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\so-0.4.10\src\term.rs:2:5
    |
2   | use crossterm::event::{read, Event, KeyEvent};
    |     --------- one version of crate `crossterm` used here, as a direct dependency of the current crate
...
8   | use termimad::{CompoundStyle, LineStyle, MadSkin};
    |     -------- one version of crate `crossterm` used here, as a dependency of crate `crokey`
    = help: you can use `cargo tree` to explore your dependency tree
note: associated function defined here
   --> C:\Users\mawid6\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\termimad-0.30.1\src\compound_style.rs:100:12
    |
100 |     pub fn with_fg(fg: Color) -> Self {
    |            ^^^^^^^

error[E0308]: mismatched types
   --> C:\Users\mawid6\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\so-0.4.10\src\term.rs:46:56
    |
46  |                 compound_style: CompoundStyle::with_fg(Color::Cyan),
    |                                 ---------------------- ^^^^^^^^^^^ expected `termimad::crossterm::style::Color`, found `crossterm::style::Color`
    |                                 |
    |                                 arguments to this function are incorrect
    |
note: two different versions of crate `crossterm` are being used; two types coming from two different versions of the same crate are different types even if they look the same
   --> C:\Users\mawid6\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\crossterm-0.28.1\src\style\types\color.rs:31:1
    |
31  | pub enum Color {
    | ^^^^^^^^^^^^^^ this is the found type `crossterm::style::Color`
    |
   ::: C:\Users\mawid6\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\crossterm-0.29.0\src\style\types\color.rs:31:1
    |
31  | pub enum Color {
    | ^^^^^^^^^^^^^^ this is the expected type `termimad::crossterm::style::Color`
    |
   ::: C:\Users\mawid6\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\so-0.4.10\src\term.rs:2:5
    |
2   | use crossterm::event::{read, Event, KeyEvent};
    |     --------- one version of crate `crossterm` used here, as a direct dependency of the current crate
...
8   | use termimad::{CompoundStyle, LineStyle, MadSkin};
    |     -------- one version of crate `crossterm` used here, as a dependency of crate `crokey`
    = help: you can use `cargo tree` to explore your dependency tree
note: associated function defined here
   --> C:\Users\mawid6\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\termimad-0.30.1\src\compound_style.rs:100:12
    |
100 |     pub fn with_fg(fg: Color) -> Self {
    |            ^^^^^^^

error[E0308]: mismatched types
  --> C:\Users\mawid6\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\so-0.4.10\src\term.rs:75:36
   |
75 |         self.skin.paragraph.set_fg(fg);
   |                             ------ ^^ expected `termimad::crossterm::style::Color`, found `crossterm::style::Color`
   |                             |
   |                             arguments to this method are incorrect
   |
note: two different versions of crate `crossterm` are being used; two types coming from two different versions of the same crate are different types even if they look the same
  --> C:\Users\mawid6\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\crossterm-0.28.1\src\style\types\color.rs:31:1
   |
31 | pub enum Color {
   | ^^^^^^^^^^^^^^ this is the found type `crossterm::style::Color`
   |
  ::: C:\Users\mawid6\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\crossterm-0.29.0\src\style\types\color.rs:31:1
   |
31 | pub enum Color {
   | ^^^^^^^^^^^^^^ this is the expected type `termimad::crossterm::style::Color`
   |
  ::: C:\Users\mawid6\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\so-0.4.10\src\term.rs:2:5
   |
2  | use crossterm::event::{read, Event, KeyEvent};
   |     --------- one version of crate `crossterm` used here, as a direct dependency of the current crate
...
8  | use termimad::{CompoundStyle, LineStyle, MadSkin};
   |     -------- one version of crate `crossterm` used here, as a dependency of crate `crokey`
   = help: you can use `cargo tree` to explore your dependency tree
note: method defined here
  --> C:\Users\mawid6\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\termimad-0.30.1\src\line_style.rs:50:12
   |
50 |     pub fn set_fg(&mut self, color: Color) {
   |            ^^^^^^

For more information about this error, try `rustc --explain E0308`.
error: could not compile `so` (lib) due to 3 previous errors
warning: build failed, waiting for other jobs to finish...
error: failed to compile `so v0.4.10`, intermediate artifacts can be found at `C:\Users\mawid6\AppData\Local\Temp\cargo-installoqSigD`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions