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(
@@ -1,28 +0,0 @@
================ Step #1 =================
Compiling files:
src/A.kt
src/B.kt
src/companionExtension.kt
src/companionReferenceExplicit.kt
src/companionReferenceImplicit.kt
src/importedMember.kt
End of files
Exit code: ABORT
------------------------------------------
COMPILATION FAILED
Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type String?
Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type String?
Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type String?
Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type String?
================ Step #2 =================
Compiling files:
src/A.kt
src/companionExtension.kt
src/companionReferenceExplicit.kt
src/companionReferenceImplicit.kt
src/importedMember.kt
End of files
Exit code: OK
@@ -1,26 +0,0 @@
================ Step #1 =================
Compiling files:
src/A.kt
src/companionExtension.kt
src/companionReferenceExplicit.kt
src/companionReferenceImplicit.kt
src/importedMember.kt
End of files
Exit code: ABORT
------------------------------------------
COMPILATION FAILED
Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type String?
Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type String?
Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type String?
Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type String?
================ Step #2 =================
Compiling files:
src/companionExtension.kt
src/companionReferenceExplicit.kt
src/companionReferenceImplicit.kt
src/importedMember.kt
End of files
Exit code: OK
@@ -1,22 +0,0 @@
================ Step #1 =================
Compiling files:
src/A.kt
src/companionExtension.kt
src/companionReferenceExplicit.kt
src/companionReferenceImplicit.kt
End of files
Exit code: ABORT
------------------------------------------
COMPILATION FAILED
Unresolved reference: x
================ Step #2 =================
Compiling files:
src/companionExtension.kt
src/companionReferenceExplicit.kt
src/companionReferenceImplicit.kt
End of files
Exit code: OK
@@ -1,21 +0,0 @@
================ Step #1 =================
Compiling files:
src/Enum.kt
src/getRandomEnumEntry.kt
src/use.kt
src/useEnumImplicitly.kt
End of files
Exit code: ABORT
------------------------------------------
COMPILATION FAILED
'when' expression must be exhaustive, add necessary 'C' branch or 'else' branch instead
================ Step #2 =================
Compiling files:
src/getRandomEnumEntry.kt
src/use.kt
src/useEnumImplicitly.kt
End of files
Exit code: OK
@@ -1,21 +0,0 @@
================ Step #1 =================
Compiling files:
src/Enum.kt
src/getRandomEnumEntry.kt
src/use.kt
src/useEnumImplicitly.kt
End of files
Exit code: ABORT
------------------------------------------
COMPILATION FAILED
Unresolved reference: C
================ Step #2 =================
Compiling files:
src/getRandomEnumEntry.kt
src/use.kt
src/useEnumImplicitly.kt
End of files
Exit code: OK
@@ -1,18 +0,0 @@
================ Step #1 =================
Compiling files:
src/Enum.kt
src/useBecameNullable.kt
End of files
Exit code: ABORT
------------------------------------------
COMPILATION FAILED
Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type Any?
================ Step #2 =================
Compiling files:
src/useBecameNullable.kt
End of files
Exit code: OK
@@ -1,17 +0,0 @@
================ Step #1 =================
Compiling files:
src/Base.kt
src/use.kt
End of files
Exit code: ABORT
------------------------------------------
COMPILATION FAILED
'when' expression must be exhaustive, add necessary 'is C' branch or 'else' branch instead
================ Step #2 =================
Compiling files:
src/use.kt
End of files
Exit code: OK
@@ -1,17 +0,0 @@
================ Step #1 =================
Compiling files:
src/Base.kt
src/use.kt
End of files
Exit code: ABORT
------------------------------------------
COMPILATION FAILED
'when' expression must be exhaustive, add necessary 'is Impl2' branch or 'else' branch instead
================ Step #2 =================
Compiling files:
src/use.kt
End of files
Exit code: OK
@@ -1,17 +0,0 @@
================ Step #1 =================
Compiling files:
src/Base.kt
src/use.kt
End of files
Exit code: ABORT
------------------------------------------
COMPILATION FAILED
'when' expression must be exhaustive, add necessary 'is C' branch or 'else' branch instead
================ Step #2 =================
Compiling files:
src/use.kt
End of files
Exit code: OK
@@ -1,22 +0,0 @@
================ Step #1 =================
Compiling files:
src/A.kt
src/D.kt
src/useA.kt
src/useD.kt
End of files
Exit code: ABORT
------------------------------------------
COMPILATION FAILED
Type mismatch: inferred type is A<B> but A<C> was expected
Type mismatch: inferred type is A<B> but A<C> was expected
================ Step #2 =================
Compiling files:
src/D.kt
src/useA.kt
src/useD.kt
End of files
Exit code: OK
@@ -1,18 +0,0 @@
================ Step #1 =================
Compiling files:
src/const.kt
src/usage.kt
End of files
Exit code: ABORT
------------------------------------------
COMPILATION FAILED
Unresolved reference: FOO
================ Step #2 =================
Compiling files:
src/usage.kt
End of files
Exit code: OK
@@ -1,22 +0,0 @@
================ Step #1 =================
Compiling files:
src/A.kt
src/B.kt
src/createADefault.kt
src/createANonDefault.kt
src/useA.kt
End of files
Exit code: ABORT
------------------------------------------
COMPILATION FAILED
Too many arguments for public constructor A() defined in foo.A
================ Step #2 =================
Compiling files:
src/B.kt
src/createADefault.kt
src/useA.kt
End of files
Exit code: OK
@@ -1,24 +0,0 @@
================ Step #1 =================
Compiling files:
src/A.kt
src/B.kt
src/createADefault.kt
src/createANonDefault.kt
src/useA.kt
End of files
Exit code: ABORT
------------------------------------------
COMPILATION FAILED
No value passed for parameter 'x'
No value passed for parameter 'x'
================ Step #2 =================
Compiling files:
src/B.kt
src/createADefault.kt
src/createANonDefault.kt
src/useA.kt
End of files
Exit code: OK
@@ -1,19 +0,0 @@
================ Step #1 =================
Compiling files:
src/fun.kt
src/useDefault.kt
src/useNonDefault.kt
End of files
Exit code: ABORT
------------------------------------------
COMPILATION FAILED
No value passed for parameter 'x'
================ Step #2 =================
Compiling files:
src/useDefault.kt
src/useNonDefault.kt
End of files
Exit code: OK
@@ -1,22 +0,0 @@
================ Step #1 =================
Compiling files:
src/fun.kt
src/useDefault1.kt
src/useDefault2.kt
src/useNonDefault.kt
End of files
Exit code: ABORT
------------------------------------------
COMPILATION FAILED
No value passed for parameter 'y'
No value passed for parameter 'y'
================ Step #2 =================
Compiling files:
src/useDefault1.kt
src/useDefault2.kt
src/useNonDefault.kt
End of files
Exit code: OK
@@ -1,21 +0,0 @@
================ Step #1 =================
Compiling files:
src/A.kt
src/useF.kt
src/useG.kt
End of files
Exit code: ABORT
------------------------------------------
COMPILATION FAILED
Unresolved reference: f
Unresolved reference: g
================ Step #2 =================
Compiling files:
src/useF.kt
src/useG.kt
End of files
Exit code: OK