Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@hearnadam
Copy link
Collaborator

IsFatal is unused in any public codebase (see: #9880), has unclear semantics across functions, and has a significant performance cost. By removing configurability of IsFatal, we can optimize attempt, suspend, Java CS/CF interop, and more importantly the FiberRuntime itself!

In this PR, I made IsFatal itself package private, as well as the ability to add new fatals to the runtime. I also deprecated all relevant methods.

After the next release, we remove checks to the FiberRef, and use a static definition for IsFatal. Maintaining binary compatibility, but removing the feature from the codebase.

@hearnadam hearnadam marked this pull request as ready for review August 28, 2025 02:08
@guizmaii
Copy link
Member

guizmaii commented Aug 28, 2025

LGTM but I prefer to leave the approval to Kyri

Copy link
Contributor

@kyri-petrou kyri-petrou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Happy to deprecate it. I find it extremely difficult to believe that defining a custom IsFatal will be useful for anyone

@hearnadam hearnadam merged commit 25ee1ca into zio:series/2.x Aug 28, 2025
19 checks passed
hearnadam added a commit to hearnadam/zio that referenced this pull request Oct 16, 2025
This is a followup, as I missed it in zio#10140
kyri-petrou pushed a commit that referenced this pull request Oct 16, 2025
This is a followup, as I missed it in #10140
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants