-
Notifications
You must be signed in to change notification settings - Fork 373
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove backtraces on error when running rerun
binary
#4746
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
emilk
force-pushed
the
emilk/remove-backtraces
branch
from
January 9, 2024 10:06
e616859
to
da97229
Compare
emilk
added
🧑💻 dev experience
developer experience (excluding CI)
CLI
Related to the Rerun CLI
labels
Jan 9, 2024
Wumpf
approved these changes
Jan 9, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great find! 👌
emilk
added
exclude from changelog
PRs with this won't show up in CHANGELOG.md
include in changelog
and removed
exclude from changelog
PRs with this won't show up in CHANGELOG.md
labels
Jan 9, 2024
emilk
added a commit
that referenced
this pull request
Jan 9, 2024
### What * Closes #4738 Starting in [`anyhow 1.0.77`](https://github.com/dtolnay/anyhow/releases/tag/1.0.77), a backtrace will be printed on error if `RUST_BACKTRACE` is set, and we set `RUST_BACKTRACE=1` in: https://github.com/rerun-io/rerun/blob/d204936e4a186b6f264425f7a3d3849f94b7b86f/crates/re_log/src/setup.rs#L32-L35 We do this because we want to print stack traces on panics. However, for `anyhow::Error` our error messages _should_ be good enough to not require a stack trace, so with this PR we now explicitly print out the error instead of relying in the formatting that happens when returning `anyhow::Result` from `main`. ### Result ``` ❯ cargo run -p rerun-cli --quiet -- .github/workflows/documentation.yaml [2024-01-09T10:09:31Z INFO re_data_source::load_file] Loading ".github/workflows/documentation.yaml"… Error: ".github/workflows/documentation.yaml" -> No data-loader support for ".github/workflows/documentation.yaml" ``` ### Checklist * [x] I have read and agree to [Contributor Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and the [Code of Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md) * [x] I've included a screenshot or gif (if applicable) * [x] I have tested the web demo (if applicable): * Using newly built examples: [app.rerun.io](https://app.rerun.io/pr/4746/index.html) * Using examples from latest `main` build: [app.rerun.io](https://app.rerun.io/pr/4746/index.html?manifest_url=https://app.rerun.io/version/main/examples_manifest.json) * Using full set of examples from `nightly` build: [app.rerun.io](https://app.rerun.io/pr/4746/index.html?manifest_url=https://app.rerun.io/version/nightly/examples_manifest.json) * [x] The PR title and labels are set such as to maximize their usefulness for the next release's CHANGELOG - [PR Build Summary](https://build.rerun.io/pr/4746) - [Docs preview](https://rerun.io/preview/dfadee45bb4767f1e81e2459b8e3f93aabcb5c39/docs) <!--DOCS-PREVIEW--> - [Examples preview](https://rerun.io/preview/dfadee45bb4767f1e81e2459b8e3f93aabcb5c39/examples) <!--EXAMPLES-PREVIEW--> - [Recent benchmark results](https://build.rerun.io/graphs/crates.html) - [Wasm size tracking](https://build.rerun.io/graphs/sizes.html)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
CLI
Related to the Rerun CLI
🧑💻 dev experience
developer experience (excluding CI)
include in changelog
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.
What
Starting in
anyhow 1.0.77
, a backtrace will be printed on error ifRUST_BACKTRACE
is set, and we setRUST_BACKTRACE=1
in:rerun/crates/re_log/src/setup.rs
Lines 32 to 35 in d204936
We do this because we want to print stack traces on panics.
However, for
anyhow::Error
our error messages should be good enough to not require a stack trace,so with this PR we now explicitly print out the error instead of relying in the formatting that happens when returning
anyhow::Result
frommain
.Result
Checklist
main
build: app.rerun.ionightly
build: app.rerun.io