Hello people: I’m wondering if it would be possibl...
# arrow
m
Hello people: I’m wondering if it would be possible to use Arrow in a Multiplatform project
s
Hey @Marc you’ve come at the right time. The latest released 0.13.3 is MMP, and the 1.0.0 SNAPSHOT which is also MPP will be released early this week.
m
that sounds awesome! I’ve been working on an Abstraction for Clean arch using Arrow that I’ve already used in Android and I was wondering to move it to MMP I’ll give it a try, thank you!
😍 1
s
Should be possible today using
0.13.3
, and that’ll allow you to jump directly to
1.0.0
later this week.
🎉 1
m
Another question, 6 months ago I was trying to make it even more abstract allowing to return
Kind
objects intead of
Either
(Like I’m currently doing). But someone told me that they where goig to remove support for Kinds and they were going to work with Either, Option and Validation. Is there a way that I can abstract it like for example something like:
Copy code
fun getSomething(): Kind<T>
instead of
Copy code
fun getSomething(): Option<T>
?
r
Hi Marc, we removed support for Kinds because when you want to make
getSomething
concrete users are forced to use
getSomething().fix()
or similar to downcast to the right type. We plan on revisiting kinds once compiler plugins have support for the Kotlin IDEA plugin and we can then implicitly inject that conversion making it transparent to users. Until then we don’t plan on looking into support for kinded types.
c
@simon.vergauwen "later this week", eh? 😂
r
let’s say that it was a fun weekend with maven sonatype and KMP publishing metadata
💯 1
c
Please write a blog post or something about how you made it work. Seriously, I never managed to, and I'm currently working on a project that could interest a few people 😅
2
s
It’s here written as a Gradle plugin, in the hope that we’ll be able to share this between projects but it should be translate-able to just a Kotlin Gradle Script
or
buildSrc
I’m not 100% sure how to do this in Groovy
c
Now you just have to find out how to publish a Gradle plugin 😅
s
Haha, we already do that in some other projects so should be okay-ish 😛
Would you be interested in consuming this?
c
I'm not really familiar with how all of this works, so I don't know how easy it would be to adapt to another project. If it was possible to do this easily via a plugin though, that would be awesome! It sounds too good to be true...
It’s going to be a plugin that we’ll apply on project in the Arrow org, and I’m also going to be re-using it for personal pet projects or things I host on my own Github
This week it’ll be used in Arrow to publish 1.0.1 with a Kotlin bump to 1.5.31
c
Nice! I'll take a look, thanks
n
Is there a working example of multiplatform + arrow optics? I cannot get it to work 😞 Thanks.
s
Hey @Norbi, Arrow Optics works with MPP but the
kapt
compiler is currently restricted to JVM. We’ll supply an alternative implementation through compiler plugins soon
👍🏻 1
n
@simon.vergauwen Do you have a rough guess when it will be available? Thanks.
s
Hey Norbi, I’m not sure but I expect it this year. cc\\ @raulraja might have some accurate info for you
🎉 1
👍🏻 1
r
Hi @Norbi, We are still waiting for FIR to become stable to release the first version of Meta. In the meantime we will release an alpha that works in KMP for the optics plugin as soon as we clean it up.
👍🏻 1