-
-
Notifications
You must be signed in to change notification settings - Fork 25
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
Vendor human panic #24
Conversation
* Make it compile on stable Also adds a nightly feature flag that will automatically be picked up by docs.rs to build nice docs. * Make clippy a CI-only dependency You can run `cargo clippy` locally to get the same effect. I've also taken the liberty to nail down the rustfmt version to use, so we can update it explicitly. (This is the same CI setup that assert_cli uses.) * Get rid of all dependencies for now Improves compile times* Use termcolor for colored output This should make it compatible with windows consoles. * Set up some kind of error handling for the hook * rustfmt * Bump clippy and choose a nightly that actually exists. * Make clippy happy
Instead of having to wrap around every panic, this now uses `set_hook` once to register the callback to print a pretty status message. This also has the added benefit of pulling in env! calls because the main setup was made into a macro. Optionally the two core functions (print_help and dump_log) can now also be used without the core macro, because they are `pub fn`
This commit adds the ability to generate reports based on an application crash. It hooks into the existing panic handler and also exposes the report generation feature via a `pub fn`
Update README with current interface
* Correct typo embarrasing * Fix typos
Ensure no docs are missing
metadata: add repository
Update the project to 2018 edition in both code and documentation for usage, prunes unused dependencies and removes dependency on failure, preferring the std Error trait. There was also a misleading error message about not being able to find a temporary file directory, which would have actually have been caused by a failure to encode a filepath into UTF-8 (https://doc.rust-lang.org/src/std/path.rs.html#1848-1850). However this error should not happen anyway by just using the PathBuf directly to make the full path for the persisted file output.
1.25 and 1.29 do not support 2018 edition so move to 1.36 as minimum supported version (2 minor versions lower than current stable as of 2019-10-17).
Update to 2018 edition and prune dependencies
🔦 documentation change: Fixed docs typo
Include cause, whether on nightly or not
https://travis-ci.org/rust-clique/human-panic does not exist. The correct link is https://travis-ci.org/rust-cli/human-panic.
I just spent about twenty minutes debugging why human-panic wasn't working. I hadn't enabled release mode and had no idea that release mode affected it.
This … was easier than expected?
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.
lgtm, not squashing is probably the wiser choice otherwise subtree tends to struggle with some stuff.
People have a strange aversion to foreign commits in their trees. I don’t get it, but whatever floats people’s boats. :) |
Reverts ffe447a It requires a more recent stable rustc than 1.41, for that one feature it’s kind of silly.
It turns out that, in fact, we aren’t always using a recent clippy, but there were real clippy warnings that we needed to fix. The `crossbeam_channel` problem would be fixed in a newer version, but the version used by `notify` is older, and updating `notify` to a newer pre-release won’t be a trivial fix, since they changed how debouncing works and it might break our notification code (at least it requires a bunch of testing).
Argh, clippy for some reason still uses a nightly version; I thought we had that fixed, but maybe it fetches its database from some URL‽ |
Anyway, we can start modifying human-panic now. |
Fixes #21
I used
git subtree add --prefix vendor/human-panic https://github.com/rust-cli/human-panic master
to vendor the current master of the human-panic repo.This should allow us to work on it like on upstream, while also being able to submit changes upstream, and potentially remove it again if upstream catches up.