Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Isolate Kotlin compiler instances for Multiplex workers. #515

Merged

Conversation

jongerrish
Copy link
Contributor

Following the Kotlin Compiler Daemon and conversations with Jetbrains it seems
that we need to set the system property kotlin.environment.keepalive so that parallel builds do not clobber each other.

In exec the environment is registered as a disposable to be torn down, this system property avoids this.

Switching to a new instance of the compiler for each invocation for safety. There is little state in the compiler and this doesn't affect performance.

Following the Kotlin Compiler Daemon and conversations with Jetbrains it seems
that we need to set the system property `kotlin.environment.keepalive` so that parallel builds do not clobber each other.

In `exec` the environment is registered as a disposable to be torn down, this system property avoids this.

Switching to a new instance of the compiler for each invocation for safety. There is little state in the compiler and this doesn't affect performance.
@restingbull restingbull merged commit b300cd8 into bazelbuild:master Apr 1, 2021
rockwotj added a commit to rockwotj/rules_kotlin that referenced this pull request Jul 20, 2021
restingbull pushed a commit that referenced this pull request Jul 22, 2021
…" (#559)

This reverts commit b300cd8.

Introduces issues with multiplex, but the core issue is a bigger problem.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants