-
Notifications
You must be signed in to change notification settings - Fork 449
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
Backport Raise & error handlers #2912
Conversation
arrow-libs/core/arrow-core/src/commonMain/kotlin/arrow/core/raise/Raise.kt
Outdated
Show resolved
Hide resolved
arrow-libs/core/arrow-core/src/commonMain/kotlin/arrow/core/raise/Raise.kt
Outdated
Show resolved
Hide resolved
arrow-libs/core/arrow-core/src/commonMain/kotlin/arrow/core/raise/Raise.kt
Outdated
Show resolved
Hide resolved
arrow-libs/core/arrow-core/src/commonMain/kotlin/arrow/core/raise/Raise.kt
Outdated
Show resolved
Hide resolved
Co-authored-by: Francisco Diaz <francisco.d@47deg.com>
😭 |
@serras can you please pay special attention to the contracts that I didn't forget anything 😅 🙏 |
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.
Other than one contract, LGTM
arrow-libs/core/arrow-core/src/commonMain/kotlin/arrow/core/Either.kt
Outdated
Show resolved
Hide resolved
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.
Thanks, @nomisRev!
Migration Guide
See two proposal migration guides for
Either
&Effect
.Using
Either
Replace
either { }
arrow.core.continuations.either
->arrow.core.raise.either
arrow.core.continuations.ensureNotNull
->arrow.core.raise.ensureNotNull
arrow.core.computations.either
->arrow.core.raise.either
arrow.core.computations.ensureNotNull
->arrow.core.raise.ensureNotNull
Replace
either.eager { }
arrow.core.continuations.either.eager
->arrow.core.raise.either
=> Might introduce duplicate import for
arrow.core.raise.either
either.eager {
->either {
Replace
EffectScope
/EagerEffectScope
arrow.core.continuations.EffectScope
->arrow.core.raise.Raise
arrow.core.continuations.EagerEffectScope
->arrow.core.raise.Raise
arrow.core.continuations.ensureNotNull
->arrow.core.raise.ensureNotNull
Using
Effect
arrow.core.continuations.Effect
->arrow.core.raise.Effect
arrow.core.continuations.ensureNotNull
->arrow.core.raise.ensureNotNull
=> Requires manually adding missing imports for
fold
, error handlers, and allEffect
methods since they're replaced by extension functions.
Using
EagerEffect
arrow.core.continuations.EagerEffect
->arrow.core.raise.EagerEffect
arrow.core.continuations.ensureNotNull
->arrow.core.raise.ensureNotNull
=> Requires manually adding missing imports for
fold
, error handlers, and allEagerEffect
methods since they're replaced by extension functions.