Hello Arrow Team, I’m new to Arrow and have been l...
# arrow
p
Hello Arrow Team, I’m new to Arrow and have been learning about it for the past weeks to integrate it in a new green field project. I’ve learned that the “context-receiver” train, one way or another, will eventually reach Kotlin stable. Similarly, I’ve learned that Arrow is hard at work to take advantage of context receivers while working towards significant API changes in Arrow. As someone who is looking to take advantage of Arrow today and who is willing to take some risks(e.g., using context receivers as available in Kotlin 1.7.*), are there any steps you recommend today to better align new code with Arrow 2.0(+context receivers, validated removal, etc)? Any recommendations will be very welcomed. Thank you,
s
Hey @P A, Today I am going to try to get stable
2.0.0-alphaX
releases out for every commit to the
arrow-2
branch. You could use it directly, if the
Validated
PR gets merged that'll be the biggest change. We're also back-porting all the changes we can from 2.x.x to 1.x.x to guarantee an as smooth as transition as we can, and we're deprecating all methods that are going to be removed in 2.x.x. https://github.com/47deg/gh-alerts-subscriptions-kotlin/pull/18/files You could also look a this PR for some inspiration, it's using context receivers with 1.x.x in a similar way we're optimising 2.x.x. It includes some already back-ported APIs too here. Which I hope to backport this week to 1.x.x, https://github.com/47deg/gh-alerts-subscriptions-kotlin/pull/18/files#diff-242a6db6f13c7097fb63c177becfa9075c1652c99cebb5de2e29dbe676dccdd0 We'll release a 1.2.x version with some of these back-ports available in the next week or two. Besides that your best bet is to put errors (and monads like
ResourceScope
) inside the
context
, and fully leverage DSLs everywhere. And perhaps adding
typealias Raise<E> = EffectScope<E>
in your project. I'm considering adding it to 1.x.x as well. And be sure to ask any questions you have, or any feedback! Would love to hear it. I'll let you know if I was able to publish a stable alpha/snapshot version for 2.x.x.
p
Got it. Thank you, I’m digging into that pull request.