82 Commits

Author SHA1 Message Date
Freja Roberts
dacfb5566e
Merge branch 'master' into fix-nightly-backtraces 2024-05-13 18:47:47 +02:00
Freja Roberts
f80de3e49e fix: compile probe and nightly backtraces
This addresses the invalid compile probe testing for a non-longer
existing feature by updating it and eyre to use the
`error_generic_member_access` features instead.

The report and errors have all been updated to accomodate this and the
new backtrace provide API

Fixes: #84 and #97
2024-04-25 23:27:18 +02:00
Jubilee Young
6e2ffcc0c2 Bump workspace to owo-colors 4.0
Requires adding a path dependency in color-eyre on color-spantrace
so that the versions agree. Fortunately we can do that now!
2024-04-25 14:26:24 -07:00
Freja Roberts
d825b49a11 fix: conflicting example binaries 2023-12-08 16:53:14 +01:00
Pavan Kumar Sunkara
7c7079ed6e Add color-eyre to workspace 2023-10-11 21:47:49 +01:00
Pavan Kumar Sunkara
e42d667d15 Add color-spantrace to workspace 2023-10-03 21:18:59 +01:00
Pavan Kumar Sunkara
a443fd444e
Move eyre code into a folder (#107) 2023-10-03 13:08:47 -07:00
Pavan Kumar Sunkara
be31cf59ff Create foundation for monorepo 2023-09-20 00:12:33 +01:00
Tei Leelo Roberts
9f4ecc497e
Fix miri validation errors through now stricter provenance (#103)
* fix(miri): box transmute and invalid references

The general causes for the miri invalidation is the prevelant use of
`Box` and its references to `ErrorImpl<()>`.

`mem::transmute` does not preserve the tag stack for transmuting the
boxes.

Additionally, having references to `ErrorImpl<()>` which has a different
layout than the allocation or `ErrorImpl<E>` for some unknown `E`. This
causes the new "untyped" reference to now have a provenance that
includes the size of E and thus is outside the provenance.

* fix(miri): downcast_mut using `&mut _ => *const _ => *mut`

* fix(miri): stub file reading

* fix(miri): don't construct temp references of shunk provenance

* ci: miri

* fix: `unsafe_op_in_unsafe_fn`

* chore!: bump MSRV

* chore: address PR comments

* fix: ci workflow names

* chore: raise msrv to 1.65 (addr2line)

* chore: revert distinctive CI names due to branch protection rules

The new names, such as `Test Platform Matrix` which do make it easier to
see which jobs failed, rather than msrv, test, and miri all being called
`Test Suite`, the in-place branch protection rules wait forever until
the now non-existent `Test Suite` passes
2023-09-19 13:02:20 -07:00
Tei Leelo Roberts
2d984da845
Cleanup internals (#101)
* fix: const_err is not a hard error

See: https://github.com/rust-lang/rust/issues/71800

* fix: lints

* fix: macro doctests

* fix: renamed lint

* fix: restore use of enum variant
2023-08-16 11:52:32 -07:00
Jane Lusby
b8f3892754
Release 0.6.8 (#74)
* Update changelog for new release

* Add recommendations on API stability

* (cargo-release) version 0.6.8
2022-04-04 10:31:50 -07:00
William D. Jones
769e26e4ab
Add must-install feature, so that a non-default handler can be the on… (#52)
* Add must-install feature, so that a non-default handler can be the only handler consuming .text.

* Provide a better panic message if `must-install` feature is enabled.

Co-authored-by: Jane Lusby <jlusby42@gmail.com>

* Bump version because new feature was added.

* Convert must-install feature to auto-install to avoid negative features.

* Add ability to manually install DefaultHandler (for when auto-install is disabled).

* Ensure doctests pass when auto-install feature is disabled.

* Integration tests now succeed without auto-install feature.

* Add integration test for when auto-install feature is disabled.

* Add auto-install feature testing to CI.

* cargo fmt.

Co-authored-by: Jane Lusby <jlusby42@gmail.com>
Co-authored-by: Jane Lusby <jlusby@yaah.dev>
2022-03-25 13:32:39 -07:00
Jane Lusby
f4ebce4518
release 0.6.7 (#71)
* update changelog

* (cargo-release) version 0.6.7
2022-02-24 21:10:36 -08:00
Jane Lusby
fb77d1b783
Release 0.6.6 (#67)
* update changelog

* mention new format args capture in docs

* cfg doctest to compile on all versions of rustc

* update field for newer versions of cargo release

* (cargo-release) version 0.6.6
2022-01-19 15:44:40 -08:00
Jane Lusby
54933ea76d
Release 0.6.5 (#49)
* Release 0.6.5

* (cargo-release) version 0.6.5
2021-07-01 22:18:00 +00:00
Ryan Butler
1ea7c204e6
Add support for conversion to pyo3::PyErr (#47)
* Added convertion to pyo3::PyErr gated behind feature flag

* Added test_pyo3

* fix ci to not test unsupportable feature msrv

* fix rustfmt

Co-authored-by: Jane Lusby <jlusby@yaah.dev>
2021-01-05 09:49:15 -08:00
Jane Lusby
60218fff20
Add track_caller on APIs missing it (#48)
This change adds `track_caller` annotations to `context.rs` on various trait helper methods (`wrap_err`) that were missing it. It also adds tests for these APIs to ensure that the location captured is in the file that created the error.
2021-01-04 18:08:27 +00:00
Jane Lusby
8e5d24a73f
New minor version release for track caller fixes (#43)
* Update changelog

* (cargo-release) version 0.6.3

* (cargo-release) start next development iteration 0.6.4-alpha.0
2020-11-11 15:48:38 -08:00
Jane Lusby
0722bab8ea
fix missing track caller annotation (#40)
* fix missing track caller annotation

* (cargo-release) version 0.6.2

* (cargo-release) start next development iteration 0.6.3-alpha.0
2020-10-27 12:46:16 -07:00
Jane Lusby
032d879381
Implement track caller support for eyre::Report (#36)
* Implement track caller support for eyre::Report

* fix errors on old compiler version

* fix tests

* add a changelog

* (cargo-release) version 0.6.1-rc.1

* Allow missing replacement for diff range

* maybe it has to be deleted

* okay try removing it entirely...

* (cargo-release) version 0.6.1

* (cargo-release) start next development iteration 0.6.2-alpha.0

* add back missing replacement
2020-09-28 19:38:53 -07:00
Jane Lusby
f39eaff0b2
Switch report handler to a global hook (#29)
* Switch report handler to a global hook

* more cleanup

* remove default from example

* remove broken support for no_std

* back out the unneeded nostd check

* remove one stackframe when capturing a Handler

* update docs and prep for release

* port lib.rs docs updates to readme
2020-07-05 19:04:31 -07:00
Jane Lusby
96ddb39cd0
fix type inference issue in eyre macro autoderef behavior (#27)
* fix type inference issue in eyre macro autoderef behavior

* use the upstream example

* update testcase compile err output

* remove cruft

* bump version for breaking change
2020-06-21 10:41:56 -07:00
Jane Lusby
fd00a3bbab
Rename EyreContext to EyreHandler (#26)
* Rename EyreContext to EyreHandler

* bump version for new release

* use pub use for aliases
2020-06-02 13:59:09 -07:00
Jane Lusby
86c1267aab
bump indenter dep version and update readme
* Update testing

* dont bother testing no_std yet ...

* bump version for new release with fixed indenter

* add documentation about custom context crates
2020-05-17 10:37:33 -07:00
Jane Lusby
dbc3cc181e bump minor version for compat trait 2020-05-07 11:01:12 -07:00
Jane Lusby
6daf46c7aa
Add ContextCompat trait for porting from anyhow (#15) 2020-05-07 10:54:28 -07:00
Jane Lusby
d525c1fc0a
remove member access fns and backtrace fn (#14)
* remove member access fns and

* fix nightly errors

* bring back the test i accidentally removed
2020-05-04 12:20:46 -07:00
Jane Lusby
1e1eb56abf
remove br from docs and fix compile_fail docs (#13) 2020-05-03 15:23:20 -07:00
Jane Lusby
38a2e706dd
simplify docs and add back compat support (#12)
* simplify docs

* improve docs a little more
2020-05-03 13:40:02 -07:00
Jane Lusby
a5bf9babaf update description 2020-04-29 20:58:04 -07:00
Jane Lusby
3ac0be8322
merge upstream changes from anyhow (#10) 2020-04-13 09:19:24 -07:00
Jane Lusby
e3bf56ef5c
Rename ErrReport to Report (#9)
* Rename ErrReport to Report

* bump versions to prep for a release
2020-04-13 09:10:30 -07:00
Jane Lusby
6b601f8215
Propogate context to the top most error when wrapping inner errors (#5)
* Propogate context when wrapping errors with Option::take

* fix test failure in fmt output

* bump version for release
2020-04-07 14:26:48 -07:00
Jane Lusby
7a9d480c99 provide a default impl for the Display trait 2020-04-07 13:05:33 -07:00
Jane Lusby
3fe020cd20 Add readme docs to lib 2020-03-05 18:49:56 -08:00
Jane Lusby
782e62f3b1 Bump version to push updated docs to crates 2020-03-05 18:41:01 -08:00
Jane Lusby
d60a8bdeec Fix readme on crates.io 2020-03-04 17:20:49 -08:00
Jane Lusby
0efed8047b Bump version one more time 2020-03-04 16:40:33 -08:00
Jane Lusby
dda5227876 Fix readme 2020-03-04 16:21:40 -08:00
Jane Lusby
efb8a9ca82 Update docs to reflect changes in API 2020-02-28 16:42:49 -08:00
Jane Lusby
1550cafbd9 Rework context APIs 2020-02-28 15:37:59 -08:00
Jane Lusby
3b26dacea8 Update docs a little 2020-02-28 09:37:41 -08:00
Jane Lusby
86da223cde Rename core types 2020-02-27 13:04:19 -08:00
Kornel
e12fe91fb6
Add crates-io category 2020-02-13 13:21:07 +00:00
David Tolnay
b16893a21c
Opt in to experimental trybuild diffs 2019-12-25 17:41:54 -05:00
David Tolnay
a0e1af6809
Display a Travis badge on crates.io 2019-12-24 20:55:28 -05:00
David Tolnay
332913bcef
Release 1.0.26 2019-12-23 21:45:26 -05:00
David Tolnay
6b8064aab2
Add basic trybuild test for error missing Display impl 2019-11-28 11:54:07 -08:00
David Tolnay
d9957be8c2
Update crates.io description metadata 2019-11-27 22:08:41 -08:00
David Tolnay
3cd0fcb2d1
Release 1.0.25 2019-11-27 22:04:45 -08:00