https://kotlinlang.org logo
Title
t

Tiago

02/13/2023, 10:53 AM
good morning 🙂 just discovered Arrow Analysis and it sounds amazing do I really need to use
org.jetbrains.kotlin.multiplatform
or
org.jetbrains.kotlin.jvm
is good enough? I am getting a weird error trying to set it up: java.lang.NoClassDefFoundError:
org/jetbrains/kotlin/resolve/jvm/extensions/AnalysisHandlerExtension$DefaultImpls
	at arrow.meta.internal.registry.InternalRegistry$registerPostAnalysisContextEnrichment$1$1.analysisCompleted(InternalRegistry.kt:123)
	at org.jetbrains.kotlin.cli.jvm.compiler.TopDownAnalyzerFacadeForJVM$analyzeFilesWithJavaIntegration$2.invoke(TopDownAnalyzerFacadeForJVM.kt:115)
	at org.jetbrains.kotlin.cli.jvm.compiler.TopDownAnalyzerFacadeForJVM.analyzeFilesWithJavaIntegration(TopDownAnalyzerFacadeForJVM.kt:125)
	at org.jetbrains.kotlin.cli.jvm.compiler.TopDownAnalyzerFacadeForJVM.analyzeFilesWithJavaIntegration$default(TopDownAnalyzerFacadeForJVM.kt:99)
.....
* What went wrong:
Execution failed for task ':project:compileKotlin'.
> A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction
   > Internal compiler error. See log for more details
r

raulraja

02/13/2023, 11:22 AM
Hi Tiago, what version of the Kotlin compiler are you using? We have pending updating Arrow Analysis to the new K2 compiler frontend. Also heads up Arrow Analysis is highlyexperimental :)
t

Tiago

02/13/2023, 1:14 PM
hey Raul, thanks for your quick reply Yeah, want to try it on a personal project 🙂 I am using the 1.8.10 kotlin version
r

raulraja

02/13/2023, 3:57 PM
We need to update it to FIR to 1.8.20-Beta at least, but that requires an entire rewrite of the tree interfaces which are currently mapped to the old kotlin frontend.
I'd probably have to do that unless someone picks it up and I'm currently swamped with work at least until the summer. But I plan to start adapting the tree to FIR when 1.9/2.0 comes stable.
t

Tiago

02/13/2023, 4:00 PM
weird… I created a new project using the 1.8.20-Beta and it worked, the problem was my old project 😅
but anyway, I wonder if I could contribute a little with this
r

raulraja

02/13/2023, 4:01 PM
it may work in some cases but since the Kotlin compiler makes no guarantees of its public api changing in some others it may fail
we don't restrict it
t

Tiago

02/13/2023, 4:01 PM
got it
well, I will try to compile this project and see if I can give any help for it
thanks Raul
r

raulraja

02/13/2023, 5:07 PM
thanks, not sure if there is any easy task there at the moment but if you find anything I'll be happy to meet up and help you through any questions