alice-rs icon indicating copy to clipboard operation
alice-rs copied to clipboard

Remove failure crate in favor of thiserror

Open cbourjau opened this issue 2 years ago • 2 comments

When this project was started failure was the way to go. However, time has moved on and the current recommendation for error handling seems to be thiserror. It would be nice to update all crates in this project to the latter. See https://github.com/cbourjau/alice-rs/pull/9#issuecomment-1080019987 for some recent discussions on this topic.

cbourjau avatar Apr 15 '22 08:04 cbourjau

Some additional thoughts: I believe we could leave failure in for the non-library crates. The structured information thiserror provides is most useful for library consumers. For applications we can provide the same information as text to the user.

strangeglyph avatar Apr 17 '22 20:04 strangeglyph

I think the commonly recommended library for applications is anyhow which depends on thiserror. I think its fine to only migrate some of the sub-crates for now, though, and leave others still on failure.

cbourjau avatar Apr 18 '22 16:04 cbourjau