-
Notifications
You must be signed in to change notification settings - Fork 73
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
fn Ok()
breaks all code with use eyre::*
in new releases
#144
Comments
I suggest not breaking existing code. Maybe rename |
Hey, thank you for reporting this breakage. Our policy is to follow SemVer as defined by cargo1, definitely not to break existing code. We appreciate and want to encourage users who report unexpected breakages when they encounter them. That said, it's my understanding that adding new items is not considered a major change in the rust ecosystem and our usage of semver23, even when it introduces breakage with globs. We discussed this change in our team meeting today4 and considered the trade-offs of the proposed fix vs the current situation. One team member pointed out that the cargo team explicitly acknowledges glob imports as a forward compatibility hazard.
The main concern we discussed was API consistency; we already export other types with commonly used names such as Footnotes
|
All that said, I wanna be clear that I do not intend to shut down the discussion around the second concern you raised about the ergonomics of the API.
That seems like something we should still try to improve if we can or at least provide guidance for how to work around the issue. |
Hi, thank you for your prompt discussion. I understand that the PR tires to reflect changes 3 years ago in anyhow dtolnay/anyhow#192 (comment) However, the original issue was not discussed at all because it seemed trivial, considering wildcard being forward compatible hazard. I hope I had engaged in the issue back then. While removing or renaming in anyhow is already too late, it's still time to do something in eyre. I think the final goal of this function is to type less keystrokes, not to cause problems or fatigue the end user. Compare And consider their frequency in code |
If you have any other ergonomic improvements you'd like to suggest, please open a new issue! Compatibility breakages are expected from globbing as Jane mentioned. Renaming Eyre::Ok to Eyre::{Ok as EyreOk} is a valid way of importing. When all else is equal, eyre prefers to maintain compatibility with anyhow. That's the main goal. |
I noticed a breaking change with
Ok()
, meaning that all code likewill break.
This is not acceptable as Ok being a very common prelude item in Rust.
Even worse, the following code in the same file can't be ergonomic with
fn Ok
The text was updated successfully, but these errors were encountered: