https://kotlinlang.org logo
#build-tools
Title
# build-tools
j

jw

05/31/2017, 4:00 PM
think i found it. -Dkotlin.compiler.execution.strategy="in-process"
i

ilya.gorbunov

05/31/2017, 4:12 PM
jw: Not sure it should be used. Kotlin compiler in-process can conflict with Kotlin compiler used by gradle to compile GSK build scripts.
So the only two viable options are out-of-process and daemon
j

jw

05/31/2017, 4:12 PM
I'm fine with it running out of process, but I want it to exit when the task is done.
Ah, ok. So "out-of-process" is an option then? I was just about to go look for other values.
a

alexey.tsvetkov

06/07/2017, 12:58 PM
BTW @ilya.gorbunov is not quite right. Running compiler in-process is a viable option. It will be launched in an isolated classloader, so it will not clash with kotlin runtime bundled in Gradle (for GSK). There is a few caveats though: 1.
in-process
&
out-of-process
do not support IC at the moment (which is not a problem for CI). 2. in theory we could try to cache
in-process
isolated classloader for a build, so the compiler classes would be optimized by JIT between compiler invokations. However previously caching classloader lead to memory leak, so for now we creating a new classloader for each invocation of the compiler (I'm going to look into this later). 3. Running compiler in-process can lead to a JVM crash https://youtrack.jetbrains.com/issue/KT-17031 (there is a workaround in the issue). // cc @jw
5 Views