Skip to content

signal-hook-tokio Windows build broken? #100

Open
@davepacheco

Description

@davepacheco

I created a crate that's basically empty and depends on signal-hook and signal-hook-tokio:
https://github.com/davepacheco/signal-hook-windows-test/blob/main/Cargo.toml

I have GitHub Actions configured to build this on Ubuntu, Windows, and MacOS. The Ubuntu one works, but the Windows one failed. (The MacOS one was aborted because of the Windows failure.) I've only tested this once here, but I see the same behavior in a bigger crate that uses these crates.

The error is here:

   Compiling signal-hook-tokio v0.3.0
     Running `rustc --crate-name signal_hook_tokio --edition=2018 C:\Users\runneradmin\.cargo\registry\src\github.com-1ecc6299db9ec823\signal-hook-tokio-0.3.0\src\lib.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debuginfo=2 --cfg "feature=\"futures-core-0_3\"" --cfg "feature=\"futures-v0_3\"" -C metadata=3c6a7814b531fa0a -C extra-filename=-3c6a7814b531fa0a --out-dir D:\a\signal-hook-windows-test\signal-hook-windows-test\target\debug\deps -L dependency=D:\a\signal-hook-windows-test\signal-hook-windows-test\target\debug\deps --extern futures_core_0_3=D:\a\signal-hook-windows-test\signal-hook-windows-test\target\debug\deps\libfutures_core-a1626673b76c3bb9.rmeta --extern libc=D:\a\signal-hook-windows-test\signal-hook-windows-test\target\debug\deps\liblibc-aeda11fed0a8c75b.rmeta --extern signal_hook=D:\a\signal-hook-windows-test\signal-hook-windows-test\target\debug\deps\libsignal_hook-ac6b3a1d0c81f434.rmeta --extern tokio=D:\a\signal-hook-windows-test\signal-hook-windows-test\target\debug\deps\libtokio-a1fd3de27efaed30.rmeta --cap-lints allow`
error[E0433]: failed to resolve: could not find `iterator` in `signal_hook`
  --> C:\Users\runneradmin\.cargo\registry\src\github.com-1ecc6299db9ec823\signal-hook-tokio-0.3.0\src\lib.rs:81:22
   |
81 | pub use signal_hook::iterator::backend::Handle;
   |                      ^^^^^^^^ could not find `iterator` in `signal_hook`

error[E0433]: failed to resolve: could not find `iterator` in `signal_hook`
  --> C:\Users\runneradmin\.cargo\registry\src\github.com-1ecc6299db9ec823\signal-hook-tokio-0.3.0\src\lib.rs:82:18
   |
82 | use signal_hook::iterator::backend::{OwningSignalIterator, PollResult, SignalDelivery};
   |                  ^^^^^^^^ could not find `iterator` in `signal_hook`

error[E0433]: failed to resolve: could not find `iterator` in `signal_hook`
  --> C:\Users\runneradmin\.cargo\registry\src\github.com-1ecc6299db9ec823\signal-hook-tokio-0.3.0\src\lib.rs:83:18
   |
83 | use signal_hook::iterator::exfiltrator::{Exfiltrator, SignalOnly};
   |                  ^^^^^^^^ could not find `iterator` in `signal_hook`

error[E0432]: unresolved import `tokio::net::UnixStream`
  --> C:\Users\runneradmin\.cargo\registry\src\github.com-1ecc6299db9ec823\signal-hook-tokio-0.3.0\src\lib.rs:79:5
   |
79 | use tokio::net::UnixStream;
   |     ^^^^^^^^^^^^^^^^^^^^^^ no `UnixStream` in `net`

error[E0433]: failed to resolve: use of undeclared type `SignalDelivery`
   --> C:\Users\runneradmin\.cargo\registry\src\github.com-1ecc6299db9ec823\signal-hook-tokio-0.3.0\src\lib.rs:115:21
    |
115 |         let inner = SignalDelivery::with_pipe(read, write, exfiltrator, signals)?;
    |                     ^^^^^^^^^^^^^^ use of undeclared type `SignalDelivery`

error[E0433]: failed to resolve: use of undeclared type `OwningSignalIterator`
   --> C:\Users\runneradmin\.cargo\registry\src\github.com-1ecc6299db9ec823\signal-hook-tokio-0.3.0\src\lib.rs:116:17
    |
