aweinstock314 / rust-clipboard

System Clipboard interfacing library in Rust
Apache License 2.0
368 stars 75 forks source link

0.4.3 broken on linux #50

Closed alexheretic closed 6 years ago

alexheretic commented 6 years ago

Hey Linux is in the unix _targetfamily, but it is not unix. 0.4.3 tests do not compile on Linux.

To be fair the main package does compile, but without functionality.

I'm surprised you don't have travis linux testing, at least compile.

error[E0432]: unresolved import `clipboard::x11_clipboard`
 --> examples/primary_selection.rs:5:16
  |
5 | use clipboard::x11_clipboard::{X11ClipboardContext, Primary};
  |                ^^^^^^^^^^^^^ Could not find `x11_clipboard` in `clipboard`

error: aborting due to previous error

error: Could not compile `clipboard`.
warning: build failed, waiting for other jobs to finish...
error: build failed
pbgc commented 6 years ago

@alexheretic @aweinstock314 That's right. Unfortunately I think I induced the error in #49 by referring to 'target_os=unix' instead of 'target_family=unix' and I apologize.

alexheretic commented 6 years ago

@pbgc easy to fix, so np. I've raised #51 that includes compiling the tests in travis on Linux, which will hopefully avoid a similar conditional comp break in future.

I used #[cfg(all(unix, not(target_os="macos")))] to include all unix, but skip out macos which I assume is part of the unix family. This certainly fixes linux use. @pbgc can you check your bsd use case?

pbgc commented 6 years ago

@alexheretic It's perfect. I've just built, with success, https://github.com/jmacdonald/amp from scratch on FreeBSD using your fork of rust-clipboard.

aweinstock314 commented 6 years ago

I've merged #51, and published version 0.4.4.

Back when I set up Travis/Appveyor, I couldn't figure out how to get Travis Mac + Linux builds working with the same script (which seems to be addressed by #51). I did check that it compiled locally before publishing, but didn't run the tests locally too.

nox commented 6 years ago

This broke Android builds, apparently.