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

Build fails on Windows because of termion #14

Open
poopsicles opened this issue Apr 4, 2022 · 1 comment
Open

Build fails on Windows because of termion #14

poopsicles opened this issue Apr 4, 2022 · 1 comment
Labels
enhancement New feature or request wontfix This will not be worked on

Comments

@poopsicles
Copy link

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
@Samyak2
Copy link
Owner

Samyak2 commented Apr 4, 2022

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

@Samyak2 Samyak2 added wontfix This will not be worked on packaging Package manager repos, binary downloads, etc. enhancement New feature or request and removed packaging Package manager repos, binary downloads, etc. labels Apr 4, 2022
Samyak2 added a commit that referenced this issue Apr 4, 2022
Also moved these notes to a different section at the bottom.

See #14 for details.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants