https://kotlinlang.org logo
#arrow-contributors
Title
# arrow-contributors
t

tavish pegram

07/18/2020, 6:03 PM
Hey all, I’m interested in getting involved and contributing in arrow. Apologies if I missed some documentation explaining any first steps but most things seemed to point toward reaching out via slack or twitter. Is there anything I could pick up to start contributing that is newbie friendly, or any documentation I should be reading? Thanks! Big fan of y’alls work and have been using arrow more and more at work (while also getting into FP)
❤️ 5
r

raulraja

07/18/2020, 11:40 PM
Hi Tavish!, we have many areas open where we need help. Is there anything in particular that you are interested on or you would like to learn next regarding FP?
Thank so much for the kind words and wanting to contribute 😻
t

tavish pegram

07/18/2020, 11:52 PM
I’m pretty new to everything but the arrow-core package has been pretty interesting to me. I’d also like to learn more about optics and effects.
If it sounds good as a starting point I can take a stab at Eval for https://github.com/arrow-kt/arrow-core/issues/115
also im a bit confused about deprecating
Option
(mentioned in another ticket). it seems like having a
Maybe
type is a standard in most functional languages and is good to have from a user standpoint, even if it duplicates a lot of behavior of Kotlin’s null safety or is equivalent to an
Either
, though I assume I’m missing something about the long term vision for it
and just to pile on some more, I’m getting my fork setup but when attempting to
./gradlew build
I’m getting these errors
Copy code
Execution failed for task ':arrow-core-data:kaptGenerateStubsTestKotlin'.
> Could not resolve all files for configuration ':arrow-core-data:testCompileClasspath'.
   > Could not find io.arrow-kt:arrow-mtl-data:0.11.0-SNAPSHOT.
     Searched in the following locations:
       - <https://jcenter.bintray.com/io/arrow-kt/arrow-mtl-data/0.11.0-SNAPSHOT/maven-metadata.xml>
       - <https://jcenter.bintray.com/io/arrow-kt/arrow-mtl-data/0.11.0-SNAPSHOT/arrow-mtl-data-0.11.0-SNAPSHOT.pom>
       - <https://kotlin.bintray.com/kotlinx/io/arrow-kt/arrow-mtl-data/0.11.0-SNAPSHOT/maven-metadata.xml>
       - <https://kotlin.bintray.com/kotlinx/io/arrow-kt/arrow-mtl-data/0.11.0-SNAPSHOT/arrow-mtl-data-0.11.0-SNAPSHOT.pom>
       - file:/Users/tavish/.m2/repository/io/arrow-kt/arrow-mtl-data/0.11.0-SNAPSHOT/maven-metadata.xml
       - file:/Users/tavish/.m2/repository/io/arrow-kt/arrow-mtl-data/0.11.0-SNAPSHOT/arrow-mtl-data-0.11.0-SNAPSHOT.pom
     Required by:
         project :arrow-core-data
any advice on addressing this would be appreciated! Thank you!
s

simon.vergauwen

07/19/2020, 6:49 PM
cc\\ @Rachel
Yes, while the removal/deprecation of
Option
might seem a bit controversial but we believe it will push FP in Kotlin in the right direction. Beside that you still have
typealias Option<A> = Either<Unit, A>
that offers the exact same semantics, and API if you need it.
?
is superior over
Option
in performance, and we want to supplement the APIs so the removal of
Option
shouldn't be felt from a user point of view. The only technical issue with
?
is that in generic code
A
not constraint as
A : Any
,
A
can be
Int?
and thus using
A?
in generic code can be unsafe as you might be checking the users null instead of your own. So in generic code you should still use
Either<Unit, A>
or
Union2<Unit, A>
(when it becomes available), if you rely on
null
as a signal.
That will encourage more idiomatic Kotlin, with a small gotcha which is inherit to the Kotlin type system.
t

tavish pegram

07/20/2020, 1:23 AM
For the build issue I did find that changing https://github.com/arrow-kt/arrow/blob/b95bc9b486c58890d678d91255efad9f37e159e2/gradle.properties#L3 to be
0.10.5
allowed the build to succeed in
arrow-core-lib
but it sounds like it should have been working with
0.11.0-SNAPSHOT
which was updated https://github.com/arrow-kt/arrow/pull/2116 . Is there something i’ve missed in my setup that would have gotten it to work locally with 0.11.0?
r

Rachel

07/20/2020, 9:20 AM
Hi @tavish pegram! The log shows that dependencies are being searched in JCenter, Kotlin Bintray and your local repository
Please, could you check if there are local changes in your workspace? Did you make any change after cloning
arrow-core
repository?
t

tavish pegram

07/20/2020, 12:56 PM
@Rachel ah thanks you are totally right! I must have run one of the other gradle tasks and it updated the gradle properties. Here was the diff
Copy code
# Build properties
-COMMON_SETUP=<https://raw.githubusercontent.com/arrow-kt/arrow/master/setup.gradle>
-GENERIC_CONF=<https://raw.githubusercontent.com/arrow-kt/arrow/master/generic-conf.gradle>
-SUBPROJECT_CONF=<https://raw.githubusercontent.com/arrow-kt/arrow/master/subproject-conf.gradle>
-DOC_CONF=<https://raw.githubusercontent.com/arrow-kt/arrow/master/doc-conf.gradle>
-PUBLISH_CONF=<https://raw.githubusercontent.com/arrow-kt/arrow/master/publish-conf.gradle>
+COMMON_SETUP=file:///Users/tavish/projects/arrow/setup.gradle
+GENERIC_CONF=file:///Users/tavish/projects/arrow/generic-conf.gradle
+SUBPROJECT_CONF=file:///Users/tavish/projects/arrow/subproject-conf.gradle
+DOC_CONF=file:///Users/tavish/projects/arrow/doc-conf.gradle
+PUBLISH_CONF=file:///Users/tavish/projects/arrow/publish-conf.gradle
and reverting this made the build succeed for the snapshot.
r

Rachel

07/20/2020, 1:32 PM
Great, thanks @tavish pegram!
6 Views