Closed kornelski closed 2 months ago
I've also added try_build
, so that I can make openssl-sys
report the error without a noisy backtrace.
Instead of using panic, maybe using eprintln!() + std::process::exit(1) would work? openssl-src is probably not called in any context where recovering from an unexpected build error is necessary, and you added try_build for cases where build errors are expected to happen.
Exiting directly without a panic would be cleaner, but I'm leaving that to the caller of try_build
– I'm adding such exits to openssl-sys.
I've updated it with a clean exit, and converted other panics into errors.
Thanks for this!
Because Cargo's formatting of build errors is very noisy users struggle to understand what is causing the build to fail.
Here's a recent case where the failure reason was simple, but the user could not see it through all the noise.
Debug
impl ofCommand
obscures the command name that has been run. This change prints the command name alone.cargo:warning
to also print the message above the stdout and stderr dumps.