Remove compiledWithErrors param

`updateIncrementalCache` is not called when
code does not compile.
This commit is contained in:
Alexey Tsvetkov
2017-06-30 21:01:38 +03:00
parent d1fd88fb8e
commit 508d96836c
2 changed files with 4 additions and 7 deletions
@@ -78,8 +78,7 @@ fun makeCompileServices(
fun updateIncrementalCache( fun updateIncrementalCache(
generatedFiles: List<GeneratedFile<*>>, generatedFiles: List<GeneratedFile<*>>,
cache: IncrementalCacheImpl, cache: IncrementalCacheImpl
compiledWithErrors: Boolean
): CompilationResult { ): CompilationResult {
var changesInfo = CompilationResult.NO_CHANGES var changesInfo = CompilationResult.NO_CHANGES
for (generatedFile in generatedFiles) { for (generatedFile in generatedFiles) {
@@ -89,10 +88,8 @@ fun updateIncrementalCache(
} }
} }
if (!compiledWithErrors) { val newChangesInfo = cache.clearCacheForRemovedClasses()
val newChangesInfo = cache.clearCacheForRemovedClasses() changesInfo += newChangesInfo
changesInfo += newChangesInfo
}
return changesInfo return changesInfo
} }
@@ -318,7 +318,7 @@ class IncrementalJvmCompilerRunner(
allGeneratedFiles.addAll(generatedFiles) allGeneratedFiles.addAll(generatedFiles)
caches.inputsCache.registerOutputForSourceFiles(generatedFiles) caches.inputsCache.registerOutputForSourceFiles(generatedFiles)
val compilationResult = updateIncrementalCache(generatedFiles, caches.jvmCache, compiledWithErrors = exitCode != ExitCode.OK) val compilationResult = updateIncrementalCache(generatedFiles, caches.platformCache)
caches.lookupCache.update(lookupTracker, sourcesToCompile, removedKotlinSources) caches.lookupCache.update(lookupTracker, sourcesToCompile, removedKotlinSources)