-
Notifications
You must be signed in to change notification settings - Fork 37
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
Change stack from failure
to std::error::Error
#101
Comments
bltavares
added a commit
to bltavares/hypercore
that referenced
this issue
Feb 26, 2020
Related to datrs#101
bltavares
added a commit
to bltavares/random-access-disk
that referenced
this issue
Feb 26, 2020
bltavares
added a commit
to bltavares/random-access-memory
that referenced
this issue
Feb 26, 2020
This was referenced Feb 26, 2020
bltavares
changed the title
[Pre-RFC] Change stack from
Change stack from Feb 26, 2020
failure
to std::error::Error
failure
to std::error::Error
PRs with moves opened and linked to the issue. |
bltavares
added a commit
to bltavares/hypercore
that referenced
this issue
Feb 26, 2020
Related to datrs#101
bltavares
added a commit
to bltavares/hypercore
that referenced
this issue
Feb 26, 2020
Related to datrs#101
bltavares
added a commit
to bltavares/hypercore
that referenced
this issue
Feb 26, 2020
Related to datrs#101
yoshuawuyts
pushed a commit
to datrs/random-access-memory
that referenced
this issue
Mar 2, 2020
bltavares
added a commit
to datrs/random-access-disk
that referenced
this issue
Mar 3, 2020
* Update changelog * Move from failure to use stderr Related to datrs/hypercore#101
bltavares
added a commit
to bltavares/hypercore
that referenced
this issue
Mar 3, 2020
Related to datrs#101
bltavares
added a commit
to bltavares/hypercore
that referenced
this issue
Mar 3, 2020
Related to datrs#101
Landed on the beta versions |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Feature Request
Summary
Nowadays
hypercore
is defined for storage where errors arefailure::Error
egThis predates when Rust had
std::error::Error
trait, and could now be replaced with aError + Send + Sync + 'static
, such as anyhow, snafu or coreerror for ano_std
crate.This is also one less crate on the stack.
Motivation
This should help us move into
no_std
in the future, specially useful for WASM and embedded.Guide-level explanation
We could replace
failure
withanyhow
onrandom-access-disk
andrandom-access-storage
to use context during errors, which is also compatible withstd::error::Error
.We can then define
hypercore
using the stdError
trait, and broaden the types ofStorages
hypercore
can use.Reference-level explanation
Drawbacks
Rationale and alternatives
Unresolved Questions
The text was updated successfully, but these errors were encountered: