Introduce IncrementalCompilerRunner#markDirty

This commit is contained in:
Alexey Tsvetkov
2017-08-29 00:03:24 +03:00
parent 53d911ab99
commit 65529fa866
4 changed files with 9 additions and 7 deletions
@@ -131,7 +131,8 @@ abstract class IncrementalCompilerRunner<
}
}
protected open fun markOutputDirty(caches: CacheManager, dirtySources: List<File>) {
protected open fun markDirty(caches: CacheManager, dirtySources: List<File>) {
caches.platformCache.markDirty(dirtySources)
}
protected abstract fun compareAndUpdateCache(caches: CacheManager, generatedFiles: List<GeneratedFile>): CompilationResult
@@ -175,7 +176,7 @@ abstract class IncrementalCompilerRunner<
val allGeneratedFiles = hashSetOf<GeneratedFile>()
while (dirtySources.any()) {
markOutputDirty(caches, dirtySources)
caches.platformCache.markDirty(dirtySources)
caches.inputsCache.removeOutputForSourceFiles(dirtySources)
val lookupTracker = LookupTrackerImpl(LookupTracker.DO_NOTHING)
@@ -196,10 +196,9 @@ class IncrementalJvmCompilerRunner(
}
private var outdatedClasses: Iterable<JvmClassName> = emptyList()
override fun markOutputDirty(caches: IncrementalJvmCachesManager, dirtySources: List<File>) {
override fun markDirty(caches: IncrementalJvmCachesManager, dirtySources: List<File>) {
outdatedClasses = caches.platformCache.classesBySources(dirtySources)
caches.platformCache.markOutputClassesDirty(dirtySources)
super.markOutputDirty(caches, dirtySources)
super.markDirty(caches, dirtySources)
}
override fun postCompilationHook(exitCode: ExitCode) {