budziq / rust-skeptic

Test your Rust Markdown documentation via Cargo
Apache License 2.0
284 stars 43 forks source link

Appveyor failure with toolchain *-pc-windows-gnu #87

Open derekdreery opened 6 years ago

derekdreery commented 6 years ago

I have a failure on the skeptic test on the appveyor for my project. I think it must be being caused by skeptic somehow. I thought just linking to the build failure was probably more useful than describing it here, so you don't have to reproduce.

Edit people on IRC said the problem is this line. I'm posting the conversation below verbatim, because I'm not sure I totally understand it.

20:07 < Arnavion> https://github.com/budziq/rust-skeptic/blob/master/src/skeptic/lib.rs#L764-L770
20:07 < Arnavion> may be the problem
20:07 < Arnavion> It just ignores any other -L that dep crates might have set with their own build scripts
Arnavion commented 6 years ago

Specifically, winapi's build script for the gnu targets adds an additional library directory via cargo:rustc-link-search=native= (-L native=C:\Users\appveyor\.cargo\registry\src\github.com-1ecc6299db9ec823\winapi-x86_64-pc-windows-gnu-0.4.0\lib in OP's case). When skeptic invokes rustc itself it doesn't include this parameter.

This will be a problem for any crates that use cargo:rustc-link-search= or have deps that use it.