Fix updating complementary files map in case of compilation errors
#KT-27868 Fixed Previously given dirtyFiles was removed from complementaryFilesMap exactly on call of clearComplementaryFilesMapping. This causes fail of next build in case of compilation error of previous build on JPS (since complementary files not known on second build). The right way to do it is removing (replacing) them only after successful build. This was working on Gradle since Gradle rebuilds whole module (project) in case of build error.
This commit is contained in:
+2
-2
@@ -198,7 +198,7 @@ abstract class IncrementalCompilerRunner<
|
||||
var exitCode = ExitCode.OK
|
||||
|
||||
while (dirtySources.any() || runWithNoDirtyKotlinSources(caches)) {
|
||||
val complementaryFiles = caches.platformCache.clearComplementaryFilesMapping(dirtySources)
|
||||
val complementaryFiles = caches.platformCache.getComplementaryFilesRecursive(dirtySources)
|
||||
dirtySources.addAll(complementaryFiles)
|
||||
caches.platformCache.markDirty(dirtySources)
|
||||
caches.inputsCache.removeOutputForSourceFiles(dirtySources)
|
||||
@@ -237,7 +237,7 @@ abstract class IncrementalCompilerRunner<
|
||||
}
|
||||
}
|
||||
|
||||
caches.platformCache.registerComplementaryFiles(expectActualTracker)
|
||||
caches.platformCache.updateComplementaryFiles(dirtySources, expectActualTracker)
|
||||
caches.inputsCache.registerOutputForSourceFiles(generatedFiles)
|
||||
caches.lookupCache.update(lookupTracker, sourcesToCompile, removedKotlinSources)
|
||||
val changesCollector = ChangesCollector()
|
||||
|
||||
Reference in New Issue
Block a user