After bumping to the JS IR Compiler (and Kotlin 1.5.31) I'm running into a compiler error that I can...
a
After bumping to the JS IR Compiler (and Kotlin 1.5.31) I'm running into a compiler error that I can't seem to track down when compiling a specific test compilation. All of my main compilations, and all of my other test compilations seem to compile and run just fine. Does this look like a known issue to anyone? Does anyone know if there's a logfile lingering somewhere that might give me some more details? Truncated stacktrace below -- full stacktrace in thread.
Copy code
> Task :my-module:compileTestDevelopmentExecutableKotlinJs FAILED
e: java.lang.NullPointerException
	at org.jetbrains.kotlin.ir.backend.js.transformers.irToJs.IrElementToJsStatementTransformer.visitCall(IrElementToJsStatementTransformer.kt:132)
	at org.jetbrains.kotlin.ir.backend.js.transformers.irToJs.IrElementToJsStatementTransformer.visitCall(IrElementToJsStatementTransformer.kt:20)

* What went wrong:
Execution failed for task ':my-module:compileTestDevelopmentExecutableKotlinJs'.
> A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction
   > Internal compiler error. See log for more details
Full stacktrace attached here
a
The bugs are tricky, the best approach is usually to upgrade all your dependencies to 1.5.31
a
Hm, I'm using the latest version of all my dependencies…. maybe I'll downgrade back to 1.5.30 for now to make sure that the compiler error is gone and then wait it out
Getting the same stacktrace on 1.5.30, and all my dependencies are up to date there 😕
Is there anywhere I should be looking for a log file? When I encountered a compiler crash with Kotlin Native, I was able to look at logs in
~/Library/Logs/DiagnosticReports/test.kexe_*
a
I am assuming you have cleaned your build already, and rebuild. Also, please confirm if task
compileKotlinJs
success and
compileTestDevelopmentExecutableKotlinJs
still fails. Majorly that is usually due to a linking issue
a
Definitely cleaned/rebuilt multiple times using both 1.5.31 and 1.5.30 I'm able to run
compileKotlinJs
,
compileProductionExecutableKotlinJs
, and
compileDevelopmentExecutableKotlinJs
I'm not able to run
compileTestDevelopmentExecutableKotlinJs
or
compileTestProductionExecutableKotlinJs
Any tips on how to track down what might be causing a linking issue?
r
That's a NPE in the compiler, it's probably not anything you're doing, just a compiler bug
Best bet is a youtrack issue for anything from
org.jetbrains.kotlin
packages. You might be able to run on a newer JVM to get what variable is null and look at the code to figure out what's going on, but it's not easy
a
I tried moving around JVM versions, with no luck. I did notice that
1.6.0-M1
was tagged less than 10 hours ago though, so I tried using that. Issue still there 😞