Don't use global state for keeping incremental compilation state
Previously IC state was stored in System properties. As result parallel compilation might cause incorrect state of IC, what led to corruption of kotlin_module files. Now IC state is stored via CompilerArguments and CompilerConfiguration #KT-46038 Fixed
This commit is contained in:
@@ -319,7 +319,7 @@ abstract class CompileServiceImplBase(
|
||||
CompilerMode.JPS_COMPILER -> {
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
servicesFacade as JpsServicesFacadeT
|
||||
withIC(enabled = servicesFacade.hasIncrementalCaches()) {
|
||||
withIC(k2PlatformArgs, enabled = servicesFacade.hasIncrementalCaches()) {
|
||||
doCompile(sessionId, daemonReporter, tracer = null) { eventManger, profiler ->
|
||||
val services = createServices(servicesFacade, eventManger, profiler)
|
||||
compiler.exec(messageCollector, services, k2PlatformArgs)
|
||||
@@ -346,7 +346,7 @@ abstract class CompileServiceImplBase(
|
||||
val gradleIncrementalServicesFacade = servicesFacade
|
||||
|
||||
when (targetPlatform) {
|
||||
CompileService.TargetPlatform.JVM -> withIC {
|
||||
CompileService.TargetPlatform.JVM -> withIC(k2PlatformArgs) {
|
||||
doCompile(sessionId, daemonReporter, tracer = null) { _, _ ->
|
||||
execIncrementalCompiler(
|
||||
k2PlatformArgs as K2JVMCompilerArguments,
|
||||
@@ -360,7 +360,7 @@ abstract class CompileServiceImplBase(
|
||||
)
|
||||
}
|
||||
}
|
||||
CompileService.TargetPlatform.JS -> withJsIC {
|
||||
CompileService.TargetPlatform.JS -> withJsIC(k2PlatformArgs) {
|
||||
doCompile(sessionId, daemonReporter, tracer = null) { _, _ ->
|
||||
execJsIncrementalCompiler(
|
||||
k2PlatformArgs as K2JSCompilerArguments,
|
||||
|
||||
Reference in New Issue
Block a user