@@ -138,7 +138,7 @@ public class KotlinBuilder : ModuleLevelBuilder(BuilderCategory.SOURCE_PROCESSOR
|
|||||||
val dataManager = projectDescriptor.dataManager
|
val dataManager = projectDescriptor.dataManager
|
||||||
|
|
||||||
if (chunk.targets.any { dataManager.dataPaths.getKotlinCacheVersion(it).isIncompatible() }) {
|
if (chunk.targets.any { dataManager.dataPaths.getKotlinCacheVersion(it).isIncompatible() }) {
|
||||||
LOG.info("Clearing caches for " + chunk.targets.map { it.presentableName }.join())
|
LOG.info("Clearing caches for " + chunk.targets.joinToString { it.presentableName })
|
||||||
chunk.targets.forEach { dataManager.getKotlinCache(it).clean() }
|
chunk.targets.forEach { dataManager.getKotlinCache(it).clean() }
|
||||||
return CHUNK_REBUILD_REQUIRED
|
return CHUNK_REBUILD_REQUIRED
|
||||||
}
|
}
|
||||||
@@ -278,7 +278,7 @@ public class KotlinBuilder : ModuleLevelBuilder(BuilderCategory.SOURCE_PROCESSOR
|
|||||||
): OutputItemsCollectorImpl? {
|
): OutputItemsCollectorImpl? {
|
||||||
|
|
||||||
if (JpsUtils.isJsKotlinModule(chunk.representativeTarget())) {
|
if (JpsUtils.isJsKotlinModule(chunk.representativeTarget())) {
|
||||||
LOG.debug("Compiling to JS ${filesToCompile.values().size()} files in " + filesToCompile.keySet().map { it.getPresentableName() }.join())
|
LOG.debug("Compiling to JS ${filesToCompile.values().size()} files in ${filesToCompile.keySet().joinToString { it.presentableName }}")
|
||||||
return compileToJs(chunk, commonArguments, environment, null, messageCollector, project)
|
return compileToJs(chunk, commonArguments, environment, null, messageCollector, project)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -563,7 +563,7 @@ public class KotlinBuilder : ModuleLevelBuilder(BuilderCategory.SOURCE_PROCESSOR
|
|||||||
|
|
||||||
val moduleFile = KotlinBuilderModuleScriptGenerator.generateModuleDescription(context, chunk, filesToCompile, totalRemovedFiles != 0)
|
val moduleFile = KotlinBuilderModuleScriptGenerator.generateModuleDescription(context, chunk, filesToCompile, totalRemovedFiles != 0)
|
||||||
if (moduleFile == null) {
|
if (moduleFile == null) {
|
||||||
KotlinBuilder.LOG.debug("Not compiling, because no files affected: " + filesToCompile.keySet().map { it.getPresentableName() }.join())
|
KotlinBuilder.LOG.debug("Not compiling, because no files affected: " + filesToCompile.keySet().joinToString { it.presentableName })
|
||||||
// No Kotlin sources found
|
// No Kotlin sources found
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
@@ -574,7 +574,7 @@ public class KotlinBuilder : ModuleLevelBuilder(BuilderCategory.SOURCE_PROCESSOR
|
|||||||
|
|
||||||
KotlinBuilder.LOG.debug("Compiling to JVM ${filesToCompile.values().size()} files"
|
KotlinBuilder.LOG.debug("Compiling to JVM ${filesToCompile.values().size()} files"
|
||||||
+ (if (totalRemovedFiles == 0) "" else " ($totalRemovedFiles removed files)")
|
+ (if (totalRemovedFiles == 0) "" else " ($totalRemovedFiles removed files)")
|
||||||
+ " in " + filesToCompile.keySet().map { it.getPresentableName() }.join())
|
+ " in " + filesToCompile.keySet().joinToString { it.presentableName })
|
||||||
|
|
||||||
KotlinCompilerRunner.runK2JvmCompiler(commonArguments, k2JvmArguments, compilerSettings, messageCollector, environment, moduleFile, outputItemCollector)
|
KotlinCompilerRunner.runK2JvmCompiler(commonArguments, k2JvmArguments, compilerSettings, messageCollector, environment, moduleFile, outputItemCollector)
|
||||||
moduleFile.delete()
|
moduleFile.delete()
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ public class IncrementalCacheImpl(
|
|||||||
|
|
||||||
@TestOnly
|
@TestOnly
|
||||||
public fun dump(): String {
|
public fun dump(): String {
|
||||||
return maps.map { it.dump() }.join("\n\n")
|
return maps.joinToString("\n\n") { it.dump() }
|
||||||
}
|
}
|
||||||
|
|
||||||
public fun markOutputClassesDirty(removedAndCompiledSources: List<File>) {
|
public fun markOutputClassesDirty(removedAndCompiledSources: List<File>) {
|
||||||
@@ -769,7 +769,7 @@ private fun <K : Comparable<K>, V> Map<K, V>.dumpMap(dumpValue: (V)->String): St
|
|||||||
|
|
||||||
@TestOnly
|
@TestOnly
|
||||||
public fun <T : Comparable<T>> Collection<T>.dumpCollection(): String =
|
public fun <T : Comparable<T>> Collection<T>.dumpCollection(): String =
|
||||||
"[${sorted().map(Any::toString).join(", ")}]"
|
"[${sorted().joinToString(", ", transform = Any::toString)}]"
|
||||||
|
|
||||||
private class PathFunctionPair(
|
private class PathFunctionPair(
|
||||||
public val path: String,
|
public val path: String,
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ abstract class AbstractLookupTrackerTest : AbstractIncrementalJpsTest(
|
|||||||
start = end
|
start = end
|
||||||
}
|
}
|
||||||
|
|
||||||
lines[line - 1] = parts.join("") + lineContent.subSequence(start, lineContent.length)
|
lines[line - 1] = parts.joinToString("") + lineContent.subSequence(start, lineContent.length)
|
||||||
}
|
}
|
||||||
|
|
||||||
val actual = lines.joinToString("\n")
|
val actual = lines.joinToString("\n")
|
||||||
|
|||||||
Reference in New Issue
Block a user