davidhewitt / mio-anonymous-pipes

mio::Evented wrapper for windows anonymous pipes
2 stars 3 forks source link

`cargo test` fails locally #5

Open hamirmahal opened 1 month ago

hamirmahal commented 1 month ago
$  cargo test
   Compiling mio-anonymous-pipes v0.2.0 (/home/hamir/mio-anonymous-pipes)
error[E0433]: failed to resolve: could not find `um` in `winapi`
 --> src/lib.rs:5:13
  |
5 | use winapi::um::ioapiset::CancelSynchronousIo;
  |             ^^ could not find `um` in `winapi`

error[E0433]: failed to resolve: could not find `windows` in `os`
   --> src/lib.rs:8:14
    |
8   | use std::os::windows::io::AsRawHandle;
    |              ^^^^^^^ could not find `windows` in `os`
    |
note: found an item that was configured out
   --> /home/hamir/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/os/mod.rs:53:9
    |
53  | pub mod windows {}
    |         ^^^^^^^
note: found an item that was configured out
   --> /home/hamir/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/os/mod.rs:100:9
    |
100 | pub mod windows;
    |         ^^^^^^^

error[E0432]: unresolved import `miow::pipe`
 --> src/lib.rs:2:11
  |
2 | use miow::pipe::{AnonRead, AnonWrite};
  |           ^^^^ could not find `pipe` in `miow`

error[E0599]: no method named `as_raw_handle` found for struct `JoinHandle` in the current scope
   --> src/lib.rs:202:40
    |
202 |             CancelSynchronousIo(thread.as_raw_handle());
    |                                        ^^^^^^^^^^^^^ method not found in `JoinHandle<()>`

warning: unused import: `std::io::Read`
  --> src/lib.rs:82:21
   |
82 |                 use std::io::Read;
   |                     ^^^^^^^^^^^^^
   |
   = note: `#[warn(unused_imports)]` on by default

warning: unused import: `std::io::Write`
   --> src/lib.rs:260:21
    |
260 |                 use std::io::Write;
    |                     ^^^^^^^^^^^^^^

Some errors have detailed explanations: E0432, E0433, E0599.
For more information about an error, try `rustc --explain E0432`.
warning: `mio-anonymous-pipes` (lib) generated 2 warnings
error: could not compile `mio-anonymous-pipes` (lib) due to 4 previous errors; 2 warnings emitted
warning: build failed, waiting for other jobs to finish...
warning: `mio-anonymous-pipes` (lib test) generated 2 warnings (2 duplicates)
error: could not compile `mio-anonymous-pipes` (lib test) due to 4 previous errors; 2 warnings emitted
davidhewitt commented 1 month ago

Thanks for the heads up. I don't have time nor need to maintain this crate any more.

Would you be open to sending a PR to fix this? Otherwise perhaps better to just archive this repo.

hamirmahal commented 1 month ago

You're welcome. I've been looking into it, and

   Compiling mio-anonymous-pipes v0.2.0 (/home/hamir/mio-anonymous-pipes)
error[E0432]: unresolved import `miow::pipe`
 --> src/lib.rs:2:11
  |
2 | use miow::pipe::{AnonRead, AnonWrite};
  |           ^^^^ could not find `pipe` in `miow`

is an error that's persisting at

use miow::pipe::{AnonRead, AnonWrite};

even after trying several different versions of

miow = "0.3"

in Cargo.toml.

None of these worked.

miow = "0.6" miow = "0.5" miow = "0.4" miow = "0.3.7" miow = "0.3" miow = "0.2" miow = "0.1"

It looks like 0.6.0 is the latest version.

davidhewitt commented 1 month ago

Just a thought, what OS are you using? This crate (and its dependencies) are windows-specific.

hamirmahal commented 1 month ago

Oh, I'm on Ubuntu 22.04 LTS.