rerun-io / rerun

Visualize streams of multimodal data. Free, fast, easy to use, and simple to integrate. Built in Rust.
https://rerun.io/
Apache License 2.0
6.5k stars 322 forks source link

Replace `anyhow` with `thiserror` in libraries #1845

Open emilk opened 1 year ago

emilk commented 1 year ago

We have been too liberal of our use of anyhow. For any pub function in our libraries, we should be using thiserror instead of anyhow, to get more type safety and explicitness of what can go wrong.

Internal use of anyhow in a crate is less bad, but would also be good to change to thiserror.

anyhow should mostly be used in high-level crates (binaries) to easily summarize errors coming from many different places without having to create too many error enums

emilk commented 3 months ago

We should do this in re_types in particular, and somehow forbid it so that it doesn't come back.