-
Notifications
You must be signed in to change notification settings - Fork 7
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
WIP: upgrade to arrow 2.0 #83
base: main
Are you sure you want to change the base?
Conversation
Validated has been deprecated, and is no longer included in Arrow.
This patch backports ValidatedNel as an alias of an underlying type, and maintains the existing extensions.
Continuations have been deprecated in favour of the Raise DSL. I have removed OutcomeEagerEffect scope, as the Raise DSL does not expose an eager implementation to be extend. Instead, the expectation is that the caller wraps calls in `eagerEffect`. This binds the suspended function to an eager context.
Awesome seeing this @hugomd 👏 👏 I'm a bit busy during KotlinConf, but during the summer we're going to work hard relaxing 2.0.0 (final). I will regularly check in here how things are going, but if you come across anything weird please let me know, and tag me and I'll be happy to help in whatever way I can |
// TODO(hugom): move this into an effect package, instead of continuations to align with arrow (?) | ||
@JvmInline | ||
value class OutcomeEagerEffectScope<E>(private val cont: EagerEffectScope<Either<Failure<E>, Absent>>) : | ||
EagerEffectScope<Either<Failure<E>, Absent>> { | ||
value class OutcomeEffectScope<E>(private val cont: Raise<Either<Failure<E>, Absent>>) : | ||
Raise<Either<Failure<E>, Absent>> { |
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.
I think this can be removed, I contributed a Raise
impl last year in the raise
package.
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.
Awesome! I'll look at migrating some of our existing codebases over to OutcomeRaise
and see how it works out before removing 👍🏻
kotest-extensions-arrow has not yet been upgrade to arrow 2.0.0, so we're seeing compatibility issues with some of the older implementations. In the meantime, we can add our own Arb to make tests pass.
To Do
OutcomeEffectScope
is sufficient in-place ofOutcomeEagerEffectScope
. I believe this no longer enforces non-suspending functionsquiverTraverse
Notes
Please see arrow-kt/arrow#2778