The general rationale for this is documented in #48.
This PR implements the required behaviour. A human-panic
message will only be displayed if two conditions are met
The program is not running in DEBUG mode
RUST_BACKTRACE is not set as an env variable
This PR also adjusts the tests to check for both present
and non-present human-panic messages.
There are two things missing
[ ] Properly document this change!
A test that checks for the RUST_BACKTRACE override
behaviour when running in RELEASE mode. This is currently
not easy to do with assert_CLI (there might be more PRs π)
Checklist
[x] tests pass
[x] tests and/or benchmarks are included
[ ] documentation is changed or added
Semver change
Now, this is a matter of how you define a version breakage.
SemVer is ambigous when it comes to what is and isn't a breakage,
for example, if people are depending on human-panic messages to be
present to parse things from logs then any tool that updates
human-panic while we are changing behaviour will break.
In the code, this is at most a minor bump. But seeing as we're
also looking at things to add for a 2.0 release, we might want to
put it on the tracking issue (#46).
Either way, we need to document this change because it might have
a large impact on people who depend on the stdout message to be
present.
This is a π feature.
Overview
The general rationale for this is documented in #48. This PR implements the required behaviour. A
human-panic
message will only be displayed if two conditions are metDEBUG
modeRUST_BACKTRACE
is not set as an env variableThis PR also adjusts the tests to check for both present and non-present
human-panic
messages.There are two things missing
RUST_BACKTRACE
override behaviour when running inRELEASE
mode. This is currently not easy to do withassert_CLI
(there might be more PRs π)Checklist
Semver change
Now, this is a matter of how you define a version breakage. SemVer is ambigous when it comes to what is and isn't a breakage, for example, if people are depending on human-panic messages to be present to parse things from logs then any tool that updates
human-panic
while we are changing behaviour will break.In the code, this is at most a
minor
bump. But seeing as we're also looking at things to add for a2.0
release, we might want to put it on the tracking issue (#46).Either way, we need to document this change because it might have a large impact on people who depend on the stdout message to be present.