54 Commits

Author SHA1 Message Date
Stu
62434e40aa
Replace Help trait with Section in README (#52) 2020-08-24 13:50:23 -07:00
Stu
5cf35afaa8
Add panic_note to HookBuilder (#51)
* Implement panic_note feature

* Fix typo

* Rename to panic_section and use Display impl

* Update src/config.rs

* Move panic_section after panic message

Co-authored-by: Jane Lusby <jlusby42@gmail.com>
2020-08-24 13:09:33 -07:00
Jane Lusby
a83c478a70
Add config option to disable env section (#49)
* Add config option to disable env section

* fix tests
2020-08-22 15:31:24 -07:00
Jane Lusby
f96519e594
Add __rust_begin_short_backtrace filter (#48)
This frame was added for the exact purpose of allowing proper filtering:

https://github.com/rust-lang/rust/issues/47429
2020-08-17 14:19:56 -07:00
Jane Lusby
7316c8ff94
make new release (#46)
* change panic example to be consistent with usage example

* bump versions for new release
2020-08-06 12:44:50 -07:00
Rebecca Turner
544ef9feba
Use <span> instead of <font> in documentation (#44)
* Use `<span>` instead of `<font>` in documentation

The `<font>` tag was deprecated in [HTML 4.01]. Let's use the verbose
but standardized `<span>` tag with discouraged but supported inline
styles instead.

(I was wrong when I said it was deprecated before I was born; though
[HTML 4]'s spec was published in 1997, about 6 months before I was born,
`<font>` was only deprecated in HTML 4.01, published 2 years later when
I was about 16 months old.)

[HTML 4]: https://www.w3.org/TR/REC-html40-971218/
[HTML 4.01]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/font

* Add script to convert `<span>` to `<font>` in docs

```
$ ./scripts/fix_html_examples.py --help
usage: fix_html_examples.py [-h] file [file ...]

Convert HTML from Gnome terminal's 'Copy as HTML' feature to use modern
<span> tags and inline CSS. This script is idempotent, i.e. multiple
invocations will not change the output past the first invocation.

positional arguments:
  file        Rust file to update <pre> blocks in.

optional arguments:
  -h, --help  show this help message and exit

$ ./scripts/fix_html_examples.py src/*.rs
Nothing to fix in src/config.rs
Nothing to fix in src/handler.rs
Updated example colored output in src/lib.rs
Nothing to fix in src/private.rs
Nothing to fix in src/writers.rs

$ ./scripts/fix_html_examples.py src/*.rs
Nothing to fix in src/config.rs
Nothing to fix in src/handler.rs
Nothing to fix in src/lib.rs
Nothing to fix in src/private.rs
Nothing to fix in src/writers.rs
```

Co-authored-by: Rebecca Turner <rturner@linkedin.com>
2020-07-30 11:23:18 -07:00
Jane Lusby
74c46d6090
fix output format to be more consistent (#43)
* fix output format to be more consistent

* cleanup header writer interface
2020-07-26 14:16:59 -07:00
Jane Lusby
318241a118
print panics via eprinln to leverage test io capture (#42)
* print panics via eprinln to leverage test io capture

* move things into a display impl to only acquire the lock once

* unfuck indentation

* use original identifier for output stream
2020-07-26 11:32:51 -07:00
Cynthia Coan
1df9ec5f44
add testing for wasm (#38)
* add testing for wasm

utilize wasm-bindgen-test as a developer dependency in order to
actively run wasm tests. wasm currently doesn't have support for
running doctests (and reportedly won't "anytime soon"), and in
order to actually run the tests we need a wasm environment.

the easiest of these to setup & use is wasm-pack which is primarly
built for nodejs. however, if it works in nodejs it should ideally
work in other wasm environments that are similar.

as such a wasm-pack (which utilizies wasm-bindgen) as a developer
dependency has been added that creates a simple error message,
and validates it contains the text of the error (and sections)
sans any formatting. this is meant to validate a base level
of functionality as time goes on.

* fix format

* only add dev-dependency for wasm32

* fix clippy warning

Co-authored-by: Jane Lusby <jlusby@yaah.dev>
2020-07-23 16:23:08 -07:00
Jane Lusby
9e6a349c8e
port color-eyre to new eyre with global hook (#29)
* port color-eyre to new eyre with global hook

* add a singular hook configuration

* add panic handler to globally installed hook

* getting near the end

* remove unused module

* temp: working on capture consistency

* walk back changes that make porting to new release harder

* merge main into hooked

* switch to github color-spantrace and copy from htmlgit status

* move spantrace capture default mode into hook

* rename and reorg section stuff

* switch to released deps

* copy changes from lib.rs to readme

* update snippets and revert to images for readme

* remove extremely fragile format tests
2020-07-05 19:22:57 -07:00
Jane Lusby
fe08025c69
add support for conditional capture of span traces (#33)
* add support for conditional capture of span traces

* document how to disable spantraces
2020-07-05 15:28:02 -07:00
Jane Lusby
69db885ecc
fix issue with spantrace capture in last release (#28) 2020-06-21 13:22:38 -07:00
Jane Lusby
63b8bc71e0
depend on next version of eyre (#27)
* depend on next version of eyre

* more use statement updates

* fix line numbers for windows test
2020-06-21 11:10:21 -07:00
Saquib
b5060a5c16
Fix cleanup warnings in tests/minimal.rs when compiled for windows. (#25) 2020-06-04 11:27:51 -07:00
Jane Lusby
fff76b1424
dedupe ansi-term dependency (#24) 2020-06-02 18:50:18 -07:00
Jane Lusby
3384c06584
fix color intensity (#23)
* fix color intensity

* update test expected strings

* bump version for new release
2020-06-02 18:39:18 -07:00
Jane Lusby
5b6507d455
Simplify sections features (#22)
* Simplify sections features

* cleanup docs a bit

* update docs and switch context to handler
2020-06-02 18:26:02 -07:00
Jane Lusby
fe284a81b1
Try to isolate debug mode perf regression (#20) 2020-05-29 18:28:21 -07:00
Jane Lusby
7b2d9f4218
Add custom section support for reports (#18) 2020-05-25 19:39:26 -07:00
Jane Lusby
9f5defedb7
Add support for custom color-backtrace config (#17)
* Add support for custom color-backtrace config

* update docs and bump version for release
2020-05-18 18:36:22 -07:00
Jane Lusby
65ab3afe2b bump version for new release 2020-05-17 11:10:32 -07:00
Jane Lusby
9517249147
Add windows and macos support in tests (#9) 2020-05-17 11:08:46 -07:00
Jane Lusby
ad8d7cc415
mirror std backtrace capture rules (#14) 2020-05-17 06:45:19 -07:00
Jane Lusby
496a17ec61 bump version of backtrace dep 2020-05-15 11:56:09 -07:00
Jane Lusby
3396e3911f Bump major version to deal with breaking change 2020-05-07 10:38:42 -07:00
Jane Lusby
9154b93381 bump version to update eyre dep 2020-05-07 07:56:52 -07:00
Jane Lusby
ee694c212a
fix links for rustdoc (#3) 2020-05-06 21:07:42 -07:00
Jane Lusby
1ca762d652
create new release to clean up docs and images (#2) 2020-05-06 19:16:44 -07:00
Jane Lusby
1666a4d4f5
fix inconsistent behavior (#1) 2020-05-06 18:56:54 -07:00
Jane Lusby
9a38e54c0d final push hopefully 2020-05-06 18:38:10 -07:00
Jane Lusby
a0823eb0f9 organize consistently 2020-05-06 18:27:48 -07:00
Jane Lusby
d5195a9bd1 add ci 2020-05-06 18:17:19 -07:00
Jane Lusby
0c921a3b70 update docs 2020-05-06 18:16:56 -07:00
Jane Lusby
4ad1e14ade little a comma 2020-05-01 17:31:18 -07:00
Jane Lusby
3f591250a6 update to use indenter and improved color-backtrace and spantrace 2020-05-01 11:28:30 -07:00
Jane Lusby
b8ff7e0fa1 Update pictures 2020-04-25 10:33:27 -07:00
Jane Lusby
08471e1909 Fix example 2020-04-25 10:31:20 -07:00
Jane Lusby
b656a6270b Fix dependency in readme 2020-04-25 10:28:11 -07:00
Jane Lusby
6ce041f710 Fix inconsistent examples 2020-04-25 10:10:01 -07:00
Jane Lusby
f6b7fb3864 Turn on rust syntax highlighting 2020-04-25 10:09:13 -07:00
Jane Lusby
043abca81c Add full example to readme 2020-04-25 10:08:45 -07:00
Jane Lusby
af67c25f9f Fix more links 2020-04-25 10:07:12 -07:00
Jane Lusby
653422ca91 One minor tweek 2020-04-25 10:03:45 -07:00
Jane Lusby
77442e1f16 More docs 2020-04-25 10:03:03 -07:00
Jane Lusby
6c4194a711 document main types 2020-04-25 10:01:42 -07:00
Jane Lusby
4e85352a1e Fix all doc links 2020-04-25 09:45:40 -07:00
Jane Lusby
3edc5c8690 better images again 2020-04-25 09:31:43 -07:00
Jane Lusby
0c1b5be764 fix images in repo 2020-04-25 09:17:48 -07:00
Jane Lusby
a9f059af89 fix failing doctest 2020-04-25 09:15:30 -07:00
Jane Lusby
1f3e10d8d1 Update documentation 2020-04-25 09:14:12 -07:00