Sovereign-Labs / sovereign-sdk

A framework for building seamlessly scalable and interoperable rollups that can run on any blockchain
https://sovereign.xyz
Apache License 2.0
376 stars 107 forks source link

Switch from `thiserror` to `snafu` for `no_std` #1105

Open vlopes11 opened 1 year ago

vlopes11 commented 1 year ago

thiserror has no short-term plans to support no_std.

Alternatively, we can use snafu - a similar library with no_std support. This will reduce code complexity for no_std implementations, as currently we have to feature shield all variants of error implementations, causing a lot of code bloat.

sudipghimire533 commented 1 year ago

is this on progress. I can help with this one if needed

vlopes11 commented 1 year ago

First and foremost, thanks for the positive collaboration @sudipghimire533 .

It would be awesome to have your collaboration on this one, but we are still discussing on whether or not we are actually going to perform this change.

While it is desirable to have no-std support for these error helpers, we are concerned this might be a big change, as anyhow is used everywhere - both in our code base and in our 3rd party dependencies. It might be also that when we are finally done with the migration, thiserror already supports no-std.

With that said, we'd like to wait a bit more until we finally decide if we are going this direction.

All help is welcome! You can take a look into the "good first issue" label for different tasks. However, the ones tagged with "question" or "needs grooming" will probably go through a round of discussions before the actual coding starts.

sudipghimire533 commented 1 year ago

I understand.

DaviRain-Su commented 7 months ago

maybe use displaydoc?