rust-cookbook icon indicating copy to clipboard operation
rust-cookbook copied to clipboard

Consider examples for "failure" crate?

Open ludwigpacifici opened this issue 7 years ago • 7 comments

Recently, Failure was announced (discussions here, also here). Is it too early to think about recipes (equivalent to error-chain) for it?

ludwigpacifici avatar Nov 23 '17 18:11 ludwigpacifici

@ludwigpacifici Thanks for pointing this out! Imho we should wait a little before Failure gets more traction and possibly matures a little. The error-chain crate had a lot of time to mature and enjoyed wide adoption before it got included in cookbook. I'd not want to promote a crate before both community and author are "confident enough" in the crate API stability (which I'm guessing is quite early for Failure)

@withoutboats might have some thoughts on the subject as far as I know they are working with @aturon on proposed crate list for the cookbook.

budziq avatar Nov 24 '17 11:11 budziq

So failure has taken the de facto error handling position in the ecosystem. I think a rip and replace would be reasonable. Here's something kinda official https://github.com/rust-lang-nursery/failure/issues/181

AndyGauge avatar Jul 12 '18 22:07 AndyGauge

While failure has gained some popularity I'm not entirely sure it has much development traction as its repo is not super active especially in regard to 1.0. Post the initial release it has been barely updated in crates.io with no releases since Nov 30, 2017 and it looks barely more active than error_chain.

Also failure work has been marked as "stalled" in rust release management worksheet presumably boats being occupied with some higher value targets at the moment.

With error_chain still having 2x daily downloads than failure I don't think that we should just decide by ourselves that the idiomatic and production ready error handling in rust is now all about failure. I'd like to invite ecosystem-wg to the discussion ping @KodrAus

budziq avatar Jul 13 '18 09:07 budziq

While failure has gained some popularity I'm not entirely sure it has much development traction as its repo is not super active especially in regard to 1.0.

Failure is getting a new team soon which will help the crate get some traction and work towards 1.0 and beyond.

Dylan-DPC-zz avatar Jul 13 '18 12:07 Dylan-DPC-zz

Thanks @Dylan-DPC!

I can see two issues here:

  • failure's design is in flux and I feel inclined towards waiting untill things take shape (the same reason why there is no tokio/async chapter yet)
  • the issue raised in https://github.com/rust-lang-nursery/ecosystem-wg/issues/22. how do we choose the best/most idiomatic crate when there are several equivalent contenders?

budziq avatar Jul 13 '18 14:07 budziq

failure had a new release fairly recently: https://github.com/rust-lang-nursery/failure/releases/tag/0.1.3.

and it is closing the gap on error-chain wrt. daily and all-time downloads.

My real goal is to get failure into the Rust playground, but I see we have a chicken and egg problem here ;-(

mulkieran avatar Nov 26 '18 23:11 mulkieran

Failure has been deprecated, so this can probably be closed.

najamelan avatar May 03 '20 21:05 najamelan