Recompile all dirty files in case of error

This commit is contained in:
Alexey Tsvetkov
2020-01-13 13:12:26 +03:00
parent 2d598d50d7
commit ef83431618
17 changed files with 3 additions and 340 deletions
@@ -208,7 +208,7 @@ abstract class IncrementalCompilerRunner<
val currentBuildInfo = BuildInfo(startTS = System.currentTimeMillis())
val buildDirtyLookupSymbols = HashSet<LookupSymbol>()
val buildDirtyFqNames = HashSet<FqName>()
val allSourcesToCompile = HashSet<File>()
val allDirtySources = HashSet<File>()
var exitCode = ExitCode.OK
@@ -222,10 +222,8 @@ abstract class IncrementalCompilerRunner<
val expectActualTracker = ExpectActualTrackerImpl()
val (sourcesToCompile, removedKotlinSources) = dirtySources.partition(File::exists)
// todo: more optimal to save only last iteration, but it will require adding standalone-ic specific logs
// (because jps rebuilds all files from last build if it failed and gradle rebuilds everything)
allSourcesToCompile.addAll(sourcesToCompile)
val text = dirtySources.joinToString(separator = System.getProperty("line.separator")) { it.canonicalPath }
allDirtySources.addAll(dirtySources)
val text = allDirtySources.joinToString(separator = System.getProperty("line.separator")) { it.canonicalPath }
dirtySourcesSinceLastTimeFile.writeText(text)
val services = makeServices(