-
Notifications
You must be signed in to change notification settings - Fork 68
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
Changes from all commits
Commits
Show all changes
136 commits
Select commit
Hold shift + click to select a range
f444576
initial commit
yaahc cb9fcb8
initial working example
yaahc 373e6d8
pre-release version
yaahc 50587e5
remove eyre from public API
yaahc 1f3e10d
Update documentation
yaahc a9f059a
fix failing doctest
yaahc 0c1b5be
fix images in repo
yaahc 3edc5c8
better images again
yaahc 4e85352
Fix all doc links
yaahc 6c4194a
document main types
yaahc 77442e1
More docs
yaahc 653422c
One minor tweek
yaahc af67c25
Fix more links
yaahc 043abca
Add full example to readme
yaahc f6b7fb3
Turn on rust syntax highlighting
yaahc 6ce041f
Fix inconsistent examples
yaahc b656a62
Fix dependency in readme
yaahc 08471e1
Fix example
yaahc b8ff7e0
Update pictures
yaahc 3f59125
update to use indenter and improved color-backtrace and spantrace
yaahc 4ad1e14
little a comma
yaahc 0c921a3
update docs
yaahc d5195a9
add ci
yaahc a0823eb
organize consistently
yaahc 9a38e54
final push hopefully
yaahc 1666a4d
fix inconsistent behavior (#1)
yaahc 1ca762d
create new release to clean up docs and images (#2)
yaahc ee694c2
fix links for rustdoc (#3)
yaahc 9154b93
bump version to update eyre dep
yaahc 3396e39
Bump major version to deal with breaking change
yaahc 496a17e
bump version of backtrace dep
yaahc ad8d7cc
mirror std backtrace capture rules (#14)
yaahc 9517249
Add windows and macos support in tests (#9)
yaahc 65ab3af
bump version for new release
yaahc 9f5defe
Add support for custom color-backtrace config (#17)
yaahc 7b2d9f4
Add custom section support for reports (#18)
yaahc fe284a8
Try to isolate debug mode perf regression (#20)
yaahc 5b6507d
Simplify sections features (#22)
yaahc 3384c06
fix color intensity (#23)
yaahc fff76b1
dedupe ansi-term dependency (#24)
yaahc b5060a5
Fix cleanup warnings in `tests/minimal.rs` when compiled for windows.…
iamsaquib8 63b8bc7
depend on next version of eyre (#27)
yaahc 69db885
fix issue with spantrace capture in last release (#28)
yaahc fe08025
add support for conditional capture of span traces (#33)
yaahc 9e6a349
port color-eyre to new eyre with global hook (#29)
yaahc 1df9ec5
add testing for wasm (#38)
Mythra 318241a
print panics via eprinln to leverage test io capture (#42)
yaahc 74c46d6
fix output format to be more consistent (#43)
yaahc 544ef9f
Use `<span>` instead of `<font>` in documentation (#44)
9999years 7316c8f
make new release (#46)
yaahc f96519e
Add `__rust_begin_short_backtrace` filter (#48)
yaahc a83c478
Add config option to disable env section (#49)
yaahc 5cf35af
Add panic_note to HookBuilder (#51)
Stupremee 62434e4
Replace `Help` trait with `Section` in README (#52)
Stupremee 1005cfc
owo merge this (#53)
yaahc ecb0642
Fix Section trait to work with Result and Report (#54)
yaahc e3db043
bump version for new release (#55)
yaahc 17c325d
(cargo-release) start next development iteration 0.5.3-alpha.0 (#56)
yaahc ff84554
Add support for customized panic message sections (#57)
yaahc 5365400
prep for release (#59)
yaahc 74fa2c9
oops that didn't quite work (#60)
yaahc d1ff3e8
bump version for next release (#61)
yaahc 0580930
Fix a typo: indenteted ~> indented (#63)
alexwlchan 9c738c3
Implement github issue generator (#62)
yaahc 4ddaeb2
add support for filtering issue generation for errors (#64)
yaahc dd21032
Add support for track caller via new feature flag (#68)
yaahc 030dc5a
Add feature more gates for capture-spantrace (#70)
knutwalker 198600f
new minor version release (#71)
yaahc 60e426e
#66 work in progress make print_panic_info() public (#67)
kellpossible 6063ec8
Fix broken link in README (#75)
Tiwalun 716621f
bump spantrace version to fix a panic (#76)
yaahc 097ae87
Support for custom styles (#69)
d4h0 8916972
Update tracing layer message to be more intuitive
yaahc 7009a52
(cargo-release) version 0.5.11
yaahc 472997e
Merge pull request #81 from yaahc/tracing-layer-msg
yaahc fa3695b
update references to renamed Help trait
yaahc 07b9f03
Merge pull request #87 from yaahc/helpful
yaahc 1480982
Update tracing error
asonix 088ed53
Depend on proper subscriber features
asonix d8f8657
Fix tests (these seem very brittle)
asonix 3df3e93
integrate color-spantrace release
yaahc 73cd61f
fix clippy warnings
yaahc aaa87c2
update the rest of the tests/data files
yaahc 316efcc
integrate the rest of the changes by asonix
yaahc 5624f10
Merge pull request #92 from asonix/asonix/update-tracing-error
yaahc 5cd0abd
Prepare for 0.6 release
yaahc d79aab1
(cargo-release) version 0.6.0
yaahc 3c3641c
Merge pull request #98 from yaahc/release
yaahc 10dfd8d
Join backtrace omission lines
Hoverbear e9e68ad
fmt
Hoverbear 702f71f
Merge pull request #100 from Hoverbear-Consulting/merge-backtrace-omi…
yaahc a2cbb44
fix clippy warning
yaahc 8a8564d
update changelog
yaahc c544079
rustfmt you bitch
yaahc 04319d7
(cargo-release) version 0.6.1
yaahc 801aa67
Merge pull request #101 from yaahc/release
yaahc 615d16c
Add LICENSE files to close #90
dbanty 2128f07
Merge pull request #104 from dbanty/master
yaahc 9cbcd93
add config option to disable location section
Emilgardis 08e216d
Merge pull request #106 from Emilgardis/display_location_section
yaahc 5890bab
fix clippy warnings
yaahc 5f8b475
Merge pull request #111 from yaahc/appeasement
yaahc 6ebf845
Update changelog for new release
yaahc 6a9b70b
(cargo-release) version 0.6.2
yaahc ede8650
Merge pull request #112 from yaahc/release
yaahc 5aa7c40
add suppress_backtrace
chris-laplante 99df70d
Merge branch 'yaahc:master' into cpl/suppress_backtrace
chris-laplante 48037df
fix: Do not panic on multiple `install` calls
jaysonsantos 9e6280b
Update version in setup instructions to 0.6
sciguy16 bbe5705
Merge pull request #115 from sciguy16/version-update
yaahc 22ac4da
chore: fix panic compose example
jaysonsantos c770783
Merge branch 'master' into master
jaysonsantos d70363e
fix: Extract backward compatible bits from `into_hooks` into `try_int…
jaysonsantos 1400430
Apply suggestions from code review
yaahc ad68589
Merge pull request #114 from jaysonsantos/master
yaahc 2821e2b
cargo fmt
chris-laplante 93fcb6f
Merge branch 'master' into cpl/suppress_backtrace
yaahc 4a7b4d6
Merge pull request #113 from chris-laplante/cpl/suppress_backtrace
yaahc 5993821
Add 'color-eyre/' from commit '4a7b4d6988c6b0da5e04e29c9d6e10595b5dc302'
pksunkara 7c7079e
Add color-eyre to workspace
pksunkara a504a60
fix: warnings for newer rust versions
ten3roberts eedde51
fix: test_error_backwards_compatability
ten3roberts 2629d61
fix: no-default-features test
ten3roberts 7fadb08
fix: track caller test
ten3roberts b4a26d7
fix: spantrace test
ten3roberts 4a5297d
Merge pull request #140 from eyre-rs/fix-ci
pksunkara d825b49
fix: conflicting example binaries
ten3roberts 57216d0
Merge remote-tracking branch 'origin/master' into color-eyre
ten3roberts e3fd620
Merge commit '4a5297d30b0f0754a3bbc47b71bb55b04960c0ad' into color-eyre
ten3roberts e61cf4e
fix: miri tests
ten3roberts de636fa
fix: clippy
ten3roberts 1da23d9
Merge branch 'master' into color-eyre
ten3roberts eb26e02
fix: color-eyre theme test suite backtraces to match the tested MSRV
ten3roberts 8ebc308
fix: make theme test more lenient
ten3roberts cb4bab6
chore: update issues redirect
ten3roberts eb8d059
Merge remote-tracking branch 'origin/master' into color-eyre
ten3roberts File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,135 @@ | ||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: {} | ||
|
||
name: Continuous integration | ||
|
||
jobs: | ||
check: | ||
name: Check | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
rust: | ||
- stable | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: ${{ matrix.rust }} | ||
override: true | ||
- uses: actions-rs/cargo@v1 | ||
with: | ||
command: check | ||
|
||
test-features: | ||
name: Test Features | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
features: | ||
- | ||
- --all-features | ||
- --no-default-features | ||
- --no-default-features --features issue-url | ||
- --no-default-features --features capture-spantrace | ||
- --no-default-features --features track-caller | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
override: true | ||
- uses: actions-rs/cargo@v1 | ||
with: | ||
command: test | ||
args: ${{ matrix.features }} | ||
|
||
test-versions: | ||
name: Test Versions | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
target: | ||
- x86_64-unknown-linux-gnu | ||
- wasm32-unknown-unknown | ||
rust: | ||
- stable | ||
- beta | ||
- nightly | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
target: ${{ matrix.target }} | ||
toolchain: ${{ matrix.rust }} | ||
override: true | ||
- name: install test runner for wasm | ||
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh | ||
if: ${{ matrix.target == 'wasm32-unknown-unknown' }} | ||
- uses: actions-rs/cargo@v1 | ||
with: | ||
command: test | ||
target: ${{ matrix.target }} | ||
toolchain: ${{ matrix.rust }} | ||
if: ${{ matrix.target != 'wasm32-unknown-unknown' }} | ||
- name: run wasm tests | ||
run: wasm-pack test --node | ||
if: ${{ matrix.target == 'wasm32-unknown-unknown' }} | ||
|
||
test-os: | ||
name: Test Operating Systems | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-latest, macOS-latest] | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
profile: minimal | ||
override: true | ||
- uses: actions-rs/cargo@v1 | ||
with: | ||
command: test | ||
|
||
fmt: | ||
name: Rustfmt | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
rust: | ||
- stable | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: ${{ matrix.rust }} | ||
override: true | ||
- run: rustup component add rustfmt | ||
- uses: actions-rs/cargo@v1 | ||
with: | ||
command: fmt | ||
args: --all -- --check | ||
|
||
clippy: | ||
name: Clippy | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
rust: | ||
- stable | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: ${{ matrix.rust }} | ||
override: true | ||
- run: rustup component add clippy | ||
- uses: actions-rs/cargo@v1 | ||
with: | ||
command: clippy | ||
args: -- -D warnings |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
# Changelog | ||
All notable changes to this project will be documented in this file. | ||
|
||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), | ||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | ||
|
||
<!-- next-header --> | ||
|
||
## [Unreleased] - ReleaseDate | ||
|
||
## [0.6.2] - 2022-07-11 | ||
### Added | ||
- Option to disable display of location section in error reports | ||
|
||
## [0.6.1] - 2022-02-24 | ||
### Changed | ||
- Collapsed backtrace help text into fewer lines | ||
|
||
## [0.6.0] - 2022-01-12 | ||
### Changed | ||
- Updated dependencies to match newest tracing versions | ||
|
||
## [0.5.11] - 2021-04-13 | ||
|
||
## [0.5.10] - 2020-12-02 | ||
### Added | ||
- Support custom themes | ||
|
||
## [0.5.9] - 2020-12-02 | ||
### Fixed | ||
- Bumped color-spantrace dependency version to fix a panic | ||
|
||
## [0.5.8] - 2020-11-23 | ||
### Added | ||
- Exposed internal interfaces for the panic handler so that it can be wrapped | ||
by consumers to customize the behaviour of the panic hook. | ||
|
||
## [0.5.7] - 2020-11-05 | ||
### Fixed | ||
- Added missing `cfg`s that caused compiler errors when only enabling the | ||
`issue-url` feature | ||
|
||
## [0.5.6] - 2020-10-02 | ||
### Added | ||
- Add support for track caller added in eyre 0.6.1 and print original | ||
callsites of errors in all `eyre::Reports` by default | ||
|
||
## [0.5.5] - 2020-09-21 | ||
### Added | ||
- add `issue_filter` method to `HookBuilder` for disabling issue generation | ||
based on the error encountered. | ||
|
||
## [0.5.4] - 2020-09-17 | ||
### Added | ||
- Add new "issue-url" feature for generating issue creation links in error | ||
reports pre-populated with information about the error | ||
|
||
## [0.5.3] - 2020-09-14 | ||
### Added | ||
- add `panic_section` method to `HookBuilder` for overriding the printer for | ||
the panic message at the start of panic reports | ||
|
||
## [0.5.2] - 2020-08-31 | ||
### Added | ||
- make it so all `Section` trait methods can be called on `Report` in | ||
addition to the already supported usage on `Result<T, E: Into<Report>>` | ||
- panic_section to `HookBuilder` to add custom sections to panic reports | ||
- display_env_section to `HookBuilder` to disable the output indicating what | ||
environment variables can be set to manipulate the error reports | ||
### Changed | ||
- switched from ansi_term to owo-colors for colorizing output, allowing for | ||
better compatibility with the Display trait | ||
|
||
<!-- next-url --> | ||
[Unreleased]: https://github.com/eyre-rs/color-eyre/compare/v0.6.2...HEAD | ||
[0.6.2]: https://github.com/eyre-rs/color-eyre/compare/v0.6.1...v0.6.2 | ||
[0.6.1]: https://github.com/eyre-rs/color-eyre/compare/v0.6.0...v0.6.1 | ||
[0.6.0]: https://github.com/eyre-rs/color-eyre/compare/v0.5.11...v0.6.0 | ||
[0.5.11]: https://github.com/eyre-rs/color-eyre/compare/v0.5.10...v0.5.11 | ||
[0.5.10]: https://github.com/eyre-rs/color-eyre/compare/v0.5.9...v0.5.10 | ||
[0.5.9]: https://github.com/eyre-rs/color-eyre/compare/v0.5.8...v0.5.9 | ||
[0.5.8]: https://github.com/eyre-rs/color-eyre/compare/v0.5.7...v0.5.8 | ||
[0.5.7]: https://github.com/eyre-rs/color-eyre/compare/v0.5.6...v0.5.7 | ||
[0.5.6]: https://github.com/eyre-rs/color-eyre/compare/v0.5.5...v0.5.6 | ||
[0.5.5]: https://github.com/eyre-rs/color-eyre/compare/v0.5.4...v0.5.5 | ||
[0.5.4]: https://github.com/eyre-rs/color-eyre/compare/v0.5.3...v0.5.4 | ||
[0.5.3]: https://github.com/eyre-rs/color-eyre/compare/v0.5.2...v0.5.3 | ||
[0.5.2]: https://github.com/eyre-rs/color-eyre/releases/tag/v0.5.2 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
[package] | ||
name = "color-eyre" | ||
version = "0.6.2" | ||
description = "An error report handler for panics and eyre::Reports for colorful, consistent, and well formatted error reports for all kinds of errors." | ||
documentation = "https://docs.rs/color-eyre" | ||
|
||
authors = { workspace = true } | ||
edition = { workspace = true } | ||
license = { workspace = true } | ||
repository = { workspace = true } | ||
readme = { workspace = true } | ||
rust-version = { workspace = true } | ||
|
||
[features] | ||
default = ["track-caller", "capture-spantrace"] | ||
capture-spantrace = ["tracing-error", "color-spantrace"] | ||
issue-url = ["url"] | ||
track-caller = [] | ||
|
||
[dependencies] | ||
eyre = "0.6.1" | ||
tracing-error = { version = "0.2.0", optional = true } | ||
backtrace = { version = "0.3.48", features = ["gimli-symbolize"] } | ||
indenter = { workspace = true } | ||
owo-colors = { workspace = true } | ||
color-spantrace = { version = "0.2", optional = true } | ||
once_cell = { workspace = true } | ||
url = { version = "2.1.1", optional = true } | ||
|
||
[dev-dependencies] | ||
tracing-subscriber = { version = "0.3.0", features = ["env-filter"] } | ||
tracing = "0.1.13" | ||
pretty_assertions = "1.0.0" | ||
thiserror = "1.0.19" | ||
ansi-parser = "0.8.0" | ||
|
||
[target.'cfg(target_arch = "wasm32")'.dev-dependencies] | ||
wasm-bindgen-test = "0.3.15" | ||
|
||
[package.metadata.docs.rs] | ||
all-features = true | ||
rustdoc-args = ["--cfg", "docsrs"] | ||
|
||
[package.metadata.release] | ||
dev-version = false | ||
|
||
[[package.metadata.release.pre-release-replacements]] | ||
file = "CHANGELOG.md" | ||
search = "Unreleased" | ||
replace="{{version}}" | ||
|
||
[[package.metadata.release.pre-release-replacements]] | ||
file = "src/lib.rs" | ||
search = "#!\\[doc\\(html_root_url.*" | ||
replace = "#![doc(html_root_url = \"https://docs.rs/{{crate_name}}/{{version}}\")]" | ||
exactly = 1 | ||
|
||
[[package.metadata.release.pre-release-replacements]] | ||
file = "CHANGELOG.md" | ||
search = "\\.\\.\\.HEAD" | ||
replace="...{{tag_name}}" | ||
exactly = 1 | ||
|
||
[[package.metadata.release.pre-release-replacements]] | ||
file = "CHANGELOG.md" | ||
search = "ReleaseDate" | ||
replace="{{date}}" | ||
|
||
[[package.metadata.release.pre-release-replacements]] | ||
file="CHANGELOG.md" | ||
search="<!-- next-header -->" | ||
replace="<!-- next-header -->\n\n## [Unreleased] - ReleaseDate" | ||
exactly=1 | ||
|
||
[[package.metadata.release.pre-release-replacements]] | ||
file="CHANGELOG.md" | ||
search="<!-- next-url -->" | ||
replace="<!-- next-url -->\n[Unreleased]: https://github.com/eyre-rs/{{crate_name}}/compare/{{tag_name}}...HEAD" | ||
exactly=1 | ||
|
||
[[example]] | ||
name = "color-eyre-usage" | ||
path = "examples/usage.rs" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../LICENSE-APACHE |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../LICENSE-MIT |
Oops, something went wrong.
Oops, something went wrong.
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.
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.
How does changing to "--no-default-features" for eyre's track-caller and auto-install tests relate to adding color-eyre to the workspace?
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.
Not sure, I think it was Pavan who added that to increase the test coverage for feature combinations. This is one of the earliest commits
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.
Well, it's replacing two feature combinations, i'm not sure that it expands the test coverage. If we want to increase the test coverage we could keep both
--features
and--no-features
.