Hi Arrow team! I'm trying to compile arrow with Ko...
# arrow
u
Hi Arrow team! I'm trying to compile arrow with Kotlin 1.4 and getting the following error from `arrow core datakaptKotlin`:
Copy code
Caused by: org.jetbrains.kotlin.kapt3.base.util.KaptBaseError: Exception while annotation processing
        at org.jetbrains.kotlin.kapt3.base.AnnotationProcessingKt.doAnnotationProcessing(annotationProcessing.kt:84)
        at org.jetbrains.kotlin.kapt3.base.AnnotationProcessingKt.doAnnotationProcessing$default(annotationProcessing.kt:35)
        at org.jetbrains.kotlin.kapt3.base.Kapt.kapt(Kapt.kt:45)
        ... 26 more
Caused by: java.lang.NullPointerException: e.localizedMessage must not be null
        at arrow.common.utils.AbstractProcessor.processElementDoc(AbstractProcessor.kt:75)
        at arrow.common.utils.AbstractProcessor.processDocs(AbstractProcessor.kt:101)
        at arrow.common.utils.AbstractProcessor.process(AbstractProcessor.kt:107)
        at org.jetbrains.kotlin.kapt3.base.incremental.IncrementalProcessor.process(incrementalProcessors.kt)
        at org.jetbrains.kotlin.kapt3.base.ProcessorWrapper.process(annotationProcessing.kt:147)
        at com.sun.tools.javac.processing.JavacProcessingEnvironment.callProcessor(JavacProcessingEnvironment.java:794)
        <...>
Have you met something similar and maybe you know how to workaround this problem?
I'm applying the following patch to
f94b61b26
(the latest revision before the multi-repo split):
Copy code
diff --git a/build.gradle b/build.gradle
index c4951c59f..47cf98398 100644
--- a/build.gradle
+++ b/build.gradle
@@ -19,6 +19,7 @@ import com.github.benmanes.gradle.versions.reporter.PlainTextReporter
 buildscript {
 
     repositories {
+        maven { url "<https://dl.bintray.com/kotlin/kotlin-dev>" }
         jcenter()
         maven {
             url "<https://plugins.gradle.org/m2/>"
@@ -46,6 +47,7 @@ allprojects {
     }
 
     repositories {
+        maven { url "<https://dl.bintray.com/kotlin/kotlin-dev>" }
         jcenter()
         maven { url '<https://kotlin.bintray.com/kotlinx>' }
     }
diff --git a/gradle.properties b/gradle.properties
index cd0617f0b..0aa5465f1 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -25,7 +25,7 @@ KINDEDJ_VERSION=1.1.0
 KOTLIN_METADATA_VERSION=1.4.0
 KOTLIN_POET_VERSION=1.1.0
 KOTLIN_TEST_VERSION=3.3.3
-KOTLIN_VERSION=1.3.50
+KOTLIN_VERSION=1.4-M1-eap-93
 KOTLINX_COLLECTIONS_IMMUTABLE_VERSION=0.1
 KOTLINX_COROUTINES_VERSION=1.3.3
 KTLINT_GRADLE_VERSION=8.2.0
r
We just noticed today that compiling with backend IR on is unable to compile some of the code generated by kapt in arrow-core
not sure if it’s related but we are attempting to remove kapt all together in favor of the meta compiler plugin which we just started integrating in Arrow
u
Did you have the same issue with the IR backend? Also, how long would it take to replace kapt with arrow-meta, as opposed to fixing the kapt issue? The reason I'm asking all of this is we're trying to compile as much external projects as possible with JVM IR to find and fix bugs there, and arrow seems a fine candidate, but it doesn't build right now even with the production compiler on 1.4, due to the kapt error above. Also if there's any way to avoid kapt altogether (hacks of all levels of dirtiness would be OK), I'd be interested too :). Thanks.
r
Arrow meta depends on IR so until it’s not ready in the compiler it won’t come out. Fixing the kapt issue may be an option but we have not seen it before. @Rachel may know about it since she is helping maintaining Arrow up to date with the Kotlin compiler for the split and for Meta
🙏 1