Samyak2/toipe

Build fails on Windows because of termion

poopsicles opened this issue · 1 comments

The build fails on Windows as the termion library isn't supported on Windows

Perhaps Windows support should then be removed from the README, or an alternative would be to use a cross-platform terminal library, such as crossterm

cargo build --release
   Compiling indexmap v1.8.1
   Compiling rand_chacha v0.3.1
   Compiling termion v1.5.6
   Compiling proc-macro-error v1.0.4
error[E0433]: failed to resolve: maybe a missing crate `sys`?
  --> C:\Users\Fumnanya\.cargo\registry\src\mirrors.ustc.edu.cn-61ef6e0cd06fb9b8\termion-1.5.6\src\lib.rs:24:9
   |
24 | pub use sys::size::terminal_size;
   |         ^^^ maybe a missing crate `sys`?

error[E0433]: failed to resolve: maybe a missing crate `sys`?
  --> C:\Users\Fumnanya\.cargo\registry\src\mirrors.ustc.edu.cn-61ef6e0cd06fb9b8\termion-1.5.6\src\lib.rs:27:9
   |
27 | pub use sys::tty::{is_tty, get_tty};
   |         ^^^ maybe a missing crate `sys`?

error[E0433]: failed to resolve: maybe a missing crate `sys`?
 --> C:\Users\Fumnanya\.cargo\registry\src\mirrors.ustc.edu.cn-61ef6e0cd06fb9b8\termion-1.5.6\src\async.rs:5:5
  |
5 | use sys::tty::get_tty;
  |     ^^^ maybe a missing crate `sys`?

error[E0433]: failed to resolve: maybe a missing crate `sys`?
  --> C:\Users\Fumnanya\.cargo\registry\src\mirrors.ustc.edu.cn-61ef6e0cd06fb9b8\termion-1.5.6\src\raw.rs:28:5
   |
28 | use sys::attr::{get_terminal_attr, raw_terminal_attr, set_terminal_attr};
   |     ^^^ maybe a missing crate `sys`?

error[E0432]: unresolved import `sys`
  --> C:\Users\Fumnanya\.cargo\registry\src\mirrors.ustc.edu.cn-61ef6e0cd06fb9b8\termion-1.5.6\src\raw.rs:29:5
   |
29 | use sys::Termios;
   |     ^^^ maybe a missing crate `sys`?

error[E0425]: cannot find function `get_tty` in this scope
  --> C:\Users\Fumnanya\.cargo\registry\src\mirrors.ustc.edu.cn-61ef6e0cd06fb9b8\termion-1.5.6\src\async.rs:14:36
   |
