j

    jw

    5 years ago
    think i found it. -Dkotlin.compiler.execution.strategy="in-process"
    ilya.gorbunov

    ilya.gorbunov

    5 years ago
    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

    5 years ago
    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.
    alexey.tsvetkov

    alexey.tsvetkov

    5 years ago
    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