Only display message for humans (implementing #48) #50
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 met
DEBUG
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
overridebehaviour when running in
RELEASE
mode. This is currentlynot easy to do with
assert_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'realso looking at things to add for a
2.0
release, we might want toput 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.