14 |     thread::spawn(move || for i in get_tty().unwrap().bytes() {
   |                                    ^^^^^^^ not found in this scope

error[E0425]: cannot find function `get_tty` in this scope
  --> C:\Users\Fumnanya\.cargo\registry\src\mirrors.ustc.edu.cn-61ef6e0cd06fb9b8\termion-1.5.6\src\async.rs:43:36
   |
43 |     thread::spawn(move || for i in get_tty().unwrap().bytes() {
   |                                    ^^^^^^^ not found in this scope

error[E0425]: cannot find function `set_terminal_attr` in this scope
  --> C:\Users\Fumnanya\.cargo\registry\src\mirrors.ustc.edu.cn-61ef6e0cd06fb9b8\termion-1.5.6\src\raw.rs:45:9
   |
45 |         set_terminal_attr(&self.prev_ios).unwrap();
   |         ^^^^^^^^^^^^^^^^^ not found in this scope

error[E0425]: cannot find function `get_terminal_attr` in this scope
   --> C:\Users\Fumnanya\.cargo\registry\src\mirrors.ustc.edu.cn-61ef6e0cd06fb9b8\termion-1.5.6\src\raw.rs:102:23
    |
102 |         let mut ios = get_terminal_attr()?;
    |                       ^^^^^^^^^^^^^^^^^ not found in this scope

error[E0425]: cannot find function `raw_terminal_attr` in this scope
   --> C:\Users\Fumnanya\.cargo\registry\src\mirrors.ustc.edu.cn-61ef6e0cd06fb9b8\termion-1.5.6\src\raw.rs:105:9
    |
105 |         raw_terminal_attr(&mut ios);
    |         ^^^^^^^^^^^^^^^^^ not found in this scope

error[E0425]: cannot find function `set_terminal_attr` in this scope
   --> C:\Users\Fumnanya\.cargo\registry\src\mirrors.ustc.edu.cn-61ef6e0cd06fb9b8\termion-1.5.6\src\raw.rs:107:9
    |
107 |         set_terminal_attr(&ios)?;
    |         ^^^^^^^^^^^^^^^^^ not found in this scope

error[E0425]: cannot find function `set_terminal_attr` in this scope
   --> C:\Users\Fumnanya\.cargo\registry\src\mirrors.ustc.edu.cn-61ef6e0cd06fb9b8\termion-1.5.6\src\raw.rs:119:9
    |
119 |         set_terminal_attr(&self.prev_ios)?;
    |         ^^^^^^^^^^^^^^^^^ not found in this scope

error[E0425]: cannot find function `get_terminal_attr` in this scope
   --> C:\Users\Fumnanya\.cargo\registry\src\mirrors.ustc.edu.cn-61ef6e0cd06fb9b8\termion-1.5.6\src\raw.rs:125:23
    |
125 |         let mut ios = get_terminal_attr()?;
    |                       ^^^^^^^^^^^^^^^^^ not found in this scope

error[E0425]: cannot find function `raw_terminal_attr` in this scope
   --> C:\Users\Fumnanya\.cargo\registry\src\mirrors.ustc.edu.cn-61ef6e0cd06fb9b8\termion-1.5.6\src\raw.rs:126:9
    |
126 |         raw_terminal_attr(&mut ios);
    |         ^^^^^^^^^^^^^^^^^ not found in this scope

error[E0425]: cannot find function `set_terminal_attr` in this scope
   --> C:\Users\Fumnanya\.cargo\registry\src\mirrors.ustc.edu.cn-61ef6e0cd06fb9b8\termion-1.5.6\src\raw.rs:127:9
    |
127 |         set_terminal_attr(&ios)?;
    |         ^^^^^^^^^^^^^^^^^ not found in this scope

Some errors have detailed explanations: E0425, E0432, E0433.
For more information about an error, try `rustc --explain E0425`.
error: could not compile `termion` due to 15 previous errors
warning: build failed, waiting for other jobs to finish...
error: build failed
```cargo build --release
   Compiling indexmap v1.8.1
   Compiling rand_chacha v0.3.1
   Compiling termion v1.5.6
   Compiling proc-macro-error v1.0.4
error[E0433]: failed to resolve: maybe a missing crate `sys`?
  --> C:\Users\Fumnanya\.cargo\registry\src\mirrors.ustc.edu.cn-61ef6e0cd06fb9b8\termion-1.5.6\src\lib.rs:24:9
   |
24 | pub use sys::size::terminal_size;
   |         ^^^ maybe a missing crate `sys`?

error[E0433]: failed to resolve: maybe a missing crate `sys`?
  --> C:\Users\Fumnanya\.cargo\registry\src\mirrors.ustc.edu.cn-61ef6e0cd06fb9b8\termion-1.5.6\src\lib.rs:27:9
   |
27 | pub use sys::tty::{is_tty, get_tty};
   |         ^^^ maybe a missing crate `sys`?

error[E0433]: failed to resolve: maybe a missing crate `sys`?
 --> C:\Users\Fumnanya\.cargo\registry\src\mirrors.ustc.edu.cn-61ef6e0cd06fb9b8\termion-1.5.6\src\async.rs:5:5
  |
5 | use sys::tty::get_tty;
  |     ^^^ maybe a missing crate `sys`?

error[E0433]: failed to resolve: maybe a missing crate `sys`?
  --> C:\Users\Fumnanya\.cargo\registry\src\mirrors.ustc.edu.cn-61ef6e0cd06fb9b8\termion-1.5.6\src\raw.rs:28:5
   |
28 | use sys::attr::{get_terminal_attr, raw_terminal_attr, set_terminal_attr};
   |     ^^^ maybe a missing crate `sys`?

error[E0432]: unresolved import `sys`
  --> C:\Users\Fumnanya\.cargo\registry\src\mirrors.ustc.edu.cn-61ef6e0cd06fb9b8\termion-1.5.6\src\raw.rs:29:5
   |
29 | use sys::Termios;
   |     ^^^ maybe a missing crate `sys`?

error[E0425]: cannot find function `get_tty` in this scope
  --> C:\Users\Fumnanya\.cargo\registry\src\mirrors.ustc.edu.cn-61ef6e0cd06fb9b8\termion-1.5.6\src\async.rs:14:36
   |
14 |     thread::spawn(move || for i in get_tty().unwrap().bytes() {
   |                                    ^^^^^^^ not found in this scope

error[E0425]: cannot find function `get_tty` in this scope
  --> C:\Users\Fumnanya\.cargo\registry\src\mirrors.ustc.edu.cn-61ef6e0cd06fb9b8\termion-1.5.6\src\async.rs:43:36
   |
43 |     thread::spawn(move || for i in get_tty().unwrap().bytes() {
   |                                    ^^^^^^^ not found in this scope

error[E0425]: cannot find function `set_terminal_attr` in this scope
  --> C:\Users\Fumnanya\.cargo\registry\src\mirrors.ustc.edu.cn-61ef6e0cd06fb9b8\termion-1.5.6\src\raw.rs:45:9
   |
45 |         set_terminal_attr(&self.prev_ios).unwrap();
   |         ^^^^^^^^^^^^^^^^^ not found in this scope

error[E0425]: cannot find function `get_terminal_attr` in this scope
   --> C:\Users\Fumnanya\.cargo\registry\src\mirrors.ustc.edu.cn-61ef6e0cd06fb9b8\termion-1.5.6\src\raw.rs:102:23
    |
102 |         let mut ios = get_terminal_attr()?;
    |                       ^^^^^^^^^^^^^^^^^ not found in this scope

error[E0425]: cannot find function `raw_terminal_attr` in this scope
   --> C:\Users\Fumnanya\.cargo\registry\src\mirrors.ustc.edu.cn-61ef6e0cd06fb9b8\termion-1.5.6\src\raw.rs:105:9
    |
105 |         raw_terminal_attr(&mut ios);
    |         ^^^^^^^^^^^^^^^^^ not found in this scope

error[E0425]: cannot find function `set_terminal_attr` in this scope
   --> C:\Users\Fumnanya\.cargo\registry\src\mirrors.ustc.edu.cn-61ef6e0cd06fb9b8\termion-1.5.6\src\raw.rs:107:9
    |
107 |         set_terminal_attr(&ios)?;
    |         ^^^^^^^^^^^^^^^^^ not found in this scope

error[E0425]: cannot find function `set_terminal_attr` in this scope
   --> C:\Users\Fumnanya\.cargo\registry\src\mirrors.ustc.edu.cn-61ef6e0cd06fb9b8\termion-1.5.6\src\raw.rs:119:9
    |
119 |         set_terminal_attr(&self.prev_ios)?;
    |         ^^^^^^^^^^^^^^^^^ not found in this scope

error[E0425]: cannot find function `get_terminal_attr` in this scope
   --> C:\Users\Fumnanya\.cargo\registry\src\mirrors.ustc.edu.cn-61ef6e0cd06fb9b8\termion-1.5.6\src\raw.rs:125:23
    |
125 |         let mut ios = get_terminal_attr()?;
    |                       ^^^^^^^^^^^^^^^^^ not found in this scope

error[E0425]: cannot find function `raw_terminal_attr` in this scope
   --> C:\Users\Fumnanya\.cargo\registry\src\mirrors.ustc.edu.cn-61ef6e0cd06fb9b8\termion-1.5.6\src\raw.rs:126:9
    |
126 |         raw_terminal_attr(&mut ios);
    |         ^^^^^^^^^^^^^^^^^ not found in this scope

error[E0425]: cannot find function `set_terminal_attr` in this scope
   --> C:\Users\Fumnanya\.cargo\registry\src\mirrors.ustc.edu.cn-61ef6e0cd06fb9b8\termion-1.5.6\src\raw.rs:127:9
    |
127 |         set_terminal_attr(&ios)?;
    |         ^^^^^^^^^^^^^^^^^ not found in this scope

Some errors have detailed explanations: E0425, E0432, E0433.
For more information about an error, try `rustc --explain E0425`.
error: could not compile `termion` due to 15 previous errors
warning: build failed, waiting for other jobs to finish...
error: build failed

I realized after updating the README and publishing the release that termion does not support windows.

I had made the decision to use termion when starting this project despite it not supporting Windows. I don't have any plans to switch to crossterm yet - I'll consider it after some of the other bugs and features are done.

For the moment, I'll add a note in the README mentioning that Windows is not supported.


There's always WSL though :p