Summary 💡
Implement colored error and panic reports
Motivation 🔦
As a follow-up to #1634, which added colour to the CLI interface, we should implement something similar for errors and panics. I think this would make them easier to read and more user-friendly.
I came up with 3 options of implementing this:
1). Simply replace anyhow with color-eyre
- pros:
- easy to drop-in replace
anyhow
- cons:
- bring some odd dependencies (e.g.
tracing, backtrace)
- not that flexible, can be confusing if
.context() called many times
- Add
eyre and implement custom error report
- pros:
- easy to drop-in replace
anyhow
- customisable
- cons:
- reports are not so detailed, requires many extension traits to get detailed report
- can be confusing if error has many sources
- Use
miette
- pros:
- really comprehensive and beatiful error reports
- derive macros for error types
- cons:
- probably overkill
- 2MB built with
--release, really big crate
Summary 💡
Implement colored error and panic reports
Motivation 🔦
As a follow-up to #1634, which added colour to the CLI interface, we should implement something similar for errors and panics. I think this would make them easier to read and more user-friendly.
I came up with 3 options of implementing this:
1). Simply replace
anyhowwithcolor-eyreanyhowtracing,backtrace).context()called many timeseyreand implement custom error reportanyhowmiette--release, really big crate