diff --git a/compiler/incremental-compilation-impl/src/org/jetbrains/kotlin/incremental/IncrementalCompilerRunner.kt b/compiler/incremental-compilation-impl/src/org/jetbrains/kotlin/incremental/IncrementalCompilerRunner.kt index 73476fb4bdd..55dd0797956 100644 --- a/compiler/incremental-compilation-impl/src/org/jetbrains/kotlin/incremental/IncrementalCompilerRunner.kt +++ b/compiler/incremental-compilation-impl/src/org/jetbrains/kotlin/incremental/IncrementalCompilerRunner.kt @@ -118,7 +118,7 @@ abstract class IncrementalCompilerRunner< }.filterTo(dirtyFiles, File::isKotlinFile) if (dirtySourcesSinceLastTimeFile.exists()) { - val files = dirtySourcesSinceLastTimeFile.readLines().map(::File).filter(File::exists) + val files = dirtySourcesSinceLastTimeFile.readLines().map(::File) if (files.isNotEmpty()) { reporter.report { "Source files added since last compilation: ${reporter.pathsAsString(files)}" } } @@ -206,7 +206,7 @@ abstract class IncrementalCompilerRunner< // 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 = allSourcesToCompile.joinToString(separator = System.getProperty("line.separator")) { it.canonicalPath } + val text = dirtySources.joinToString(separator = System.getProperty("line.separator")) { it.canonicalPath } dirtySourcesSinceLastTimeFile.writeText(text) val services = makeServices(args, lookupTracker, expectActualTracker, caches, compilationMode).build() diff --git a/jps-plugin/testData/incremental/classHierarchyAffected/companionObjectInheritedMemberChanged/gradle-build.log b/jps-plugin/testData/incremental/classHierarchyAffected/companionObjectInheritedMemberChanged/gradle-build.log new file mode 100644 index 00000000000..40f2551d7c5 --- /dev/null +++ b/jps-plugin/testData/incremental/classHierarchyAffected/companionObjectInheritedMemberChanged/gradle-build.log @@ -0,0 +1,28 @@ +================ 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 \ No newline at end of file diff --git a/jps-plugin/testData/incremental/classHierarchyAffected/companionObjectMemberChanged/gradle-build.log b/jps-plugin/testData/incremental/classHierarchyAffected/companionObjectMemberChanged/gradle-build.log new file mode 100644 index 00000000000..393d491baa1 --- /dev/null +++ b/jps-plugin/testData/incremental/classHierarchyAffected/companionObjectMemberChanged/gradle-build.log @@ -0,0 +1,26 @@ +================ 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 \ No newline at end of file diff --git a/jps-plugin/testData/incremental/classHierarchyAffected/companionObjectNameChanged/gradle-build.log b/jps-plugin/testData/incremental/classHierarchyAffected/companionObjectNameChanged/gradle-build.log new file mode 100644 index 00000000000..7ffeb71c152 --- /dev/null +++ b/jps-plugin/testData/incremental/classHierarchyAffected/companionObjectNameChanged/gradle-build.log @@ -0,0 +1,22 @@ +================ 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: Companion +Unresolved reference: Companion + +================ Step #2 ================= + +Compiling files: + src/companionExtension.kt + src/companionReferenceExplicit.kt + src/companionReferenceImplicit.kt +End of files +Exit code: OK \ No newline at end of file diff --git a/jps-plugin/testData/incremental/classHierarchyAffected/companionObjectToSimpleObject/gradle-build.log b/jps-plugin/testData/incremental/classHierarchyAffected/companionObjectToSimpleObject/gradle-build.log new file mode 100644 index 00000000000..4d4a24025d7 --- /dev/null +++ b/jps-plugin/testData/incremental/classHierarchyAffected/companionObjectToSimpleObject/gradle-build.log @@ -0,0 +1,22 @@ +================ 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 + diff --git a/jps-plugin/testData/incremental/classHierarchyAffected/enumEntryAdded/gradle-build.log b/jps-plugin/testData/incremental/classHierarchyAffected/enumEntryAdded/gradle-build.log new file mode 100644 index 00000000000..864c40f0c6a --- /dev/null +++ b/jps-plugin/testData/incremental/classHierarchyAffected/enumEntryAdded/gradle-build.log @@ -0,0 +1,21 @@ +================ 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 \ No newline at end of file diff --git a/jps-plugin/testData/incremental/classHierarchyAffected/enumEntryRemoved/gradle-build.log b/jps-plugin/testData/incremental/classHierarchyAffected/enumEntryRemoved/gradle-build.log new file mode 100644 index 00000000000..ff82ea0bc7a --- /dev/null +++ b/jps-plugin/testData/incremental/classHierarchyAffected/enumEntryRemoved/gradle-build.log @@ -0,0 +1,21 @@ +================ 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 \ No newline at end of file diff --git a/jps-plugin/testData/incremental/classHierarchyAffected/enumMemberChanged/gradle-build.log b/jps-plugin/testData/incremental/classHierarchyAffected/enumMemberChanged/gradle-build.log new file mode 100644 index 00000000000..d0a67a9283f --- /dev/null +++ b/jps-plugin/testData/incremental/classHierarchyAffected/enumMemberChanged/gradle-build.log @@ -0,0 +1,18 @@ +================ 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 + diff --git a/jps-plugin/testData/incremental/classHierarchyAffected/sealedClassImplAdded/gradle-build.log b/jps-plugin/testData/incremental/classHierarchyAffected/sealedClassImplAdded/gradle-build.log new file mode 100644 index 00000000000..5c2f2bce921 --- /dev/null +++ b/jps-plugin/testData/incremental/classHierarchyAffected/sealedClassImplAdded/gradle-build.log @@ -0,0 +1,17 @@ +================ 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 \ No newline at end of file diff --git a/jps-plugin/testData/incremental/classHierarchyAffected/sealedClassIndirectImplAdded/gradle-build.log b/jps-plugin/testData/incremental/classHierarchyAffected/sealedClassIndirectImplAdded/gradle-build.log new file mode 100644 index 00000000000..e30f1576339 --- /dev/null +++ b/jps-plugin/testData/incremental/classHierarchyAffected/sealedClassIndirectImplAdded/gradle-build.log @@ -0,0 +1,17 @@ +================ 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 \ No newline at end of file diff --git a/jps-plugin/testData/incremental/classHierarchyAffected/sealedClassNestedImplAdded/gradle-build.log b/jps-plugin/testData/incremental/classHierarchyAffected/sealedClassNestedImplAdded/gradle-build.log new file mode 100644 index 00000000000..5c2f2bce921 --- /dev/null +++ b/jps-plugin/testData/incremental/classHierarchyAffected/sealedClassNestedImplAdded/gradle-build.log @@ -0,0 +1,17 @@ +================ 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 \ No newline at end of file diff --git a/jps-plugin/testData/incremental/classHierarchyAffected/varianceChanged/gradle-build.log b/jps-plugin/testData/incremental/classHierarchyAffected/varianceChanged/gradle-build.log new file mode 100644 index 00000000000..daaa79da853 --- /dev/null +++ b/jps-plugin/testData/incremental/classHierarchyAffected/varianceChanged/gradle-build.log @@ -0,0 +1,22 @@ +================ 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 but A was expected +Type mismatch: inferred type is A but A was expected + +================ Step #2 ================= + +Compiling files: + src/D.kt + src/useA.kt + src/useD.kt +End of files +Exit code: OK \ No newline at end of file diff --git a/jps-plugin/testData/incremental/pureKotlin/constantRemoved/gradle-build.log b/jps-plugin/testData/incremental/pureKotlin/constantRemoved/gradle-build.log new file mode 100644 index 00000000000..713d24c3ec6 --- /dev/null +++ b/jps-plugin/testData/incremental/pureKotlin/constantRemoved/gradle-build.log @@ -0,0 +1,18 @@ +================ 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 + diff --git a/jps-plugin/testData/incremental/pureKotlin/defaultArgumentInConstructorRemoved/gradle-build.log b/jps-plugin/testData/incremental/pureKotlin/defaultArgumentInConstructorRemoved/gradle-build.log new file mode 100644 index 00000000000..49f1b6e766f --- /dev/null +++ b/jps-plugin/testData/incremental/pureKotlin/defaultArgumentInConstructorRemoved/gradle-build.log @@ -0,0 +1,22 @@ +================ 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 \ No newline at end of file diff --git a/jps-plugin/testData/incremental/pureKotlin/defaultValueInConstructorRemoved/gradle-build.log b/jps-plugin/testData/incremental/pureKotlin/defaultValueInConstructorRemoved/gradle-build.log new file mode 100644 index 00000000000..1c199609bf1 --- /dev/null +++ b/jps-plugin/testData/incremental/pureKotlin/defaultValueInConstructorRemoved/gradle-build.log @@ -0,0 +1,24 @@ +================ 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 \ No newline at end of file diff --git a/jps-plugin/testData/incremental/pureKotlin/defaultValueRemoved1/gradle-build.log b/jps-plugin/testData/incremental/pureKotlin/defaultValueRemoved1/gradle-build.log new file mode 100644 index 00000000000..87bec11dbdd --- /dev/null +++ b/jps-plugin/testData/incremental/pureKotlin/defaultValueRemoved1/gradle-build.log @@ -0,0 +1,19 @@ +================ 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 \ No newline at end of file diff --git a/jps-plugin/testData/incremental/pureKotlin/defaultValueRemoved2/gradle-build.log b/jps-plugin/testData/incremental/pureKotlin/defaultValueRemoved2/gradle-build.log new file mode 100644 index 00000000000..611b91240f6 --- /dev/null +++ b/jps-plugin/testData/incremental/pureKotlin/defaultValueRemoved2/gradle-build.log @@ -0,0 +1,22 @@ +================ 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 \ No newline at end of file diff --git a/jps-plugin/testData/incremental/withJava/other/packageFacadeToClass/gradle-build.log b/jps-plugin/testData/incremental/withJava/other/packageFacadeToClass/gradle-build.log new file mode 100644 index 00000000000..16aced53439 --- /dev/null +++ b/jps-plugin/testData/incremental/withJava/other/packageFacadeToClass/gradle-build.log @@ -0,0 +1,21 @@ +================ 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 +