Fix unstable testIncrementalCompilationAfterCacheHit test

This commit is contained in:
nataliya.valtman
2022-02-11 20:35:14 +03:00
parent 0463b5ec3c
commit c38dd1c004
19 changed files with 99 additions and 78 deletions
@@ -65,12 +65,13 @@ class IncrementalCompilationOptions(
requestedCompilationResults: Array<Int>,
val usePreciseJavaTracking: Boolean,
/**
* Directories that should be cleared when IC decides to rebuild
*/
val outputFiles: List<File>,
* Directories that should be cleared when IC decides to rebuild
*/
val outputFiles: List<File>,
val multiModuleICSettings: MultiModuleICSettings,
val modulesInfo: IncrementalModuleInfo,
kotlinScriptExtensions: Array<String>? = null
kotlinScriptExtensions: Array<String>? = null,
val withAbiSnapshot: Boolean = false
) : CompilationOptions(
compilerMode,
targetPlatform,
@@ -312,8 +312,6 @@ fun configureDaemonJVMOptions(opts: DaemonJVMOptions,
if (inheritAdditionalProperties) {
CompilerSystemProperties.COMPILE_DAEMON_LOG_PATH_PROPERTY.value?.let { opts.jvmParams.add("D${CompilerSystemProperties.COMPILE_DAEMON_LOG_PATH_PROPERTY.property}=\"$it\"") }
CompilerSystemProperties.KOTLIN_COMPILER_ENVIRONMENT_KEEPALIVE_PROPERTY.value?.let { opts.jvmParams.add("D${CompilerSystemProperties.KOTLIN_COMPILER_ENVIRONMENT_KEEPALIVE_PROPERTY.property}") }
//Temporary solution to test abi snapshot
CompilerSystemProperties.COMPILE_INCREMENTAL_WITH_CLASSPATH_SNAPSHOTS.value?.let { opts.jvmParams.add("D${CompilerSystemProperties.COMPILE_INCREMENTAL_WITH_CLASSPATH_SNAPSHOTS.property}") }
}
if (opts.jvmParams.none { it.matches(jvmAssertArgsRegex) }) {
@@ -559,7 +559,8 @@ abstract class CompileServiceImplBase(
reporter = reporter,
buildHistoryFile = incrementalCompilationOptions.multiModuleICSettings.buildHistoryFile,
scopeExpansion = if (args.isIrBackendEnabled()) CompileScopeExpansionMode.ALWAYS else CompileScopeExpansionMode.NEVER,
modulesApiHistory = modulesApiHistory
modulesApiHistory = modulesApiHistory,
withAbiSnapshot = incrementalCompilationOptions.withAbiSnapshot
)
return try {
compiler.compile(allKotlinFiles, args, compilerMessageCollector, changedFiles)
@@ -617,7 +618,8 @@ abstract class CompileServiceImplBase(
usePreciseJavaTracking = incrementalCompilationOptions.usePreciseJavaTracking,
modulesApiHistory = modulesApiHistory,
kotlinSourceFilesExtensions = allKotlinExtensions,
classpathChanges = incrementalCompilationOptions.classpathChanges
classpathChanges = incrementalCompilationOptions.classpathChanges,
withAbiSnapshot = incrementalCompilationOptions.withAbiSnapshot
)
return try {
compiler.compile(allKotlinFiles, k2jvmArgs, compilerMessageCollector, changedFiles, projectRoot)