Gary Peck
04/08/2024, 10:41 AMorg.gradle.jvmargs=-Xss32m
in my project's gradle.properties
file to solve this problem. However, I just updated my Multiplatform project to Kotlin 1.9.23 and my builds again started failing with StackOverflowError
when running in CI. I tried bumping the stack size to 64MB but it didn't help. What's a reasonable stack size to configure for the Kotlin/JS compiler when building a somewhat complex Multiplatform project? I can't find any guidance about this in the docs.
The specific error I'm getting is:
e: java.lang.StackOverflowError
at org.jetbrains.kotlin.js.translate.utils.JsAstUtils.decomposeAssignmentToVariable(JsAstUtils.java:391)
at org.jetbrains.kotlin.js.inline.clean.TemporaryVariableElimination$analyze$1.processBinaryExpression(TemporaryVariableElimination.kt:141)
> Task :pbandk-runtime:compileTestDevelopmentExecutableKotlinJs FAILED
You can see the entire stack trace at https://github.com/streem/pbandk/actions/runs/8597042113/job/23554863653. I'm running a gradle build using -Dorg.gradle.daemon=false -Dkotlin.compiler.execution.strategy=in-process -XX:MaxMetaspaceSize=512m -Xmx3g -Xss64m
.