Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch From Snafu to thiserror #6166

Open
tustvold opened this issue Jul 31, 2024 · 4 comments
Open

Switch From Snafu to thiserror #6166

tustvold opened this issue Jul 31, 2024 · 4 comments
Labels
enhancement Any new improvement worthy of a entry in the changelog help wanted

Comments

@tustvold
Copy link
Contributor

Is your feature request related to a problem or challenge? Please describe what you are trying to do.

Currently snafu is part of the public API of object_store. This is unfortunate as it is a pre-1.0 crate and is making breaking releases. We also make relatively limited use of its functionality, with quite a lot of use of context(false).

Describe the solution you'd like

I'd like to propose switching to using thiserror, as I think this would have some advantages:

  • It is a 1.0.0 release
  • It doesn't expose anything beyond implementing the Error trait
  • It has broader ecosystem adoption than Snafu
  • It has a potentially less steep learning curve

Describe alternatives you've considered

We could not do this.

Additional context

@tustvold tustvold added enhancement Any new improvement worthy of a entry in the changelog help wanted labels Jul 31, 2024
@alamb
Copy link
Contributor

alamb commented Aug 2, 2024

this seems fine to me

@crepererum
Copy link
Contributor

It has broader ecosystem adoption than Snafu

By approximately 10x.

This is snafu:

image

And this is thiserror:

image

@alamb
Copy link
Contributor

alamb commented Aug 13, 2024

Now we just need someone who wants to do the work

@Xuanwo
Copy link
Member

Xuanwo commented Aug 14, 2024

I'm willing to take this. I have some ideas about the error design, maybe it's a great time to do it too?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Any new improvement worthy of a entry in the changelog help wanted
Projects
None yet
Development

No branches or pull requests

4 participants