Skip to content
This repository was archived by the owner on Aug 16, 2021. It is now read-only.

Conversation

@davidbarsky
Copy link
Contributor

As per https://internals.rust-lang.org/t/failure-crate-maintenance/12087, I'm deprecating failure. Since the current error-handling landscape in Rust wouldn't be what it is today without failure, I'd like to thank @withoutboats for authoring and publishing this crate.

@davidbarsky davidbarsky merged commit 135e2a3 into master May 2, 2020
@davidbarsky davidbarsky deleted the davidbarsky/deprecrate-failure branch May 2, 2020 18:12
gluxon added a commit to gluxon/wireguard-uapi-rs that referenced this pull request May 3, 2020
@vi
Copy link

vi commented May 17, 2020

I don't see any signs of deprecation on the crates.io page. It does not show README nor badges.

bors bot added a commit to rust-embedded/cargo-binutils that referenced this pull request May 20, 2020
73: Move from failure to anyhow r=therealprof a=ZeroErrors

## Changes
- Move from `failure` to `anyhow` for error handling

## Description
As of `failure 0.1.8` it has been deprecated ([rust-lang-deprecated/failure#347](rust-lang-deprecated/failure#347)) in favor of using standard rust errors and it is recommended to do that via libraries such as [`anyhow`](https://github.com/dtolnay/anyhow) or [`thiserror`](https://github.com/dtolnay/thiserror).

I chose to go with `anyhow` as its the simplest to convert over to and also since `cargo-binutils` isn't expected to be used as a library I see no need for more detailed error types (See: [dtolnay/anyhow#comparison-to-thiserror](https://github.com/dtolnay/anyhow#comparison-to-thiserror)).

---

**Note:** `failure` isn't fully removed yet as the `rustc-cfg` dependency uses `failure`. I have opened a PR on that repo to hopefully get that changed (japaric/rustc-cfg#12)

r? @therealprof

Co-authored-by: Zero <[email protected]>
steveej added a commit to steveej-forks/openshift-cincinnati that referenced this pull request Jun 4, 2020
Failure was [deprecated][0] and suggests anyhow+thiserror to replace
itself in dependent projects.

[0]: rust-lang-deprecated/failure#347
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants