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

Remove dependency to failure #1

Closed
lo48576 opened this issue Nov 21, 2019 · 2 comments
Closed

Remove dependency to failure #1

lo48576 opened this issue Nov 21, 2019 · 2 comments
Labels
enhancement New feature or request

Comments

@lo48576
Copy link
Owner

lo48576 commented Nov 21, 2019

failure depends on backtrace crate when std feature is enabled, but it prevents me from testing dependencies with minimal versions (by cargo +nightly update -Z minimal-versions && cargo test --all-features).
(See rust-lang-deprecated/failure#310 for detail.)

Additionally, std Error trait are being improved and it would be useful enough (see rust-lang/rust#53487).
So it would be better to use simpler error types, rather than error types with many features and extra APIs, to avoid providing unnecessary functionalities and keeping their compatibilities.

I'll use anyhow or thiserror, but it is not yet decided.

@lo48576 lo48576 added the enhancement New feature or request label Nov 21, 2019
@lo48576
Copy link
Owner Author

lo48576 commented Nov 22, 2019

Closed by c997275.

@lo48576 lo48576 closed this as completed Nov 22, 2019
@lo48576
Copy link
Owner Author

lo48576 commented Nov 22, 2019

Released 0.0.5.

As experiment, I created and replaced some types locally, but it seems to end up in creating struct FooError { msg: String } or something like that, and I don't feel it is better than anyhow::Error, so I abandoned that branch.
Additionally, current API is not stable, so creating dedicated error type would reduce flexibility of API.

In conclusion, I don't think I should remove anyhow or should stop using anyhow::Error, at least for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant