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
Improve README and fix compile warnings #54
Conversation
See tailhook/quick-error#54 for PR to soon move back to the new release on crates.io
Thanks for PR! I'm going to vacation today, so I'll look in 2-3 weeks. |
Hi @tailhook , I hope you are doing well, and… sorry to bother you. It's just that Sufficient for me would be a 2.0 release of master as is. Alternatively I am offering to re-add support for Please let me know what you think :). |
Thanks for a reminder.
What is the proposed approach? I'm kinda resistant to 2.0 because we have a trait that would be harder to use if we have a 1.0/2.0 version split. But if that's to heavyweight, we may probably try to do 2.0 anyway. |
PR is fine, though. So merged. |
Selfishly I would be opting for a 2.0, however… for the project I absolutely agree it would be preferred to make it a minor version instead by not breaking backwards compatibility, similar to what the standard library does. I will try to restore the original 'cause' implementation, which I hope to be trivial :D. |
Well, just restoring |
Update: I took a closer look and it seems there are real costs to supporting both versions: more code. As the only thing my limited macro skills allow me to do is to add It also appears that I would have to re-add For the aforementioned reasons I change my stance and instead propose to go for a proper 2.0 which supports the latest Error handling API only, creating only the code necessary to do that. Alternatively, someone with 'mad macro skillz' could certainly make it so only the necessary code is generated based on understanding the macro input. Thanks for moving this forward, whatever it maybe, and sorry for not having been able to help more :/ . |
@tailhook Probably we were composing messages at the same time, and getting that 2.0 release sounds absolutely swell! Here a quick video of what I can release with quick-error 2.0: gitoxide indexing the linux kernel (aka clone) 1.7x faster than git itself :D. |
Just released 2.0. Thank you for help! |
This PR is merely a side-effect of me looking into why my program couldn't display causes using
anyhow
, so the output looked like this:A quick investigation showed that anyhow was using the
source()
method, whereas I and quick-error 1.2.3 still use the now deprecatedcause()
method.After cloning the main branch of
quick-error
, I thought it should be possible to addsource()
support in a non-breaking fashion. To my surprise, it was already added while removing support forcause()
. After migrating by replacingcause(err)
withsource(err)
anddescription(…)
withdisplay(…)
all worked as expected and I could witness the error chain I always wanted:Would it be possible to get a 2.0 release to crates.io?
Alternatively, maybe it's preferred to restore backwards compatibility instead, and I am willing to contribute. Please let me know :), and thanks for your help!
PS
quick-error
absolutely has its place in the current error landscape as it is has easy-to-remember syntax and adds only neglectable compile time, while producing minimal error enums suitable for use in library crates.thiserror
does something similar, but adds considerable compile time as it's a proc-macro.