Count "failed to run custom build command" as error?
When debugging a project, I opened bacon alongside my editor as usual. bacon said:
[ripasso] [check] [1 warning]
but then I found out that one of the dependencies failed to build.rs:
error: failed to run custom build command for `libgpg-error-sys v0.6.2`
Caused by:
process didn't exit successfully: `/home/i/works/debcargo-conf/build/ripasso/target/debug/build/libgpg-error-sys-9b3670d237bb0344/build-script-build` (exit status: 1)
--- stdout
(.. omitted)
--- stderr
Error: PkgConfig(
pkg-config exited with status code 1
> PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 pkg-config --libs --cflags gpg-error 'gpg-error >= 1.12'
The system library `gpg-error` required by crate `libgpg-error-sys` was not found.
(.. omitted)
)
IMHO it would be helpful if such situations could be detected and counted as an error.
To make it easier to handle that problem, can you build and share a simple reproduction case ?
Basically building any project that depends on some -sys crate, that is, a C/C++ shared library, without first installing such a library.
A minimal reproducer is an empty cargo new project depending on gpg-error.
Uh, this "reproducer" actually correctly showed "Command error code: 101".
My case was ripasso, which requires a clone but works to demonstrate the problem.
There's probably more to do to reproduce:
Hmm, this seems to happen fairly intermittently, and the problem actually lies in cargo, which occasionally returns with status code 0 even when there are errors. Should be directed to cargo. It'd still be nice if bacon could handle this, but probably not worth it.
bacon:
cargo: