Skip to content
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

Add color-eyre to workspace #110

Merged
merged 136 commits into from
Mar 14, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
136 commits
Select commit Hold shift + click to select a range
f444576
initial commit
yaahc Apr 24, 2020
cb9fcb8
initial working example
yaahc Apr 24, 2020
373e6d8
pre-release version
yaahc Apr 24, 2020
50587e5
remove eyre from public API
yaahc Apr 25, 2020
1f3e10d
Update documentation
yaahc Apr 25, 2020
a9f059a
fix failing doctest
yaahc Apr 25, 2020
0c1b5be
fix images in repo
yaahc Apr 25, 2020
3edc5c8
better images again
yaahc Apr 25, 2020
4e85352
Fix all doc links
yaahc Apr 25, 2020
6c4194a
document main types
yaahc Apr 25, 2020
77442e1
More docs
yaahc Apr 25, 2020
653422c
One minor tweek
yaahc Apr 25, 2020
af67c25
Fix more links
yaahc Apr 25, 2020
043abca
Add full example to readme
yaahc Apr 25, 2020
f6b7fb3
Turn on rust syntax highlighting
yaahc Apr 25, 2020
6ce041f
Fix inconsistent examples
yaahc Apr 25, 2020
b656a62
Fix dependency in readme
yaahc Apr 25, 2020
08471e1
Fix example
yaahc Apr 25, 2020
b8ff7e0
Update pictures
yaahc Apr 25, 2020
3f59125
update to use indenter and improved color-backtrace and spantrace
yaahc May 1, 2020
4ad1e14
little a comma
yaahc May 2, 2020
0c921a3
update docs
yaahc May 7, 2020
d5195a9
add ci
yaahc May 7, 2020
a0823eb
organize consistently
yaahc May 7, 2020
9a38e54
final push hopefully
yaahc May 7, 2020
1666a4d
fix inconsistent behavior (#1)
yaahc May 7, 2020
1ca762d
create new release to clean up docs and images (#2)
yaahc May 7, 2020
ee694c2
fix links for rustdoc (#3)
yaahc May 7, 2020
9154b93
bump version to update eyre dep
yaahc May 7, 2020
3396e39
Bump major version to deal with breaking change
yaahc May 7, 2020
496a17e
bump version of backtrace dep
yaahc May 15, 2020
ad8d7cc
mirror std backtrace capture rules (#14)
yaahc May 17, 2020
9517249
Add windows and macos support in tests (#9)
yaahc May 17, 2020
65ab3af
bump version for new release
yaahc May 17, 2020
9f5defe
Add support for custom color-backtrace config (#17)
yaahc May 19, 2020
7b2d9f4
Add custom section support for reports (#18)
yaahc May 26, 2020
fe284a8
Try to isolate debug mode perf regression (#20)
yaahc May 30, 2020
5b6507d
Simplify sections features (#22)
yaahc Jun 3, 2020
3384c06
fix color intensity (#23)
yaahc Jun 3, 2020
fff76b1
dedupe ansi-term dependency (#24)
yaahc Jun 3, 2020
b5060a5
Fix cleanup warnings in `tests/minimal.rs` when compiled for windows.…
iamsaquib8 Jun 4, 2020
63b8bc7
depend on next version of eyre (#27)
yaahc Jun 21, 2020
69db885
fix issue with spantrace capture in last release (#28)
yaahc Jun 21, 2020
fe08025
add support for conditional capture of span traces (#33)
yaahc Jul 5, 2020
9e6a349
port color-eyre to new eyre with global hook (#29)
yaahc Jul 6, 2020
1df9ec5
add testing for wasm (#38)
Mythra Jul 23, 2020
318241a
print panics via eprinln to leverage test io capture (#42)
yaahc Jul 26, 2020
74c46d6
fix output format to be more consistent (#43)
yaahc Jul 26, 2020
544ef9f
Use `<span>` instead of `<font>` in documentation (#44)
9999years Jul 30, 2020
7316c8f
make new release (#46)
yaahc Aug 6, 2020
f96519e
Add `__rust_begin_short_backtrace` filter (#48)
yaahc Aug 17, 2020
a83c478
Add config option to disable env section (#49)
yaahc Aug 22, 2020
5cf35af
Add panic_note to HookBuilder (#51)
Stupremee Aug 24, 2020
62434e4
Replace `Help` trait with `Section` in README (#52)
Stupremee Aug 24, 2020
1005cfc
owo merge this (#53)
yaahc Aug 27, 2020
ecb0642
Fix Section trait to work with Result and Report (#54)
yaahc Sep 1, 2020
e3db043
bump version for new release (#55)
yaahc Sep 1, 2020
17c325d
(cargo-release) start next development iteration 0.5.3-alpha.0 (#56)
yaahc Sep 1, 2020
ff84554
Add support for customized panic message sections (#57)
yaahc Sep 15, 2020
5365400
prep for release (#59)
yaahc Sep 15, 2020
74fa2c9
oops that didn't quite work (#60)
yaahc Sep 15, 2020
d1ff3e8
bump version for next release (#61)
yaahc Sep 15, 2020
0580930
Fix a typo: indenteted ~> indented (#63)
alexwlchan Sep 16, 2020
9c738c3
Implement github issue generator (#62)
yaahc Sep 17, 2020
4ddaeb2
add support for filtering issue generation for errors (#64)
yaahc Sep 21, 2020
dd21032
Add support for track caller via new feature flag (#68)
yaahc Oct 3, 2020
030dc5a
Add feature more gates for capture-spantrace (#70)
knutwalker Nov 6, 2020
198600f
new minor version release (#71)
yaahc Nov 6, 2020
60e426e
#66 work in progress make print_panic_info() public (#67)
kellpossible Nov 24, 2020
6063ec8
Fix broken link in README (#75)
Tiwalun Nov 27, 2020
716621f
bump spantrace version to fix a panic (#76)
yaahc Dec 2, 2020
097ae87
Support for custom styles (#69)
d4h0 Dec 4, 2020
8916972
Update tracing layer message to be more intuitive
yaahc Apr 13, 2021
7009a52
(cargo-release) version 0.5.11
yaahc Apr 13, 2021
472997e
Merge pull request #81 from yaahc/tracing-layer-msg
yaahc Apr 14, 2021
fa3695b
update references to renamed Help trait
yaahc Jul 23, 2021
07b9f03
Merge pull request #87 from yaahc/helpful
yaahc Jul 23, 2021
1480982
Update tracing error
asonix Dec 26, 2021
088ed53
Depend on proper subscriber features
asonix Dec 26, 2021
d8f8657
Fix tests (these seem very brittle)
asonix Dec 26, 2021
3df3e93
integrate color-spantrace release
yaahc Jan 13, 2022
73cd61f
fix clippy warnings
yaahc Jan 13, 2022
aaa87c2
update the rest of the tests/data files
yaahc Jan 13, 2022
316efcc
integrate the rest of the changes by asonix
yaahc Jan 13, 2022
5624f10
Merge pull request #92 from asonix/asonix/update-tracing-error
yaahc Jan 13, 2022
5cd0abd
Prepare for 0.6 release
yaahc Jan 13, 2022
d79aab1
(cargo-release) version 0.6.0
yaahc Jan 13, 2022
3c3641c
Merge pull request #98 from yaahc/release
yaahc Jan 13, 2022
10dfd8d
Join backtrace omission lines
Hoverbear Feb 25, 2022
e9e68ad
fmt
Hoverbear Feb 25, 2022
702f71f
Merge pull request #100 from Hoverbear-Consulting/merge-backtrace-omi…
yaahc Feb 25, 2022
a2cbb44
fix clippy warning
yaahc Feb 25, 2022
8a8564d
update changelog
yaahc Feb 25, 2022
c544079
rustfmt you bitch
yaahc Feb 25, 2022
04319d7
(cargo-release) version 0.6.1
yaahc Feb 25, 2022
801aa67
Merge pull request #101 from yaahc/release
yaahc Mar 2, 2022
615d16c
Add LICENSE files to close #90
dbanty Mar 16, 2022
2128f07
Merge pull request #104 from dbanty/master
yaahc May 5, 2022
9cbcd93
add config option to disable location section
Emilgardis Mar 17, 2022
08e216d
Merge pull request #106 from Emilgardis/display_location_section
yaahc Jul 11, 2022
5890bab
fix clippy warnings
yaahc Jul 11, 2022
5f8b475
Merge pull request #111 from yaahc/appeasement
yaahc Jul 11, 2022
6ebf845
Update changelog for new release
yaahc Jul 11, 2022
6a9b70b
(cargo-release) version 0.6.2
yaahc Jul 11, 2022
ede8650
Merge pull request #112 from yaahc/release
yaahc Jul 11, 2022
5aa7c40
add suppress_backtrace
chris-laplante Jul 15, 2022
99df70d
Merge branch 'yaahc:master' into cpl/suppress_backtrace
chris-laplante Jul 21, 2022
48037df
fix: Do not panic on multiple `install` calls
jaysonsantos Jul 26, 2022
9e6280b
Update version in setup instructions to 0.6
sciguy16 Jul 26, 2022
bbe5705
Merge pull request #115 from sciguy16/version-update
yaahc Jul 26, 2022
22ac4da
chore: fix panic compose example
jaysonsantos Jul 27, 2022
c770783
Merge branch 'master' into master
jaysonsantos Jul 27, 2022
d70363e
fix: Extract backward compatible bits from `into_hooks` into `try_int…
jaysonsantos Jul 27, 2022
1400430
Apply suggestions from code review
yaahc Jul 27, 2022
ad68589
Merge pull request #114 from jaysonsantos/master
yaahc Jul 29, 2022
2821e2b
cargo fmt
chris-laplante Jul 30, 2022
93fcb6f
Merge branch 'master' into cpl/suppress_backtrace
yaahc Aug 1, 2022
4a7b4d6
Merge pull request #113 from chris-laplante/cpl/suppress_backtrace
yaahc Aug 4, 2022
5993821
Add 'color-eyre/' from commit '4a7b4d6988c6b0da5e04e29c9d6e10595b5dc302'
pksunkara Oct 11, 2023
7c7079e
Add color-eyre to workspace
pksunkara Oct 11, 2023
a504a60
fix: warnings for newer rust versions
ten3roberts Nov 7, 2023
eedde51
fix: test_error_backwards_compatability
ten3roberts Nov 7, 2023
2629d61
fix: no-default-features test
ten3roberts Nov 7, 2023
7fadb08
fix: track caller test
ten3roberts Nov 7, 2023
b4a26d7
fix: spantrace test
ten3roberts Nov 7, 2023
4a5297d
Merge pull request #140 from eyre-rs/fix-ci
pksunkara Nov 10, 2023
d825b49
fix: conflicting example binaries
ten3roberts Dec 8, 2023
57216d0
Merge remote-tracking branch 'origin/master' into color-eyre
ten3roberts Dec 8, 2023
e3fd620
Merge commit '4a5297d30b0f0754a3bbc47b71bb55b04960c0ad' into color-eyre
ten3roberts Dec 11, 2023
e61cf4e
fix: miri tests
ten3roberts Dec 11, 2023
de636fa
fix: clippy
ten3roberts Dec 11, 2023
1da23d9
Merge branch 'master' into color-eyre
ten3roberts Jan 23, 2024
eb26e02
fix: color-eyre theme test suite backtraces to match the tested MSRV
ten3roberts Jan 23, 2024
8ebc308
fix: make theme test more lenient
ten3roberts Jan 25, 2024
cb4bab6
chore: update issues redirect
ten3roberts Jan 29, 2024
eb8d059
Merge remote-tracking branch 'origin/master' into color-eyre
ten3roberts Mar 14, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions color-eyre/tests/data/theme_error_control_minimal.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@ Error:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 ⋮ 5 frames hidden ⋮ 
6: theme::get_error::create_report::h43540daddae98383
at /home/freja/dev/rust/eyre/color-eyre/tests/theme.rs:17
at /home/username/dev/rust/eyre/color-eyre/tests/theme.rs:17
thenorili marked this conversation as resolved.
Show resolved Hide resolved
7: theme::get_error::{{closure}}::h40bbef2f4cd93fab
at /home/freja/dev/rust/eyre/color-eyre/tests/theme.rs:26
at /home/username/dev/rust/eyre/color-eyre/tests/theme.rs:26
8: core::option::Option<T>::ok_or_else::h8aa47839ff49cfbe
at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/core/src/option.rs:1087
9: theme::get_error::h78b5b4d52bfbbad0
at /home/freja/dev/rust/eyre/color-eyre/tests/theme.rs:26
at /home/username/dev/rust/eyre/color-eyre/tests/theme.rs:26
10: theme::test_error_backwards_compatibility::h9de398ce80defffa
at /home/freja/dev/rust/eyre/color-eyre/tests/theme.rs:45
at /home/username/dev/rust/eyre/color-eyre/tests/theme.rs:45
11: theme::test_error_backwards_compatibility::{{closure}}::hbe7b8ad2562c4dc4
at /home/freja/dev/rust/eyre/color-eyre/tests/theme.rs:43
at /home/username/dev/rust/eyre/color-eyre/tests/theme.rs:43
12: core::ops::function::FnOnce::call_once::hfc715417a1b707c5
at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/core/src/ops/function.rs:248
13: core::ops::function::FnOnce::call_once::h9ee1367930602049
Expand All @@ -43,4 +43,4 @@ Error:
Suggestion: suggestion

Run with COLORBT_SHOW_HIDDEN=1 environment variable to disable frame filtering.
Run with RUST_BACKTRACE=full to include source snippets.
Run with RUST_BACKTRACE=full to include source snippets.
4 changes: 2 additions & 2 deletions color-eyre/tests/data/theme_panic_control_no_spantrace.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Finished dev [unoptimized + debuginfo] target(s) in 0.07s
Running `/home/freja/dev/rust/eyre/target/debug/examples/theme_test_helper`
Running `/home/username/dev/rust/eyre/target/debug/examples/theme_test_helper`
The application panicked (crashed).
Message: <non string panic payload>
Location: color-eyre/examples/theme_test_helper.rs:38
Expand All @@ -9,7 +9,7 @@ Location: color-eyre/examples/theme_test_helper.rs:38
7: std::panic::panic_any::h4a05c03c4d0c389c
at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/panic.rs:61
8: theme_test_helper::main::hfc653b28cad3659d
at /home/freja/dev/rust/eyre/color-eyre/examples/theme_test_helper.rs:38
at /home/username/dev/rust/eyre/color-eyre/examples/theme_test_helper.rs:38
9: core::ops::function::FnOnce::call_once::hb0110cdf4417a5ed
at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/core/src/ops/function.rs:248
 ⋮ 16 frames hidden ⋮ 
Expand Down
48 changes: 32 additions & 16 deletions color-eyre/tests/theme.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,9 @@ fn test_backwards_compatibility(target: String, file_name: &str) {
// `unwrap` should never fail with files generated by this function
let control = String::from_utf8(fs::read(file_path).unwrap()).unwrap();

fn f(s: &str) -> (Vec<Output>, Vec<AnsiSequence>) {
let all: Vec<_> = s.ansi_parse().collect();
let ansi: Vec<_> = s
fn split_ansi_output(input: &str) -> (Vec<Output>, Vec<AnsiSequence>) {
let all: Vec<_> = input.ansi_parse().collect();
let ansi: Vec<_> = input
.ansi_parse()
.filter_map(|x| {
if let Output::Escape(ansi) = x {
Expand All @@ -165,8 +165,26 @@ fn test_backwards_compatibility(target: String, file_name: &str) {
(all, ansi)
}

let (_control_tokens, control_ansi) = f(&control);
let (_target_tokens, target_ansi) = f(&target);
fn normalize_backtrace(input: &str) -> String {
input
.lines()
.take_while(|v| !v.contains("core::panic"))
.collect::<Vec<_>>()
.join("\n")
}

let control = normalize_backtrace(&control);
let target = normalize_backtrace(&target);
let (_control_tokens, control_ansi) = split_ansi_output(&control);
let (_target_tokens, target_ansi) = split_ansi_output(&target);

fn section(title: &str, content: impl AsRef<str>) -> String {
format!(
"{}\n{}",
format!("-------- {title} --------").red(),
content.as_ref()
)
}

// pretty_assertions::assert_eq!(target, control);
let msg = [
Expand All @@ -175,23 +193,21 @@ fn test_backwards_compatibility(target: String, file_name: &str) {
format!("{}", "\x1b[0m\n\nANSI escape sequences are not identical to control!".red()),
// ^ `\x1b[0m` clears previous ANSI escape sequences

format!("{}", "CONTROL:".red()),
format!("{}{}", "CONTROL STRING =\n".red(), &control),
//format!("{}{:?}", "CONTROL DEBUG STRING =\n".red(), &control),
//format!("{}{:?}", "CONTROL ANSI PARSER OUTPUT =\n".red(), &_control_tokens),
//format!("{}{:?}", "CONTROL ANSI PARSER ANSI =\n".red(), &control_ansi),
section("CONTROL STRING", &control),
// section("CONTROL DEBUG STRING", format!("{control:?}")),
// section("CONTROL ANSI PARSER OUTPUT", format!("{_control_tokens:?}")),
// section("CONTROL ANSI PARSER ANSI", format!("{control_ansi:?}")),

format!("{}", "CURRENT:".red()),
format!("{}{}", "CURRENT STRING =\n".red(), &target),
//format!("{}{:?}", "CURRENT DEBUG STRING =\n".red(), &target),
//format!("{}{:?}", "CURRENT ANSI PARSER OUTPUT =\n".red(), &_target_tokens),
//format!("{}{:?}", "CURRENT ANSI PARSER ANSI =\n".red(), &target_ansi),
section("CURRENT STRING", &target),
// section("CURRENT DEBUG STRING", format!("{target:?}")),
// section("CURRENT ANSI PARSER OUTPUT", format!("{_target_tokens:?}")),
// section("CURRENT ANSI PARSER ANSI", format!("{target_ansi:?}")),

format!("{}", "See the src of this test for more information about the test and ways to include/exclude debugging information.\n\n".red()),

].join("\n\n");

assert_eq!(target_ansi, control_ansi, "{}", &msg);
pretty_assertions::assert_eq!(target_ansi, control_ansi, "{}", &msg);

/*
# Tips for debugging test failures
Expand Down