116 |         Ok(Self(OwningSignalIterator::new(inner)))
    |                 ^^^^^^^^^^^^^^^^^^^^ use of undeclared type `OwningSignalIterator`

error[E0433]: failed to resolve: use of undeclared type `PollResult`
   --> C:\Users\runneradmin\.cargo\registry\src\github.com-1ecc6299db9ec823\signal-hook-tokio-0.3.0\src\lib.rs:153:13
    |
153 |             PollResult::Signal(sig) => Poll::Ready(Some(sig)),
    |             ^^^^^^^^^^ use of undeclared type `PollResult`

error[E0433]: failed to resolve: use of undeclared type `PollResult`
   --> C:\Users\runneradmin\.cargo\registry\src\github.com-1ecc6299db9ec823\signal-hook-tokio-0.3.0\src\lib.rs:154:13
    |
154 |             PollResult::Closed => Poll::Ready(None),
    |             ^^^^^^^^^^ use of undeclared type `PollResult`

error[E0433]: failed to resolve: use of undeclared type `PollResult`
   --> C:\Users\runneradmin\.cargo\registry\src\github.com-1ecc6299db9ec823\signal-hook-tokio-0.3.0\src\lib.rs:155:13
    |
155 |             PollResult::Pending => Poll::Pending,
    |             ^^^^^^^^^^ use of undeclared type `PollResult`

error[E0433]: failed to resolve: use of undeclared type `PollResult`
   --> C:\Users\runneradmin\.cargo\registry\src\github.com-1ecc6299db9ec823\signal-hook-tokio-0.3.0\src\lib.rs:156:13
    |
156 |             PollResult::Err(error) => panic!("Unexpected error: {}", error),
    |             ^^^^^^^^^^ use of undeclared type `PollResult`

error[E0405]: cannot find trait `Exfiltrator` in this scope
  --> C:\Users\runneradmin\.cargo\registry\src\github.com-1ecc6299db9ec823\signal-hook-tokio-0.3.0\src\lib.rs:92:27
   |
92 | pub struct SignalsInfo<E: Exfiltrator = SignalOnly>(OwningSignalIterator<UnixStream, E>);
   |                           ^^^^^^^^^^^ not found in this scope

error[E0412]: cannot find type `SignalOnly` in this scope
  --> C:\Users\runneradmin\.cargo\registry\src\github.com-1ecc6299db9ec823\signal-hook-tokio-0.3.0\src\lib.rs:92:41
   |
92 | pub struct SignalsInfo<E: Exfiltrator = SignalOnly>(OwningSignalIterator<UnixStream, E>);
   |                                         ^^^^^^^^^^ not found in this scope

error[E0412]: cannot find type `OwningSignalIterator` in this scope
  --> C:\Users\runneradmin\.cargo\registry\src\github.com-1ecc6299db9ec823\signal-hook-tokio-0.3.0\src\lib.rs:92:53
   |
92 | pub struct SignalsInfo<E: Exfiltrator = SignalOnly>(OwningSignalIterator<UnixStream, E>);
   |                                                     ^^^^^^^^^^^^^^^^^^^^ not found in this scope

error[E0405]: cannot find trait `Exfiltrator` in this scope
  --> C:\Users\runneradmin\.cargo\registry\src\github.com-1ecc6299db9ec823\signal-hook-tokio-0.3.0\src\lib.rs:94:9
   |
94 | impl<E: Exfiltrator> SignalsInfo<E> {
   |         ^^^^^^^^^^^ not found in this scope

error[E0412]: cannot find type `Handle` in this scope
   --> C:\Users\runneradmin\.cargo\registry\src\github.com-1ecc6299db9ec823\signal-hook-tokio-0.3.0\src\lib.rs:123:29
    |
123 |     pub fn handle(&self) -> Handle {
    |                             ^^^^^^ not found in this scope

error[E0412]: cannot find type `SignalOnly` in this scope
   --> C:\Users\runneradmin\.cargo\registry\src\github.com-1ecc6299db9ec823\signal-hook-tokio-0.3.0\src\lib.rs:132:32
    |
132 | pub type Signals = SignalsInfo<SignalOnly>;
    |                 -              ^^^^^^^^^^ not found in this scope
    |                 |
    |                 help: you might be missing a type parameter: `<SignalOnly>`

error: aborting due to 16 previous errors

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions