Fails to compile on windows
fkaa opened this issue · 1 comments
fkaa commented
>cargo install cargo-llvm-lines
Updating registry `https://github.com/rust-lang/crates.io-index`
Installing cargo-llvm-lines v0.1.1
Compiling winapi-build v0.1.1
Compiling winapi v0.2.8
Compiling rustc-demangle v0.1.5
Compiling libc v0.2.34
Compiling rand v0.3.18
Compiling kernel32-sys v0.2.2
Compiling tempdir v0.3.5
Compiling isatty v0.1.6
Compiling cargo-llvm-lines v0.1.1
error[E0433]: failed to resolve. Could not find `unix` in `os`
--> C:\Users\tmtu\.cargo\registry\src\github.com-1ecc6299db9ec823\cargo-llvm-lines-0.1.1\src\main.rs:174:22
|
174 | use std::os::unix::io::{AsRawFd, FromRawFd};
| ^^^^ Could not find `unix` in `os`
error[E0433]: failed to resolve. Use of undeclared type or module `AsRawFd`
--> C:\Users\tmtu\.cargo\registry\src\github.com-1ecc6299db9ec823\cargo-llvm-lines-0.1.1\src\main.rs:184:58
|
184 | Stdio::from_raw_fd(child.stdout.as_ref().map(AsRawFd::as_raw_fd).unwrap())
| ^^^^^^^ Use of undeclared type or module `AsRawFd`
error[E0433]: failed to resolve. Use of undeclared type or module `AsRawFd`
--> C:\Users\tmtu\.cargo\registry\src\github.com-1ecc6299db9ec823\cargo-llvm-lines-0.1.1\src\main.rs:190:58
|
190 | Stdio::from_raw_fd(child.stderr.as_ref().map(AsRawFd::as_raw_fd).unwrap())
| ^^^^^^^ Use of undeclared type or module `AsRawFd`
error[E0599]: no function or associated item named `from_raw_fd` found for type `std::process::Stdio` in the current scope
--> C:\Users\tmtu\.cargo\registry\src\github.com-1ecc6299db9ec823\cargo-llvm-lines-0.1.1\src\main.rs:184:13
|
184 | Stdio::from_raw_fd(child.stdout.as_ref().map(AsRawFd::as_raw_fd).unwrap())
| ^^^^^^^^^^^^^^^^^^ function or associated item not found in `std::process::Stdio`
error[E0599]: no function or associated item named `from_raw_fd` found for type `std::process::Stdio` in the current scope
--> C:\Users\tmtu\.cargo\registry\src\github.com-1ecc6299db9ec823\cargo-llvm-lines-0.1.1\src\main.rs:190:13
|
190 | Stdio::from_raw_fd(child.stderr.as_ref().map(AsRawFd::as_raw_fd).unwrap())
| ^^^^^^^^^^^^^^^^^^ function or associated item not found in `std::process::Stdio`
error: aborting due to 6 previous errors
error: failed to compile `cargo-llvm-lines v0.1.1`, intermediate artifacts can be found at `C:\Users\tmtu\AppData\Local\Temp\cargo-install.7IIKZmFJrIFc`
Caused by:
Could not compile `cargo-llvm-lines`.
To learn more, run the command again with --verbose.
dtolnay commented
😞 Sorry I have never used Windows and I have no idea how to implement this functionality. The code is for filtering some lines out of the stderr of the cargo
subprocess. Is there a crate I should be using that lets me implement this in a uniform way across platforms? A PR would be appreciated!