-
Notifications
You must be signed in to change notification settings - Fork 293
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
Add second version of new error handling blog post #840
Conversation
posts/inside-rust/2021-05-15-What-the-error-handling-project-group-is-working-towards.md
Outdated
Show resolved
Hide resolved
posts/inside-rust/2021-05-15-What-the-error-handling-project-group-is-working-towards.md
Outdated
Show resolved
Hide resolved
posts/inside-rust/2021-05-15-What-the-error-handling-project-group-is-working-towards.md
Outdated
Show resolved
Hide resolved
posts/inside-rust/2021-05-15-What-the-error-handling-project-group-is-working-towards.md
Outdated
Show resolved
Hide resolved
This is great 🎉 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great! I think the only feedback I have is about the "Guidelines for implementing Display::fmt and Error::source" section. The recommendation itself sounds great, but I wonder if it's worth acknowledging that this will require some kind of migration in the ecosystem. e.g., If I switched my crates to match this recommendation, then I believe it's likely that folks just printing the error without handling the causal chain will end up losing information.
Now maybe this isn't a problem that's terribly common in practice, but it seems good to have on our radar and acknowledge it maybe? To be honest, I don't know if it belongs in this specific blog post, but thought I would throw it out there.
posts/inside-rust/2021-05-15-What-the-error-handling-project-group-is-working-towards.md
Outdated
Show resolved
Hide resolved
posts/inside-rust/2021-05-15-What-the-error-handling-project-group-is-working-towards.md
Outdated
Show resolved
Hide resolved
posts/inside-rust/2021-05-15-What-the-error-handling-project-group-is-working-towards.md
Outdated
Show resolved
Hide resolved
posts/inside-rust/2021-05-15-What-the-error-handling-project-group-is-working-towards.md
Outdated
Show resolved
Hide resolved
posts/inside-rust/2021-05-15-What-the-error-handling-project-group-is-working-towards.md
Outdated
Show resolved
Hide resolved
posts/inside-rust/2021-05-15-What-the-error-handling-project-group-is-working-towards.md
Show resolved
Hide resolved
posts/inside-rust/2021-05-15-What-the-error-handling-project-group-is-working-towards.md
Outdated
Show resolved
Hide resolved
posts/inside-rust/2021-05-15-What-the-error-handling-project-group-is-working-towards.md
Outdated
Show resolved
Hide resolved
posts/inside-rust/2021-05-15-What-the-error-handling-project-group-is-working-towards.md
Outdated
Show resolved
Hide resolved
posts/inside-rust/2021-05-15-What-the-error-handling-project-group-is-working-towards.md
Outdated
Show resolved
Hide resolved
Co-authored-by: bstrie <[email protected]>
posts/inside-rust/2021-05-15-What-the-error-handling-project-group-is-working-towards.md
Outdated
Show resolved
Hide resolved
posts/inside-rust/2021-05-15-What-the-error-handling-project-group-is-working-towards.md
Show resolved
Hide resolved
posts/inside-rust/2021-05-15-What-the-error-handling-project-group-is-working-towards.md
Outdated
Show resolved
Hide resolved
posts/inside-rust/2021-05-15-What-the-error-handling-project-group-is-working-towards.md
Outdated
Show resolved
Hide resolved
…roup-is-working-towards.md
@BurntSushi I feel like this is a really good point and belongs in this blog post, and more specifically I think we should also include guidance on how libraries should manage the migration of their error types to follow the guidance. As for the nature of the guidance, my guess is that we're going to have to state that (if?) we feel that the change we're recommending constitutes a breaking change. Then we should point out that the break is purely on runtime behavior so it won't be caught by the compiler, and that just incrementing the version number is likely insufficient for helping dependencies upgrade smoothly without breaking any code that used to rely on Also, thinking about it more I think it will be easier to add lints to clean up the old |
@yaahc I think we're on the same page. Might be good to have an issue for this on the error handling repo where can dig into it a bit more. Maybe for this blog post all we need to say is that 1) it will require some kind of migration and 2) we are working out the details for that HERE, where "HERE" is a link to an issue seeded with your most recent comment. How does that sound? |
That sounds like a great idea. I'll create that issue right now. |
@nikomatsakis fwiw I don't think this is ready to merge yet. I still want to decide on and fill out a suggested migration plan in rust-lang/project-error-handling#44, then reference it in this post, before we post this. |
posts/inside-rust/2021-05-15-What-the-error-handling-project-group-is-working-towards.md
Outdated
Show resolved
Hide resolved
posts/inside-rust/2021-05-15-What-the-error-handling-project-group-is-working-towards.md
Outdated
Show resolved
Hide resolved
posts/inside-rust/2021-05-15-What-the-error-handling-project-group-is-working-towards.md
Show resolved
Hide resolved
posts/inside-rust/2021-05-15-What-the-error-handling-project-group-is-working-towards.md
Outdated
Show resolved
Hide resolved
Okay, I think this may be ready now. |
Bumping, still ready for approval / publication @rust-lang/core |
This is a follow up from #799
cc @bstrie @kw-fn @therealprof @rust-lang/libs @nikomatsakis @flip1995 who all gave feedback on the previous version