I'm getting ```e: java.lang.OutOfMemoryError: GC o...
# webassembly
p
I'm getting
Copy code
e: java.lang.OutOfMemoryError: GC overhead limit exceeded
on CI (see the logs), likely in
compileTestDevelopmentExecutableKotlinWasmJs
. Sometimes it passes, so I thought giving Gradle/compiler more memory (2 -> 4 GiB) would help, but it still fails. I also tried disabling WASM JS tests:
Copy code
kotlin {
    wasmJs {
        browser {
            // ...
            testTask {
                enabled = false
            }
        }
    }
}
but looks like the build logic still tries to compile the tests for WASM. 1. Is it a known problem in general? I think it's a sign of something bad going on in the compiler. 2. How can I skip WASM tests entirely, so that
compileTestDevelopmentExecutableKotlinWasmJs
isn't executed? I think making the test task disabled should exclude this task from the task tree?
e
I don't think you're actually increasing the kotlin compiler daemon memory with
-D
and disabling a Gradle task doesn't disable its dependencies (after all, a task can be disabled at execution time, so it's not known whether it should be run or not until the point in time where it would be run)
I think the command-line
./gradlew --exclude-task wasmJsBrowserTest
(
-x
) actually does prevent Gradle from building unnecessary dependencies though
👀 1
p
in
org.gradle.jvmargs
, I tried adjusting
-Xmx
(Gradle itself) and
-Dkotlin.daemon.jvm.options="-Xmx..."
, see here
e
try using a Gradle property
p
actually
--exclude-task wasmJsBrowserTest
did the trick, thanks! I'll stay with this workaround, coverage given by tests for Compose Desktop is good enough for this experimental project, and in the meantime I'll wait for someone from the Kotlin team to confirm what kind of problem we're seeing here
i
Hi, Piotr, if you can share your project please post an issue and we would love to check what is happening there. In 2025 of course :)
👍 1
p