You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Description
Changes the error handling across all crates in this repo from
`snafu`/`n0-snafu` to **`n0-error`**. The latter is our new error
library which features call-site location tracking and better ergonomics
than snafu.
Repo: https://github.com/n0-computer/n0-error
Docs: https://docs.rs/n0-error/
*Note:* The initial version of this PR was written by an AI (OpenAI
codex) which I instructed in numerous prompts to convert iroh from
n0-snafu/snafu to n0-error. It has since been cleaned up and reviewed
line-by-line.
## Breaking Changes
*Changed*
* All error structs and enum variants now have a field `meta:
n0_error::Meta`. Fields `backtrace` and `span_trace` are removed.
* All error structs and enums no longer implement `snafu::ErrorCompat`.
They now implement `n0_error::StackError`. All our errors keep
implementing `std::error::Error`. For downstream uses of these errors,
not much changed.
* If you previously used `n0-snafu` to work with iroh errors, we
recommend you switch to `n0-error`. See the [docs](
https://docs.rs/n0-error/) for how to work with n0-error.
## Notes & open questions
<!-- Any notes, remarks or open questions you have to make about the PR.
-->
## Change checklist
<!-- Remove any that are not relevant. -->
- [x] Self-review.
- [x] Documentation updates following the [style
guide](https://rust-lang.github.io/rfcs/1574-more-api-documentation-conventions.html#appendix-a-full-conventions-text),
if relevant.
- [x] Tests if relevant.
- [x] All breaking changes documented.
- [ ] List all breaking changes in the above "Breaking Changes" section.
- [ ] Open an issue or PR on any number0 repos that are affected by this
breaking change. Give guidance on how the updates should be handled or
do the actual updates themselves. The major ones are:
- [ ] [`quic-rpc`](https://github.com/n0-computer/quic-rpc)
- [ ] [`iroh-gossip`](https://github.com/n0-computer/iroh-gossip)
- [ ] [`iroh-blobs`](https://github.com/n0-computer/iroh-blobs)
- [ ] [`dumbpipe`](https://github.com/n0-computer/dumbpipe)
- [ ] [`sendme`](https://github.com/n0-computer/sendme)
---------
Co-authored-by: dignifiedquire <[email protected]>
0 commit comments