-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Description
Looks like src/env.rs contains some unix-specific code which makes it impossible to install drone on Windows. Would it be possible to replace it with a platform-independent implementation?
Compilation log:
Compiling drone v0.11.1
error[E0433]: failed to resolve: could not find `unix` in `os`
--> C:\Users\bugad\.cargo\registry\src\github.com-1ecc6299db9ec823\drone-0.11.1\src\env.rs:5:20
|
5 | use std::{env, os::unix::process::CommandExt, process::Command};
| ^^^^ could not find `unix` in `os`
error[E0432]: unresolved import `signal_hook::iterator`
--> C:\Users\bugad\.cargo\registry\src\github.com-1ecc6299db9ec823\drone-0.11.1\src\probe\bmp.rs:13:18
|
13 | use signal_hook::iterator::Signals;
| ^^^^^^^^ could not find `iterator` in `signal_hook`
error[E0432]: unresolved import `signal_hook::iterator`
--> C:\Users\bugad\.cargo\registry\src\github.com-1ecc6299db9ec823\drone-0.11.1\src\probe\openocd.rs:14:18
|
14 | use signal_hook::iterator::Signals;
| ^^^^^^^^ could not find `iterator` in `signal_hook`
error[E0432]: unresolved import `signal_hook::iterator`
--> C:\Users\bugad\.cargo\registry\src\github.com-1ecc6299db9ec823\drone-0.11.1\src\probe\mod.rs:14:18
|
14 | use signal_hook::iterator::Signals;
| ^^^^^^^^ could not find `iterator` in `signal_hook`
error[E0433]: failed to resolve: could not find `unix` in `os`
--> C:\Users\bugad\.cargo\registry\src\github.com-1ecc6299db9ec823\drone-0.11.1\src\utils.rs:12:9
|
12 | os::unix::{ffi::OsStrExt, io::AsRawFd, process::CommandExt},
| ^^^^ could not find `unix` in `os`
error[E0432]: unresolved imports `signal_hook::iterator`, `signal_hook::SIGQUIT`
--> C:\Users\bugad\.cargo\registry\src\github.com-1ecc6299db9ec823\drone-0.11.1\src\utils.rs:5:19
|
5 | use signal_hook::{iterator::Signals, SIGINT, SIGQUIT, SIGTERM};
| ^^^^^^^^ ^^^^^^^ no `SIGQUIT` in the root
| |
| could not find `iterator` in `signal_hook`
error[E0425]: cannot find function `mkfifo` in crate `libc`
--> C:\Users\bugad\.cargo\registry\src\github.com-1ecc6299db9ec823\drone-0.11.1\src\utils.rs:115:23
|
115 | if unsafe { libc::mkfifo(c_pipe.as_ptr(), 0o644) } == -1 {
| ^^^^^^ not found in `libc`
error[E0425]: cannot find function `fcntl` in crate `libc`
--> C:\Users\bugad\.cargo\registry\src\github.com-1ecc6299db9ec823\drone-0.11.1\src\utils.rs:124:20
|
124 | unsafe { libc::fcntl(fifo.as_raw_fd(), libc::F_SETFL, libc::O_NONBLOCK) };
| ^^^^^ not found in `libc`
error[E0425]: cannot find value `F_SETFL` in crate `libc`
--> C:\Users\bugad\.cargo\registry\src\github.com-1ecc6299db9ec823\drone-0.11.1\src\utils.rs:124:50
|
124 | unsafe { libc::fcntl(fifo.as_raw_fd(), libc::F_SETFL, libc::O_NONBLOCK) };
| ^^^^^^^ not found in `libc`
error[E0425]: cannot find value `O_NONBLOCK` in crate `libc`
--> C:\Users\bugad\.cargo\registry\src\github.com-1ecc6299db9ec823\drone-0.11.1\src\utils.rs:124:65
|
124 | unsafe { libc::fcntl(fifo.as_raw_fd(), libc::F_SETFL, libc::O_NONBLOCK) };
| ^^^^^^^^^^ not found in `libc`
error[E0425]: cannot find function `setpgid` in crate `libc`
--> C:\Users\bugad\.cargo\registry\src\github.com-1ecc6299db9ec823\drone-0.11.1\src\utils.rs:140:19
|
140 | libc::setpgid(0, 0);
| ^^^^^^^ help: a function with a similar name exists: `getpid`
error[E0599]: no method named `exec` found for type `std::process::Command` in the current scope
--> C:\Users\bugad\.cargo\registry\src\github.com-1ecc6299db9ec823\drone-0.11.1\src\env.rs:21:33
|
21 | Err(anyhow!(command.exec()))
| ^^^^ method not found in `std::process::Command`
error[E0599]: no method named `as_bytes` found for type `&std::ffi::OsStr` in the current scope
--> C:\Users\bugad\.cargo\registry\src\github.com-1ecc6299db9ec823\drone-0.11.1\src\utils.rs:114:48
|
114 | let c_pipe = CString::new(pipe.as_os_str().as_bytes())?;
| ^^^^^^^^ method not found in `&std::ffi::OsStr`
|
= help: items from traits can only be used if the trait is in scope
= note: the following trait is implemented but not in scope; perhaps add a `use` for it:
`use clap::osstringext::OsStrExt3;`
error[E0599]: no method named `as_raw_fd` found for type `std::fs::File` in the current scope
--> C:\Users\bugad\.cargo\registry\src\github.com-1ecc6299db9ec823\drone-0.11.1\src\utils.rs:124:31
|
124 | unsafe { libc::fcntl(fifo.as_raw_fd(), libc::F_SETFL, libc::O_NONBLOCK) };
| ^^^^^^^^^ method not found in `std::fs::File`
error[E0599]: no method named `pre_exec` found for type `&mut std::process::Command` in the current scope
--> C:\Users\bugad\.cargo\registry\src\github.com-1ecc6299db9ec823\drone-0.11.1\src\utils.rs:139:17
|
139 | openocd.pre_exec(|| {
| ^^^^^^^^ method not found in `&mut std::process::Command`
error: aborting due to 15 previous errors
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels