From bd7c2ae6d76ce74bc061c365dafd0236fda18e7b Mon Sep 17 00:00:00 2001 From: Hung Nguyen Date: Mon, 4 Oct 2021 10:37:24 +0100 Subject: [PATCH] KT-45777: Snapshot Java classes using ASM analysis directly This is faster than the current approach which creates `JavaClassDescriptor`s, converts them to protos, and then snapshots these protos. - Refactor unit tests to faciliate further changes - moves test data to a directory that matches the tests' package name - moves expected snapshots to a separate directory - adds public and private fields/properties to sample class - Compute changes between ASM-based Java class snapshots - Don't collect members of an added Java class as changes as it's enough to report the name of the added Java class as changed (we also do that for added Kotlin classes and Kotlin/Java removed classes). - Add unit tests for impact analysis in advance - Compute impacted symbols of changed symbols Also do not collect added classes/class members as they don't impact recompilation. -Use ClassId when computing Java class changes It is more precise than JvmClassName, which can be ambiguous around the `$` character (e.g., ClassId "com/example/A$B.C" and "com/example/A.B$C" both have the same JvmClassName "com/example/A$B$C"). - Compute impacted set of changed symbols across Kotlin and Java - Add unit tests for impact analysis across Kotlin and Java - Compute supertypes of Kotlin classes during snapshotting - Handle inner classes when computing list of changed symbols. For the reported symbols, always check all options: class member, inner class, top level class, top level member. Test: IncrementalJavaChangeClasspathSnapshotIT.testAddingInnerClass --- .idea/dictionaries/hungnv.xml | 8 + .../kotlin/incremental/ClasspathChanges.kt | 16 +- .../incremental/storage/externalizers.kt | 17 +- .../kotlin/incremental/JavaClassNameTest.kt | 13 +- .../kotlin/gradle/IncrementalJavaChangeIT.kt | 12 + .../kotlin/gradle/incremental/ChangeSet.kt | 103 ++ .../incremental/ClasspathChangesComputer.kt | 224 ++++- .../gradle/incremental/ClasspathSnapshot.kt | 58 +- .../ClasspathSnapshotSerializer.kt | 49 +- .../incremental/ClasspathSnapshotter.kt | 94 +- .../incremental/JavaClassChangesComputer.kt | 86 ++ .../incremental/JavaClassSnapshotter.kt | 87 ++ .../jetbrains/kotlin/gradle/tasks/Tasks.kt | 7 +- .../ClasspathChangesComputerTest.kt | 391 +++++--- .../ClasspathSnapshotSerializerTest.kt | 22 +- .../ClasspathSnapshotTestCommon.kt | 218 +++-- .../incremental/ClasspathSnapshotterTest.kt | 75 +- .../current-classpath/0/com/example/A.class | Bin 582 -> 0 bytes .../current-classpath/0/com/example/AKt.class | Bin 358 -> 0 bytes .../current-classpath/0/com/example/B.class | Bin 997 -> 0 bytes .../current-classpath/0/com/example/BKt.class | Bin 359 -> 0 bytes .../current-classpath/0/com/example/D.class | Bin 582 -> 0 bytes .../current-classpath/0/com/example/DKt.class | Bin 441 -> 0 bytes .../previous-classpath/0/com/example/A.class | Bin 582 -> 0 bytes .../0/com/example/AKt.class | Bin 358 -> 0 bytes .../previous-classpath/0/com/example/B.class | Bin 830 -> 0 bytes .../0/com/example/BKt.class | Bin 358 -> 0 bytes .../previous-classpath/0/com/example/C.class | Bin 582 -> 0 bytes .../0/com/example/CKt.class | Bin 441 -> 0 bytes .../current-classpath/0/com/example/A.java | 6 - .../current-classpath/0/com/example/B.java | 9 - .../current-classpath/0/com/example/D.java | 6 - .../previous-classpath/0/com/example/A.java | 5 - .../previous-classpath/0/com/example/B.java | 7 - .../previous-classpath/0/com/example/C.java | 6 - .../current-classpath/0/com/example/A.kt | 9 - .../current-classpath/0/com/example/B.kt | 12 - .../current-classpath/0/com/example/D.kt | 12 - .../previous-classpath/0/com/example/A.kt | 7 - .../previous-classpath/0/com/example/B.kt | 9 - .../previous-classpath/0/com/example/C.kt | 12 - .../com/example/SimpleKotlinClass.class | Bin 893 -> 0 bytes .../com/example/SimpleKotlinClass.class | Bin 883 -> 0 bytes .../com/example/SimpleKotlinClass.class | Bin 876 -> 0 bytes .../SimpleJavaClass-expected-snapshot.json | 697 ------------- .../SimpleKotlinClass-expected-snapshot.json | 35 - .../original/com/example/SimpleKotlinClass.kt | 12 - .../com/example/ChangedKotlinSuperClass.class | Bin 0 -> 921 bytes .../KotlinSubClassOfJavaSuperClass.class | Bin 0 -> 574 bytes .../KotlinSubClassOfKotlinSuperClass.class | Bin 0 -> 584 bytes .../0/com/example/UnimpactedKotlinClass.class | Bin 0 -> 496 bytes .../com/example/ChangedKotlinSuperClass.class | Bin 0 -> 771 bytes .../KotlinSubClassOfJavaSuperClass.class | Bin 0 -> 574 bytes .../KotlinSubClassOfKotlinSuperClass.class | Bin 0 -> 584 bytes .../0/com/example/UnimpactedKotlinClass.class | Bin 0 -> 496 bytes .../0/com/example/ChangedJavaSuperClass.java | 10 + .../0/com/example/ChangedKotlinSuperClass.kt | 6 + .../example/JavaSubClassOfJavaSuperClass.java | 4 + .../JavaSubClassOfKotlinSuperClass.java | 4 + .../example/KotlinSubClassOfJavaSuperClass.kt | 3 + .../KotlinSubClassOfKotlinSuperClass.kt | 3 + .../0/com/example/UnimpactedJavaClass.java | 4 + .../0/com/example/UnimpactedKotlinClass.kt | 3 + .../0/com/example/ChangedJavaSuperClass.java | 9 + .../0/com/example/ChangedKotlinSuperClass.kt | 6 + .../example/JavaSubClassOfJavaSuperClass.java | 4 + .../JavaSubClassOfKotlinSuperClass.java | 4 + .../example/KotlinSubClassOfJavaSuperClass.kt | 3 + .../KotlinSubClassOfKotlinSuperClass.kt | 3 + .../0/com/example/UnimpactedJavaClass.java | 4 + .../0/com/example/UnimpactedKotlinClass.kt | 3 + .../0/com/example/ChangedSuperClass.class | Bin 0 -> 903 bytes .../0/com/example/SubClass.class | Bin 0 -> 502 bytes .../0/com/example/SubSubClass.class | Bin 0 -> 491 bytes .../0/com/example/UnimpactedClass.class | Bin 0 -> 478 bytes .../0/com/example/ChangedSuperClass.class | Bin 0 -> 753 bytes .../0/com/example/SubClass.class | Bin 0 -> 502 bytes .../0/com/example/SubSubClass.class | Bin 0 -> 491 bytes .../0/com/example/UnimpactedClass.class | Bin 0 -> 478 bytes .../0/com/example/ChangedSuperClass.java | 10 + .../0/com/example/SubClass.java | 4 + .../0/com/example/SubSubClass.java | 4 + .../0/com/example/UnimpactedClass.java | 4 + .../0/com/example/ChangedSuperClass.java | 9 + .../0/com/example/SubClass.java | 4 + .../0/com/example/SubSubClass.java | 4 + .../0/com/example/UnimpactedClass.java | 4 + .../0/com/example/ChangedSuperClass.kt | 6 + .../0/com/example/SubClass.kt | 3 + .../0/com/example/SubSubClass.kt | 3 + .../0/com/example/UnimpactedClass.kt | 3 + .../0/com/example/ChangedSuperClass.kt | 6 + .../0/com/example/SubClass.kt | 3 + .../0/com/example/SubSubClass.kt | 3 + .../0/com/example/UnimpactedClass.kt | 3 + .../0/com/example/AddedClass.class | Bin 0 -> 721 bytes .../example/ModifiedClassChangedMembers.class | Bin 0 -> 1439 bytes .../ModifiedClassUnchangedMembers.class | Bin 0 -> 828 bytes .../com/example/TopLevelDeclarations2Kt.class | Bin 0 -> 529 bytes .../com/example/TopLevelDeclarationsKt.class | Bin 0 -> 1323 bytes .../0/com/example/UnchangedClass.class | Bin 0 -> 733 bytes .../example/ModifiedClassChangedMembers.class | Bin 0 -> 1264 bytes .../ModifiedClassUnchangedMembers.class | Bin 0 -> 793 bytes .../0/com/example/RemovedClass.class | Bin 0 -> 727 bytes .../com/example/TopLevelDeclarations2Kt.class | Bin 0 -> 406 bytes .../com/example/TopLevelDeclarationsKt.class | Bin 0 -> 1213 bytes .../0/com/example/UnchangedClass.class | Bin 0 -> 733 bytes .../0/com/example/AddedClass.java | 9 + .../example/ModifiedClassChangedMembers.java | 18 + .../ModifiedClassUnchangedMembers.java | 10 + .../0/com/example/UnchangedClass.java | 9 + .../example/ModifiedClassChangedMembers.java | 17 + .../ModifiedClassUnchangedMembers.java | 9 + .../0/com/example/RemovedClass.java | 9 + .../0/com/example/UnchangedClass.java | 9 + .../0/com/example/AddedClass.kt | 6 + .../example/ModifiedClassChangedMembers.kt | 10 + .../example/ModifiedClassUnchangedMembers.kt | 7 + .../0/com/example/UnchangedClass.kt | 6 + .../0/com/example/topLevelDeclarations.kt | 11 + .../0/com/example/topLevelDeclarations2.kt | 3 + .../example/ModifiedClassChangedMembers.kt | 10 + .../example/ModifiedClassUnchangedMembers.kt | 6 + .../0/com/example/RemovedClass.kt | 6 + .../0/com/example/UnchangedClass.kt | 6 + .../0/com/example/topLevelDeclarations.kt | 10 + .../0/com/example/topLevelDeclarations2.kt | 3 + .../com/example/SimpleKotlinClass.class | Bin 0 -> 1122 bytes .../com/example/SimpleKotlinClass.class | Bin 0 -> 1143 bytes .../com/example/SimpleKotlinClass.class | Bin 0 -> 1103 bytes ...JavaClassWithNestedClasses$InnerClass.json | 58 ++ .../SimpleJavaClass-protoBased=false.json | 48 + .../SimpleJavaClass-protoBased=true.json} | 923 +++++++++--------- .../kotlin/com/example/SimpleKotlinClass.json | 45 + .../example/JavaClassWithNestedClasses.java | 4 + .../java}/com/example/SimpleJavaClass.java | 4 + .../kotlin/com/example/SimpleKotlinClass.kt | 16 + 137 files changed, 2139 insertions(+), 1603 deletions(-) create mode 100644 .idea/dictionaries/hungnv.xml create mode 100644 libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/incremental/ChangeSet.kt create mode 100644 libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/incremental/JavaClassChangesComputer.kt create mode 100644 libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/incremental/JavaClassSnapshotter.kt delete mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/ClasspathChangesComputerTest/testMultipleClasses/classes/kotlin/current-classpath/0/com/example/A.class delete mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/ClasspathChangesComputerTest/testMultipleClasses/classes/kotlin/current-classpath/0/com/example/AKt.class delete mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/ClasspathChangesComputerTest/testMultipleClasses/classes/kotlin/current-classpath/0/com/example/B.class delete mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/ClasspathChangesComputerTest/testMultipleClasses/classes/kotlin/current-classpath/0/com/example/BKt.class delete mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/ClasspathChangesComputerTest/testMultipleClasses/classes/kotlin/current-classpath/0/com/example/D.class delete mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/ClasspathChangesComputerTest/testMultipleClasses/classes/kotlin/current-classpath/0/com/example/DKt.class delete mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/ClasspathChangesComputerTest/testMultipleClasses/classes/kotlin/previous-classpath/0/com/example/A.class delete mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/ClasspathChangesComputerTest/testMultipleClasses/classes/kotlin/previous-classpath/0/com/example/AKt.class delete mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/ClasspathChangesComputerTest/testMultipleClasses/classes/kotlin/previous-classpath/0/com/example/B.class delete mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/ClasspathChangesComputerTest/testMultipleClasses/classes/kotlin/previous-classpath/0/com/example/BKt.class delete mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/ClasspathChangesComputerTest/testMultipleClasses/classes/kotlin/previous-classpath/0/com/example/C.class delete mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/ClasspathChangesComputerTest/testMultipleClasses/classes/kotlin/previous-classpath/0/com/example/CKt.class delete mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/ClasspathChangesComputerTest/testMultipleClasses/src/java/current-classpath/0/com/example/A.java delete mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/ClasspathChangesComputerTest/testMultipleClasses/src/java/current-classpath/0/com/example/B.java delete mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/ClasspathChangesComputerTest/testMultipleClasses/src/java/current-classpath/0/com/example/D.java delete mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/ClasspathChangesComputerTest/testMultipleClasses/src/java/previous-classpath/0/com/example/A.java delete mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/ClasspathChangesComputerTest/testMultipleClasses/src/java/previous-classpath/0/com/example/B.java delete mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/ClasspathChangesComputerTest/testMultipleClasses/src/java/previous-classpath/0/com/example/C.java delete mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/ClasspathChangesComputerTest/testMultipleClasses/src/kotlin/current-classpath/0/com/example/A.kt delete mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/ClasspathChangesComputerTest/testMultipleClasses/src/kotlin/current-classpath/0/com/example/B.kt delete mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/ClasspathChangesComputerTest/testMultipleClasses/src/kotlin/current-classpath/0/com/example/D.kt delete mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/ClasspathChangesComputerTest/testMultipleClasses/src/kotlin/previous-classpath/0/com/example/A.kt delete mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/ClasspathChangesComputerTest/testMultipleClasses/src/kotlin/previous-classpath/0/com/example/B.kt delete mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/ClasspathChangesComputerTest/testMultipleClasses/src/kotlin/previous-classpath/0/com/example/C.kt delete mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/kotlin.incremental.useClasspathSnapshot/classes/changedMethodImplementation/com/example/SimpleKotlinClass.class delete mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/kotlin.incremental.useClasspathSnapshot/classes/changedPublicMethodSignature/com/example/SimpleKotlinClass.class delete mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/kotlin.incremental.useClasspathSnapshot/classes/original/com/example/SimpleKotlinClass.class delete mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/kotlin.incremental.useClasspathSnapshot/src/original/com/example/SimpleJavaClass-expected-snapshot.json delete mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/kotlin.incremental.useClasspathSnapshot/src/original/com/example/SimpleKotlinClass-expected-snapshot.json delete mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/kotlin.incremental.useClasspathSnapshot/src/original/com/example/SimpleKotlinClass.kt create mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinAndJava/classes/current-classpath/0/com/example/ChangedKotlinSuperClass.class create mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinAndJava/classes/current-classpath/0/com/example/KotlinSubClassOfJavaSuperClass.class create mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinAndJava/classes/current-classpath/0/com/example/KotlinSubClassOfKotlinSuperClass.class create mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinAndJava/classes/current-classpath/0/com/example/UnimpactedKotlinClass.class create mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinAndJava/classes/previous-classpath/0/com/example/ChangedKotlinSuperClass.class create mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinAndJava/classes/previous-classpath/0/com/example/KotlinSubClassOfJavaSuperClass.class create mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinAndJava/classes/previous-classpath/0/com/example/KotlinSubClassOfKotlinSuperClass.class create mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinAndJava/classes/previous-classpath/0/com/example/UnimpactedKotlinClass.class create mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinAndJava/src/current-classpath/0/com/example/ChangedJavaSuperClass.java create mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinAndJava/src/current-classpath/0/com/example/ChangedKotlinSuperClass.kt create mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinAndJava/src/current-classpath/0/com/example/JavaSubClassOfJavaSuperClass.java create mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinAndJava/src/current-classpath/0/com/example/JavaSubClassOfKotlinSuperClass.java create mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinAndJava/src/current-classpath/0/com/example/KotlinSubClassOfJavaSuperClass.kt create mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinAndJava/src/current-classpath/0/com/example/KotlinSubClassOfKotlinSuperClass.kt create mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinAndJava/src/current-classpath/0/com/example/UnimpactedJavaClass.java create mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinAndJava/src/current-classpath/0/com/example/UnimpactedKotlinClass.kt create mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinAndJava/src/previous-classpath/0/com/example/ChangedJavaSuperClass.java create mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinAndJava/src/previous-classpath/0/com/example/ChangedKotlinSuperClass.kt create mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinAndJava/src/previous-classpath/0/com/example/JavaSubClassOfJavaSuperClass.java create mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinAndJava/src/previous-classpath/0/com/example/JavaSubClassOfKotlinSuperClass.java create mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinAndJava/src/previous-classpath/0/com/example/KotlinSubClassOfJavaSuperClass.kt create mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinAndJava/src/previous-classpath/0/com/example/KotlinSubClassOfKotlinSuperClass.kt create mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinAndJava/src/previous-classpath/0/com/example/UnimpactedJavaClass.java create mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinAndJava/src/previous-classpath/0/com/example/UnimpactedKotlinClass.kt create mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinOrJava/classes/kotlin/current-classpath/0/com/example/ChangedSuperClass.class create mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinOrJava/classes/kotlin/current-classpath/0/com/example/SubClass.class create mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinOrJava/classes/kotlin/current-classpath/0/com/example/SubSubClass.class create mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinOrJava/classes/kotlin/current-classpath/0/com/example/UnimpactedClass.class create mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinOrJava/classes/kotlin/previous-classpath/0/com/example/ChangedSuperClass.class create mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinOrJava/classes/kotlin/previous-classpath/0/com/example/SubClass.class create mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinOrJava/classes/kotlin/previous-classpath/0/com/example/SubSubClass.class create mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinOrJava/classes/kotlin/previous-classpath/0/com/example/UnimpactedClass.class create mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinOrJava/src/java/current-classpath/0/com/example/ChangedSuperClass.java create mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinOrJava/src/java/current-classpath/0/com/example/SubClass.java create mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinOrJava/src/java/current-classpath/0/com/example/SubSubClass.java create mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinOrJava/src/java/current-classpath/0/com/example/UnimpactedClass.java create mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinOrJava/src/java/previous-classpath/0/com/example/ChangedSuperClass.java create mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinOrJava/src/java/previous-classpath/0/com/example/SubClass.java create mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinOrJava/src/java/previous-classpath/0/com/example/SubSubClass.java create mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinOrJava/src/java/previous-classpath/0/com/example/UnimpactedClass.java create mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinOrJava/src/kotlin/current-classpath/0/com/example/ChangedSuperClass.kt create mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinOrJava/src/kotlin/current-classpath/0/com/example/SubClass.kt create mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinOrJava/src/kotlin/current-classpath/0/com/example/SubSubClass.kt create mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinOrJava/src/kotlin/current-classpath/0/com/example/UnimpactedClass.kt create mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinOrJava/src/kotlin/previous-classpath/0/com/example/ChangedSuperClass.kt create mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinOrJava/src/kotlin/previous-classpath/0/com/example/SubClass.kt create mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinOrJava/src/kotlin/previous-classpath/0/com/example/SubSubClass.kt create mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinOrJava/src/kotlin/previous-classpath/0/com/example/UnimpactedClass.kt create mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testVariousAbiChanges/classes/kotlin/current-classpath/0/com/example/AddedClass.class create mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testVariousAbiChanges/classes/kotlin/current-classpath/0/com/example/ModifiedClassChangedMembers.class create mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testVariousAbiChanges/classes/kotlin/current-classpath/0/com/example/ModifiedClassUnchangedMembers.class create mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testVariousAbiChanges/classes/kotlin/current-classpath/0/com/example/TopLevelDeclarations2Kt.class create mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testVariousAbiChanges/classes/kotlin/current-classpath/0/com/example/TopLevelDeclarationsKt.class create mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testVariousAbiChanges/classes/kotlin/current-classpath/0/com/example/UnchangedClass.class create mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testVariousAbiChanges/classes/kotlin/previous-classpath/0/com/example/ModifiedClassChangedMembers.class create mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testVariousAbiChanges/classes/kotlin/previous-classpath/0/com/example/ModifiedClassUnchangedMembers.class create mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testVariousAbiChanges/classes/kotlin/previous-classpath/0/com/example/RemovedClass.class create mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testVariousAbiChanges/classes/kotlin/previous-classpath/0/com/example/TopLevelDeclarations2Kt.class create mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testVariousAbiChanges/classes/kotlin/previous-classpath/0/com/example/TopLevelDeclarationsKt.class create mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testVariousAbiChanges/classes/kotlin/previous-classpath/0/com/example/UnchangedClass.class create mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testVariousAbiChanges/src/java/current-classpath/0/com/example/AddedClass.java create mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testVariousAbiChanges/src/java/current-classpath/0/com/example/ModifiedClassChangedMembers.java create mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testVariousAbiChanges/src/java/current-classpath/0/com/example/ModifiedClassUnchangedMembers.java create mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testVariousAbiChanges/src/java/current-classpath/0/com/example/UnchangedClass.java create mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testVariousAbiChanges/src/java/previous-classpath/0/com/example/ModifiedClassChangedMembers.java create mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testVariousAbiChanges/src/java/previous-classpath/0/com/example/ModifiedClassUnchangedMembers.java create mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testVariousAbiChanges/src/java/previous-classpath/0/com/example/RemovedClass.java create mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testVariousAbiChanges/src/java/previous-classpath/0/com/example/UnchangedClass.java create mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testVariousAbiChanges/src/kotlin/current-classpath/0/com/example/AddedClass.kt create mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testVariousAbiChanges/src/kotlin/current-classpath/0/com/example/ModifiedClassChangedMembers.kt create mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testVariousAbiChanges/src/kotlin/current-classpath/0/com/example/ModifiedClassUnchangedMembers.kt create mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testVariousAbiChanges/src/kotlin/current-classpath/0/com/example/UnchangedClass.kt create mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testVariousAbiChanges/src/kotlin/current-classpath/0/com/example/topLevelDeclarations.kt create mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testVariousAbiChanges/src/kotlin/current-classpath/0/com/example/topLevelDeclarations2.kt create mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testVariousAbiChanges/src/kotlin/previous-classpath/0/com/example/ModifiedClassChangedMembers.kt create mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testVariousAbiChanges/src/kotlin/previous-classpath/0/com/example/ModifiedClassUnchangedMembers.kt create mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testVariousAbiChanges/src/kotlin/previous-classpath/0/com/example/RemovedClass.kt create mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testVariousAbiChanges/src/kotlin/previous-classpath/0/com/example/UnchangedClass.kt create mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testVariousAbiChanges/src/kotlin/previous-classpath/0/com/example/topLevelDeclarations.kt create mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testVariousAbiChanges/src/kotlin/previous-classpath/0/com/example/topLevelDeclarations2.kt create mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathSnapshotTestCommon/classes/kotlin/changedMethodImplementation/com/example/SimpleKotlinClass.class create mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathSnapshotTestCommon/classes/kotlin/changedPublicMethodSignature/com/example/SimpleKotlinClass.class create mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathSnapshotTestCommon/classes/kotlin/original/com/example/SimpleKotlinClass.class create mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathSnapshotTestCommon/expected-snapshot/java/com/example/JavaClassWithNestedClasses$InnerClass.json create mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathSnapshotTestCommon/expected-snapshot/java/com/example/SimpleJavaClass-protoBased=false.json rename libraries/tools/kotlin-gradle-plugin/src/testData/{kotlin.incremental.useClasspathSnapshot/src/original/com/example/JavaClassWithNestedClasses$InnerClass-expected-snapshot.json => org/jetbrains/kotlin/gradle/incremental/ClasspathSnapshotTestCommon/expected-snapshot/java/com/example/SimpleJavaClass-protoBased=true.json} (73%) create mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathSnapshotTestCommon/expected-snapshot/kotlin/com/example/SimpleKotlinClass.json rename libraries/tools/kotlin-gradle-plugin/src/testData/{kotlin.incremental.useClasspathSnapshot/src/original => org/jetbrains/kotlin/gradle/incremental/ClasspathSnapshotTestCommon/src/java}/com/example/JavaClassWithNestedClasses.java (92%) rename libraries/tools/kotlin-gradle-plugin/src/testData/{kotlin.incremental.useClasspathSnapshot/src/original => org/jetbrains/kotlin/gradle/incremental/ClasspathSnapshotTestCommon/src/java}/com/example/SimpleJavaClass.java (78%) create mode 100644 libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathSnapshotTestCommon/src/kotlin/com/example/SimpleKotlinClass.kt diff --git a/.idea/dictionaries/hungnv.xml b/.idea/dictionaries/hungnv.xml new file mode 100644 index 00000000000..dd849670d74 --- /dev/null +++ b/.idea/dictionaries/hungnv.xml @@ -0,0 +1,8 @@ + + + + snapshotter + snapshotter's + + + \ No newline at end of file diff --git a/build-common/src/org/jetbrains/kotlin/incremental/ClasspathChanges.kt b/build-common/src/org/jetbrains/kotlin/incremental/ClasspathChanges.kt index 04f3105f790..bac6c23fb43 100644 --- a/build-common/src/org/jetbrains/kotlin/incremental/ClasspathChanges.kt +++ b/build-common/src/org/jetbrains/kotlin/incremental/ClasspathChanges.kt @@ -7,7 +7,7 @@ package org.jetbrains.kotlin.incremental import com.intellij.util.io.DataExternalizer import org.jetbrains.kotlin.incremental.storage.FqNameExternalizer -import org.jetbrains.kotlin.incremental.storage.LinkedHashSetExternalizer +import org.jetbrains.kotlin.incremental.storage.SetExternalizer import org.jetbrains.kotlin.incremental.storage.LookupSymbolExternalizer import org.jetbrains.kotlin.name.FqName import java.io.* @@ -24,13 +24,13 @@ sealed class ClasspathChanges : Serializable { private const val serialVersionUID = 0L } - lateinit var lookupSymbols: LinkedHashSet + lateinit var lookupSymbols: Set // Preferably ordered but not required private set - lateinit var fqNames: LinkedHashSet + lateinit var fqNames: Set // Preferably ordered but not required private set - constructor(lookupSymbols: LinkedHashSet, fqNames: LinkedHashSet) : this() { + constructor(lookupSymbols: Set, fqNames: Set) : this() { this.lookupSymbols = lookupSymbols this.fqNames = fqNames } @@ -61,14 +61,14 @@ sealed class ClasspathChanges : Serializable { private object ClasspathChangesAvailableExternalizer : DataExternalizer { override fun save(output: DataOutput, classpathChanges: ClasspathChanges.Available) { - LinkedHashSetExternalizer(LookupSymbolExternalizer).save(output, classpathChanges.lookupSymbols) - LinkedHashSetExternalizer(FqNameExternalizer).save(output, classpathChanges.fqNames) + SetExternalizer(LookupSymbolExternalizer).save(output, classpathChanges.lookupSymbols) + SetExternalizer(FqNameExternalizer).save(output, classpathChanges.fqNames) } override fun read(input: DataInput): ClasspathChanges.Available { return ClasspathChanges.Available( - lookupSymbols = LinkedHashSetExternalizer(LookupSymbolExternalizer).read(input), - fqNames = LinkedHashSetExternalizer(FqNameExternalizer).read(input) + lookupSymbols = SetExternalizer(LookupSymbolExternalizer).read(input), + fqNames = SetExternalizer(FqNameExternalizer).read(input) ) } } diff --git a/build-common/src/org/jetbrains/kotlin/incremental/storage/externalizers.kt b/build-common/src/org/jetbrains/kotlin/incremental/storage/externalizers.kt index 097a936ef5f..4c4c637d7a6 100644 --- a/build-common/src/org/jetbrains/kotlin/incremental/storage/externalizers.kt +++ b/build-common/src/org/jetbrains/kotlin/incremental/storage/externalizers.kt @@ -27,10 +27,10 @@ import org.jetbrains.kotlin.cli.common.toBooleanLenient import org.jetbrains.kotlin.incremental.LookupSymbol import org.jetbrains.kotlin.name.ClassId import org.jetbrains.kotlin.name.FqName +import org.jetbrains.kotlin.resolve.jvm.JvmClassName import java.io.DataInput import java.io.DataInputStream import java.io.DataOutput -import java.util.* /** * Storage versioning: @@ -114,6 +114,17 @@ object ClassIdExternalizer : DataExternalizer { } } +object JvmClassNameExternalizer : DataExternalizer { + + override fun save(output: DataOutput, jvmClassName: JvmClassName) { + output.writeString(jvmClassName.internalName) + } + + override fun read(input: DataInput): JvmClassName { + return JvmClassName.byInternalName(input.readString()) + } +} + object ProtoMapValueExternalizer : DataExternalizer { override fun save(output: DataOutput, value: ProtoMapValue) { output.writeBoolean(value.isPackageFacade) @@ -349,8 +360,8 @@ open class GenericCollectionExternalizer>( class ListExternalizer(elementExternalizer: DataExternalizer) : GenericCollectionExternalizer>(elementExternalizer, { size -> ArrayList(size) }) -class LinkedHashSetExternalizer(elementExternalizer: DataExternalizer) : - GenericCollectionExternalizer>(elementExternalizer, { size -> LinkedHashSet(size) }) +class SetExternalizer(elementExternalizer: DataExternalizer) : + GenericCollectionExternalizer>(elementExternalizer, { size -> LinkedHashSet(size) }) class LinkedHashMapExternalizer( private val keyExternalizer: DataExternalizer, diff --git a/build-common/test/org/jetbrains/kotlin/incremental/JavaClassNameTest.kt b/build-common/test/org/jetbrains/kotlin/incremental/JavaClassNameTest.kt index 2f90d1213cc..eaaf1d7bd54 100644 --- a/build-common/test/org/jetbrains/kotlin/incremental/JavaClassNameTest.kt +++ b/build-common/test/org/jetbrains/kotlin/incremental/JavaClassNameTest.kt @@ -7,13 +7,12 @@ package org.jetbrains.kotlin.incremental import org.jetbrains.kotlin.name.ClassId import org.jetbrains.kotlin.name.FqName +import org.jetbrains.kotlin.test.KotlinTestUtils import org.junit.Rule import org.junit.Test import org.junit.rules.TemporaryFolder import java.io.File -import javax.tools.ToolProvider import kotlin.test.assertEquals -import kotlin.test.assertTrue class JavaClassNameTest { @@ -73,15 +72,7 @@ class JavaClassNameTest { } val classesDir = tmpDir.newFolder() - val compiler = ToolProvider.getSystemJavaCompiler() - compiler.getStandardFileManager(null, null, null).use { fileManager -> - val compilationTask = compiler.getTask( - null, fileManager, null, - listOf("-d", classesDir.path), null, - fileManager.getJavaFileObjectsFromFiles(listOf(sourceFile)) - ) - assertTrue(compilationTask.call(), "Failed to compile '$className'") - } + KotlinTestUtils.compileJavaFiles(listOf(sourceFile), listOf("-d", classesDir.path)) return classesDir.walk().filter { it.isFile } .sortedBy { it.path.substringBefore(".class") } diff --git a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/IncrementalJavaChangeIT.kt b/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/IncrementalJavaChangeIT.kt index f044a62eb6a..33fe765c9cd 100644 --- a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/IncrementalJavaChangeIT.kt +++ b/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/IncrementalJavaChangeIT.kt @@ -55,6 +55,18 @@ class IncrementalJavaChangeClasspathSnapshotIT : IncrementalJavaChangeDefaultIT( } ) } + + @Test + fun testAddingInnerClass() { + doTest( + "A.kt", + { content: String -> content.substringBeforeLast("}") + " class InnerClass }" }, + assertResults = { + assertTasksExecuted(":lib:compileKotlin", ":app:compileKotlin") + assertCompiledKotlinFiles(project.projectDir.getFilesByNames("AAA.kt", "AA.kt", "BB.kt", "A.kt", "B.kt")) + } + ) + } } class IncrementalJavaChangePreciseIT : IncrementalCompilationJavaChangesBase(usePreciseJavaTracking = true) { diff --git a/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/incremental/ChangeSet.kt b/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/incremental/ChangeSet.kt new file mode 100644 index 00000000000..88e91b2f999 --- /dev/null +++ b/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/incremental/ChangeSet.kt @@ -0,0 +1,103 @@ +/* + * Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. + */ + +package org.jetbrains.kotlin.gradle.incremental + +import org.jetbrains.kotlin.incremental.ClasspathChanges +import org.jetbrains.kotlin.incremental.LookupSymbol +import org.jetbrains.kotlin.name.ClassId +import org.jetbrains.kotlin.name.FqName + +/** Intermediate data to compute [ClasspathChanges] (see [toClasspathChanges]). */ +class ChangeSet( + + /** Set of changed classes, preferably ordered by not required. */ + val changedClasses: Set, + + /** + * Map from a [ClassId] to the names of changed Java fields/methods or Kotlin properties/functions within that class. + * + * The map and sets are preferably ordered but not required. + * + * The [ClassId]s must not appear in [changedClasses] to avoid redundancy. + */ + val changedClassMembers: Map>, + + /** Map from a package name to the names of changed Kotlin top-level properties/functions within that package. */ + val changedTopLevelMembers: Map> +) { + init { + check(changedClassMembers.keys.none { it in changedClasses }) + } + + class Collector { + private val changedClasses = mutableSetOf() + private val changedClassMembers = mutableMapOf>() + private val changedTopLevelMembers = mutableMapOf>() + + fun addChangedClasses(classNames: Collection) = changedClasses.addAll(classNames) + + fun addChangedClass(className: ClassId) = changedClasses.add(className) + + fun addChangedClassMembers(className: ClassId, memberNames: Collection) { + if (memberNames.isNotEmpty()) { + changedClassMembers.computeIfAbsent(className) { mutableSetOf() }.addAll(memberNames) + } + } + + fun addChangedClassMember(className: ClassId, memberName: String) = addChangedClassMembers(className, listOf(memberName)) + + fun addChangedTopLevelMembers(packageName: FqName, topLevelMembers: Collection) { + if (topLevelMembers.isNotEmpty()) { + changedTopLevelMembers.computeIfAbsent(packageName) { mutableSetOf() }.addAll(topLevelMembers) + } + } + + fun addChangedTopLevelMember(packageName: FqName, topLevelMember: String) = + addChangedTopLevelMembers(packageName, listOf(topLevelMember)) + + fun getChanges(): ChangeSet { + // Remove redundancy in the change set first + changedClassMembers.keys.intersect(changedClasses).forEach { changedClassMembers.remove(it) } + return ChangeSet(changedClasses.toSet(), changedClassMembers.toMap(), changedTopLevelMembers.toMap()) + } + } + + fun isEmpty() = changedClasses.isEmpty() && changedClassMembers.isEmpty() && changedTopLevelMembers.isEmpty() + + operator fun plus(other: ChangeSet) = ChangeSet( + changedClasses + other.changedClasses, + changedClassMembers + other.changedClassMembers, + changedTopLevelMembers + other.changedTopLevelMembers + ) + + fun toClasspathChanges(): ClasspathChanges.Available { + val lookupSymbols = mutableSetOf() + val fqNames = mutableSetOf() + + changedClasses.forEach { + val classFqName = it.asSingleFqName() + lookupSymbols.add(LookupSymbol(name = classFqName.shortName().asString(), scope = classFqName.parent().asString())) + fqNames.add(classFqName) + } + + for ((changedClass, changedClassMembers) in changedClassMembers) { + val classFqName = changedClass.asSingleFqName() + changedClassMembers.forEach { + lookupSymbols.add(LookupSymbol(name = it, scope = classFqName.asString())) + } + fqNames.add(classFqName) + } + + for ((changedPackage, changedTopLevelMembers) in changedTopLevelMembers) { + changedTopLevelMembers.forEach { + lookupSymbols.add(LookupSymbol(name = it, scope = changedPackage.asString())) + } + fqNames.add(changedPackage) + } + + return ClasspathChanges.Available(lookupSymbols, fqNames) + } +} diff --git a/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputer.kt b/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputer.kt index 043db0021f4..1ef823323d9 100644 --- a/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputer.kt +++ b/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputer.kt @@ -6,12 +6,17 @@ package org.jetbrains.kotlin.gradle.incremental import com.intellij.openapi.util.io.FileUtil +import org.jetbrains.kotlin.gradle.incremental.ImpactAnalysis.computeImpactedSet import org.jetbrains.kotlin.incremental.* import org.jetbrains.kotlin.incremental.storage.FileToCanonicalPathConverter +import org.jetbrains.kotlin.metadata.deserialization.TypeTable +import org.jetbrains.kotlin.metadata.deserialization.supertypes +import org.jetbrains.kotlin.name.ClassId +import org.jetbrains.kotlin.name.FqName import org.jetbrains.kotlin.resolve.jvm.JvmClassName +import org.jetbrains.kotlin.serialization.deserialization.getClassId import java.io.File import java.util.* -import kotlin.collections.LinkedHashMap /** Computes [ClasspathChanges] between two [ClasspathSnapshot]s .*/ object ClasspathChangesComputer { @@ -101,9 +106,7 @@ object ClasspathChangesComputer { /** Returns `true` if this snapshot file contains a duplicate class with another snapshot file in the given list. */ @Suppress("unused", "UNUSED_PARAMETER") private fun File.containsDuplicatesWith(otherSnapshotFiles: List): Boolean { - // TODO: Implement and optimize this method - // Existing approach (with `kotlin.incremental.useClasspathSnapshot=false`) doesn't seem to handle duplicate classes, so it is - // probably not a regression that we are not handling duplicate classes here yet. + // FIXME: Implement and optimize this method return false } @@ -111,7 +114,22 @@ object ClasspathChangesComputer { val currentClassSnapshots = currentClasspathSnapshot.getNonDuplicateClassSnapshots() val previousClassSnapshots = previousClasspathSnapshot.getNonDuplicateClassSnapshots() - return compute(currentClassSnapshots, previousClassSnapshots) + return computeClassChanges(currentClassSnapshots, previousClassSnapshots) + } + + /** + * Returns all [ClassSnapshot]s in this [ClasspathSnapshot]. + * + * If there are duplicate classes on the classpath, retain only the first one to match the compiler's behavior. + */ + private fun ClasspathSnapshot.getNonDuplicateClassSnapshots(): List { + val classSnapshots = LinkedHashMap(classpathEntrySnapshots.sumOf { it.classSnapshots.size }) + for (classpathEntrySnapshot in classpathEntrySnapshots) { + for ((unixStyleRelativePath, classSnapshot) in classpathEntrySnapshot.classSnapshots) { + classSnapshots.putIfAbsent(unixStyleRelativePath, classSnapshot) + } + } + return classSnapshots.values.toList() } /** @@ -119,12 +137,43 @@ object ClasspathChangesComputer { * * Each list must not contain duplicate classes. */ - fun compute(currentClassSnapshots: List, previousClassSnapshots: List): ClasspathChanges { + fun computeClassChanges(currentClassSnapshots: List, previousClassSnapshots: List): ClasspathChanges { if (currentClassSnapshots.any { it is ContentHashJavaClassSnapshot } || previousClassSnapshots.any { it is ContentHashJavaClassSnapshot }) { return ClasspathChanges.NotAvailable.UnableToCompute } + // Ignore `EmptyJavaClassSnapshot`s as they don't impact the result + val currentNonEmptyClassSnapshots = currentClassSnapshots.filter { it !is EmptyJavaClassSnapshot } + val previousNonEmptyClassSnapshots = previousClassSnapshots.filter { it !is EmptyJavaClassSnapshot } + + val (currentAsmBasedSnapshots, currentProtoBasedSnapshots) = + currentNonEmptyClassSnapshots.partition { it is RegularJavaClassSnapshot } + val (previousAsmBasedSnapshots, previousProtoBasedSnapshots) = + previousNonEmptyClassSnapshots.partition { it is RegularJavaClassSnapshot } + + val changeSet1 = computeChangesForProtoBasedSnapshots(currentProtoBasedSnapshots, previousProtoBasedSnapshots) + + @Suppress("UNCHECKED_CAST") + val changeSet2 = JavaClassChangesComputer.compute( + currentAsmBasedSnapshots as List, + previousAsmBasedSnapshots as List + ) + + val allChanges = changeSet1 + changeSet2 + if (allChanges.isEmpty()) { + return allChanges.toClasspathChanges() + } + + val impactedSet = computeImpactedSet(allChanges, previousNonEmptyClassSnapshots) + + return impactedSet.toClasspathChanges() + } + + private fun computeChangesForProtoBasedSnapshots( + currentClassSnapshots: List, + previousClassSnapshots: List + ): ChangeSet { val workingDir = FileUtil.createTempDirectory(this::class.java.simpleName, "_WorkingDir_${UUID.randomUUID()}", /* deleteOnExit */ true) val incrementalJvmCache = IncrementalJvmCache(workingDir, /* targetOutputDir */ null, FileToCanonicalPathConverter) @@ -146,7 +195,7 @@ object ClasspathChangesComputer { ) incrementalJvmCache.markDirty(previousSnapshot.classInfo.className) } - is RegularJavaClassSnapshot -> { + is ProtoBasedJavaClassSnapshot -> { incrementalJvmCache.saveJavaClassProto( source = null, serializedJavaClass = previousSnapshot.serializedJavaClass, @@ -154,10 +203,7 @@ object ClasspathChangesComputer { ) incrementalJvmCache.markDirty(JvmClassName.byClassId(previousSnapshot.serializedJavaClass.classId)) } - is EmptyJavaClassSnapshot -> { - // Nothing to process as these classes don't impact the result. - } - is ContentHashJavaClassSnapshot -> { + is RegularJavaClassSnapshot, is ContentHashJavaClassSnapshot, is EmptyJavaClassSnapshot -> { error("Unexpected type (it should have been handled earlier): ${previousSnapshot.javaClass.name}") } } @@ -180,17 +226,14 @@ object ClasspathChangesComputer { changesCollector = changesCollector ) } - is RegularJavaClassSnapshot -> { + is ProtoBasedJavaClassSnapshot -> { incrementalJvmCache.saveJavaClassProto( source = null, serializedJavaClass = currentSnapshot.serializedJavaClass, collector = changesCollector ) } - is EmptyJavaClassSnapshot -> { - // Nothing to process as these classes don't impact the result. - } - is ContentHashJavaClassSnapshot -> { + is RegularJavaClassSnapshot, is ContentHashJavaClassSnapshot, is EmptyJavaClassSnapshot -> { error("Unexpected type (it should have been handled earlier): ${currentSnapshot.javaClass.name}") } } @@ -207,24 +250,147 @@ object ClasspathChangesComputer { val dirtyData = changesCollector.getDirtyData(listOf(incrementalJvmCache), EmptyICReporter) workingDir.deleteRecursively() - return ClasspathChanges.Available( - lookupSymbols = LinkedHashSet(dirtyData.dirtyLookupSymbols), - fqNames = LinkedHashSet(dirtyData.dirtyClassesFqNames) - ) + return dirtyData.normalize(currentClassSnapshots, previousClassSnapshots) + } + + private fun DirtyData.normalize(currentClassSnapshots: List, previousClassSnapshots: List): ChangeSet { + val allClassIds = currentClassSnapshots.map { it.getClassId() }.toSet() + previousClassSnapshots.map { it.getClassId() } + val fqNameToClassId = LinkedHashMap(allClassIds.size) + allClassIds.forEach { classId -> + val fqName = classId.asSingleFqName() + check(!fqNameToClassId.contains(fqName)) { + "Ambiguous FqName $fqName corresponds to two different `ClassId`s: ${fqNameToClassId[fqName]} and $classId" + } + fqNameToClassId[fqName] = classId + } + + return ChangeSet.Collector().run { + dirtyLookupSymbols.forEach { + fqNameToClassId[FqName(it.scope)]?.let { classIdOfScope -> + // If scope is a class, lookup symbol is a class member and maybe inner class + fqNameToClassId[FqName("${it.scope}.${it.name}")]?.let { innerClass -> + addChangedClass(innerClass) + } ?: addChangedClassMember(classIdOfScope, it.name) + return@forEach + } + + // scope is a package, so changed symbol is a top-level member and maybe a class + val potentialClassFqName = if (it.scope.isEmpty()) FqName(it.name) else FqName("${it.scope}.${it.name}") + fqNameToClassId[potentialClassFqName]?.let { classId -> + // Lookup symbol is a class + addChangedClass(classId) + } ?: addChangedTopLevelMember(FqName(it.scope), it.name) + } + val changes = getChanges() + + // dirtyClassesFqNames should be derived from dirtyLookupSymbols. Double-check that this is the case. + val changedFqNames: Set = + changes.changedClasses.map { it.asSingleFqName() }.toSet() + + changes.changedClassMembers.keys.map { it.asSingleFqName() } + + changes.changedTopLevelMembers.keys + check(dirtyClassesFqNames.toSet() == changedFqNames) { + "Two sets differ:\n" + + "dirtyClassesFqNames: $dirtyClassesFqNames\n" + + "changedFqNames: $changedFqNames" + } + changes + } + } +} + +private fun ClassSnapshot.getClassId(): ClassId { + return when (this) { + is KotlinClassSnapshot -> classInfo.classId + is RegularJavaClassSnapshot -> classId + is ProtoBasedJavaClassSnapshot -> serializedJavaClass.classId + is EmptyJavaClassSnapshot, is ContentHashJavaClassSnapshot -> { + error("Unexpected type (it should have been handled earlier): ${javaClass.name}") + } + } +} + +private object ImpactAnalysis { + + /** + * Computes the set of classes/class members that are impacted by the given changes. + * + * For example, if a superclass has changed, any of its subclasses will be impacted even if it has not changed, and unchanged source + * files in the previous compilation that depended on the subclasses will need to be recompiled. + * + * The returned set is also a [ChangeSet], which includes the given changes plus the impacted ones. + */ + fun computeImpactedSet(changes: ChangeSet, previousClassSnapshots: List): ChangeSet { + val classIdToSubclasses = getClassIdToSubclassesMap(previousClassSnapshots) + + return ChangeSet.Collector().run { + addChangedClasses(findSubclassesInclusive(changes.changedClasses, classIdToSubclasses)) + for ((changedClass, changedClassMembers) in changes.changedClassMembers) { + findSubclassesInclusive(setOf(changedClass), classIdToSubclasses).forEach { + addChangedClassMembers(it, changedClassMembers) + } + } + for ((changedPackage, changedClassMembers) in changes.changedTopLevelMembers) { + addChangedTopLevelMembers(changedPackage, changedClassMembers) + } + getChanges() + } + } + + private fun getClassIdToSubclassesMap(classSnapshots: List): Map> { + val classIds = classSnapshots.map { it.getClassId() } + val classNameToClassId = classIds.associateBy { JvmClassName.byClassId(it) } + val classNameToClassIdResolver = { className: JvmClassName -> classNameToClassId[className] } + + val classIdToSubclasses = mutableMapOf>() + classSnapshots.forEach { classSnapshot -> + val classId = classSnapshot.getClassId() + classSnapshot.getSupertypes(classNameToClassIdResolver).forEach { supertype -> + // No need to collect supertypes outside the considered class snapshots (e.g., "java/lang/Object") + if (supertype in classIds) { + classIdToSubclasses.computeIfAbsent(supertype) { mutableSetOf() }.add(classId) + } + } + } + return classIdToSubclasses + } + + private fun ClassSnapshot.getSupertypes(classIdResolver: (JvmClassName) -> ClassId?): List { + return when (this) { + is RegularJavaClassSnapshot -> supertypes.mapNotNull { + // The following call returns null if supertype is outside the considered class snapshots (e.g., "java/lang/Object"). + // Use `mapNotNull` as we don't need to collect those supertypes (see getClassIdToSubclassesMap). + classIdResolver.invoke(it) + } + is KotlinClassSnapshot -> supertypes.mapNotNull { + // Same as above + classIdResolver.invoke(it) + } + is ProtoBasedJavaClassSnapshot -> { + val (proto, nameResolver) = serializedJavaClass.toProtoData() + proto.supertypes(TypeTable(proto.typeTable)).map { nameResolver.getClassId(it.className) } + } + is EmptyJavaClassSnapshot, is ContentHashJavaClassSnapshot -> { + error("Unexpected type (it should have been handled earlier): ${javaClass.name}") + } + } } /** - * Returns all [ClassSnapshot]s in this [ClasspathSnapshot]. - * - * If there are duplicate classes on the classpath, retain only the first one to match the compiler's behavior. + * Finds direct and indirect subclasses of the given classes. The return set includes both the given classes and their direct and + * indirect subclasses. */ - private fun ClasspathSnapshot.getNonDuplicateClassSnapshots(): List { - val classSnapshots = LinkedHashMap(classpathEntrySnapshots.sumOf { it.classSnapshots.size }) - for (classpathEntrySnapshot in classpathEntrySnapshots) { - for ((unixStyleRelativePath, classSnapshot) in classpathEntrySnapshot.classSnapshots) { - classSnapshots.putIfAbsent(unixStyleRelativePath, classSnapshot) + private fun findSubclassesInclusive(classIds: Set, classIdsToSubclasses: Map>): Set { + val visitedClasses = mutableSetOf() + val toVisitClasses = classIds.toMutableSet() + while (toVisitClasses.isNotEmpty()) { + val nextToVisit = mutableSetOf() + toVisitClasses.forEach { + nextToVisit.addAll(classIdsToSubclasses[it] ?: emptyList()) } + visitedClasses.addAll(toVisitClasses) + toVisitClasses.clear() + toVisitClasses.addAll(nextToVisit - visitedClasses) } - return classSnapshots.values.toList() + return visitedClasses } } diff --git a/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/incremental/ClasspathSnapshot.kt b/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/incremental/ClasspathSnapshot.kt index 6a59732842e..5dbf3d3067b 100644 --- a/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/incremental/ClasspathSnapshot.kt +++ b/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/incremental/ClasspathSnapshot.kt @@ -7,6 +7,8 @@ package org.jetbrains.kotlin.gradle.incremental import org.jetbrains.kotlin.incremental.KotlinClassInfo import org.jetbrains.kotlin.incremental.SerializedJavaClass +import org.jetbrains.kotlin.name.ClassId +import org.jetbrains.kotlin.resolve.jvm.JvmClassName /** Snapshot of a classpath. It consists of a list of [ClasspathEntrySnapshot]s. */ class ClasspathSnapshot(val classpathEntrySnapshots: List) @@ -37,13 +39,63 @@ class ClasspathEntrySnapshot( sealed class ClassSnapshot /** [ClassSnapshot] of a Kotlin class. */ -class KotlinClassSnapshot(val classInfo: KotlinClassInfo) : ClassSnapshot() +class KotlinClassSnapshot( + val classInfo: KotlinClassInfo, + val supertypes: List +) : ClassSnapshot() /** [ClassSnapshot] of a Java class. */ sealed class JavaClassSnapshot : ClassSnapshot() /** [JavaClassSnapshot] of a typical Java class. */ -class RegularJavaClassSnapshot(val serializedJavaClass: SerializedJavaClass) : JavaClassSnapshot() +class RegularJavaClassSnapshot( + + /** [ClassId] of the class. It is part of the class's ABI ([classAbiExcludingMembers]). */ + val classId: ClassId, + + /** The superclass and interfaces of the class. It is part of the class's ABI ([classAbiExcludingMembers]). */ + val supertypes: List, + + /** [AbiSnapshot] of the class excluding its fields and methods. */ + val classAbiExcludingMembers: AbiSnapshot, + + /** [AbiSnapshot]s of the class's fields. */ + val fieldsAbi: List, + + /** [AbiSnapshot]s of the class's methods. */ + val methodsAbi: List + +) : JavaClassSnapshot() { + + val className by lazy { + JvmClassName.byClassId(classId).also { + check(it == JvmClassName.byInternalName(classAbiExcludingMembers.name)) + } + } +} + +/** The ABI snapshot of a Java element (e.g., class, field, or method). */ +open class AbiSnapshot( + + /** The name of the Java element. It is part of the Java element's ABI. */ + val name: String, + + /** The hash of the Java element's ABI. */ + val abiHash: Long +) + +/** TEST-ONLY: An [AbiSnapshot] that is used for testing only and must not be used in production code. */ +class AbiSnapshotForTests( + name: String, + abiHash: Long, + + /** The Java element's ABI, captured in a [String]. */ + @Suppress("unused") val abiValue: String + +) : AbiSnapshot(name, abiHash) + +/** [JavaClassSnapshot] of a typical Java class which uses protos internally. */ +class ProtoBasedJavaClassSnapshot(val serializedJavaClass: SerializedJavaClass) : JavaClassSnapshot() /** * [JavaClassSnapshot] of a Java class where there is nothing to capture. @@ -58,4 +110,4 @@ object EmptyJavaClassSnapshot : JavaClassSnapshot() * the snapshot instead, so that at least it's still correct when used as an input of the `KotlinCompile` task (when the class contents have * changed, this snapshot will also change). */ -class ContentHashJavaClassSnapshot(val contentHash: ByteArray) : JavaClassSnapshot() +class ContentHashJavaClassSnapshot(val contentHash: Long) : JavaClassSnapshot() diff --git a/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/incremental/ClasspathSnapshotSerializer.kt b/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/incremental/ClasspathSnapshotSerializer.kt index 71db4de29bf..01e1a3a3d22 100644 --- a/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/incremental/ClasspathSnapshotSerializer.kt +++ b/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/incremental/ClasspathSnapshotSerializer.kt @@ -59,10 +59,14 @@ object KotlinClassSnapshotExternalizer : DataExternalizer { override fun save(output: DataOutput, snapshot: KotlinClassSnapshot) { KotlinClassInfoExternalizer.save(output, snapshot.classInfo) + ListExternalizer(JvmClassNameExternalizer).save(output, snapshot.supertypes) } override fun read(input: DataInput): KotlinClassSnapshot { - return KotlinClassSnapshot(classInfo = KotlinClassInfoExternalizer.read(input)) + return KotlinClassSnapshot( + classInfo = KotlinClassInfoExternalizer.read(input), + supertypes = ListExternalizer(JvmClassNameExternalizer).read(input) + ) } } @@ -97,6 +101,7 @@ object JavaClassSnapshotExternalizer : DataExternalizer { output.writeString(snapshot.javaClass.name) when (snapshot) { is RegularJavaClassSnapshot -> RegularJavaClassSnapshotExternalizer.save(output, snapshot) + is ProtoBasedJavaClassSnapshot -> ProtoBasedJavaClassSnapshotExternalizer.save(output, snapshot) is EmptyJavaClassSnapshot -> EmptyJavaClassSnapshotExternalizer.save(output, snapshot) is ContentHashJavaClassSnapshot -> ContentHashJavaClassSnapshotExternalizer.save(output, snapshot) } @@ -105,6 +110,7 @@ object JavaClassSnapshotExternalizer : DataExternalizer { override fun read(input: DataInput): JavaClassSnapshot { return when (val className = input.readString()) { RegularJavaClassSnapshot::class.java.name -> RegularJavaClassSnapshotExternalizer.read(input) + ProtoBasedJavaClassSnapshot::class.java.name -> ProtoBasedJavaClassSnapshotExternalizer.read(input) EmptyJavaClassSnapshot::class.java.name -> EmptyJavaClassSnapshotExternalizer.read(input) ContentHashJavaClassSnapshot::class.java.name -> ContentHashJavaClassSnapshotExternalizer.read(input) else -> error("Unrecognized class name: $className") @@ -115,11 +121,44 @@ object JavaClassSnapshotExternalizer : DataExternalizer { object RegularJavaClassSnapshotExternalizer : DataExternalizer { override fun save(output: DataOutput, snapshot: RegularJavaClassSnapshot) { - JavaClassProtoMapValueExternalizer.save(output, snapshot.serializedJavaClass) + ClassIdExternalizer.save(output, snapshot.classId) + ListExternalizer(JvmClassNameExternalizer).save(output, snapshot.supertypes) + AbiSnapshotExternalizer.save(output, snapshot.classAbiExcludingMembers) + ListExternalizer(AbiSnapshotExternalizer).save(output, snapshot.fieldsAbi) + ListExternalizer(AbiSnapshotExternalizer).save(output, snapshot.methodsAbi) } override fun read(input: DataInput): RegularJavaClassSnapshot { - return RegularJavaClassSnapshot(serializedJavaClass = JavaClassProtoMapValueExternalizer.read(input)) + return RegularJavaClassSnapshot( + classId = ClassIdExternalizer.read(input), + supertypes = ListExternalizer(JvmClassNameExternalizer).read(input), + classAbiExcludingMembers = AbiSnapshotExternalizer.read(input), + fieldsAbi = ListExternalizer(AbiSnapshotExternalizer).read(input), + methodsAbi = ListExternalizer(AbiSnapshotExternalizer).read(input) + ) + } +} + +object AbiSnapshotExternalizer : DataExternalizer { + + override fun save(output: DataOutput, value: AbiSnapshot) { + output.writeString(value.name) + LongExternalizer.save(output, value.abiHash) + } + + override fun read(input: DataInput): AbiSnapshot { + return AbiSnapshot(name = input.readString(), abiHash = LongExternalizer.read(input)) + } +} + +object ProtoBasedJavaClassSnapshotExternalizer : DataExternalizer { + + override fun save(output: DataOutput, snapshot: ProtoBasedJavaClassSnapshot) { + JavaClassProtoMapValueExternalizer.save(output, snapshot.serializedJavaClass) + } + + override fun read(input: DataInput): ProtoBasedJavaClassSnapshot { + return ProtoBasedJavaClassSnapshot(serializedJavaClass = JavaClassProtoMapValueExternalizer.read(input)) } } @@ -137,11 +176,11 @@ object EmptyJavaClassSnapshotExternalizer : DataExternalizer { override fun save(output: DataOutput, snapshot: ContentHashJavaClassSnapshot) { - ByteArrayExternalizer.save(output, snapshot.contentHash) + LongExternalizer.save(output, snapshot.contentHash) } override fun read(input: DataInput): ContentHashJavaClassSnapshot { - return ContentHashJavaClassSnapshot(contentHash = ByteArrayExternalizer.read(input)) + return ContentHashJavaClassSnapshot(contentHash = LongExternalizer.read(input)) } } diff --git a/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/incremental/ClasspathSnapshotter.kt b/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/incremental/ClasspathSnapshotter.kt index 09b663a96ed..50edf76097d 100644 --- a/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/incremental/ClasspathSnapshotter.kt +++ b/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/incremental/ClasspathSnapshotter.kt @@ -7,14 +7,20 @@ package org.jetbrains.kotlin.gradle.incremental import org.jetbrains.kotlin.incremental.* import org.jetbrains.kotlin.load.java.descriptors.JavaClassDescriptor +import org.jetbrains.kotlin.metadata.deserialization.TypeTable +import org.jetbrains.kotlin.metadata.deserialization.supertypes +import org.jetbrains.kotlin.metadata.jvm.deserialization.JvmProtoBufUtil import org.jetbrains.kotlin.name.ClassId +import org.jetbrains.kotlin.resolve.jvm.JvmClassName +import org.jetbrains.kotlin.serialization.deserialization.getClassId import org.jetbrains.kotlin.utils.DFS +import org.jetbrains.org.objectweb.asm.ClassReader +import org.jetbrains.org.objectweb.asm.ClassVisitor +import org.jetbrains.org.objectweb.asm.Opcodes import java.io.File -import java.security.MessageDigest import java.util.zip.ZipInputStream /** Computes a [ClasspathEntrySnapshot] of a classpath entry (directory or jar). */ -@Suppress("SpellCheckingInspection") object ClasspathEntrySnapshotter { private val DEFAULT_CLASS_FILTER = { unixStyleRelativePath: String, isDirectory: Boolean -> @@ -24,7 +30,7 @@ object ClasspathEntrySnapshotter { && !unixStyleRelativePath.startsWith("meta-inf", ignoreCase = true) } - fun snapshot(classpathEntry: File): ClasspathEntrySnapshot { + fun snapshot(classpathEntry: File, protoBased: Boolean? = null): ClasspathEntrySnapshot { val classes = DirectoryOrJarContentsReader.read(classpathEntry, DEFAULT_CLASS_FILTER) .map { (unixStyleRelativePath, contents) -> @@ -32,7 +38,7 @@ object ClasspathEntrySnapshotter { } val snapshots = try { - ClassSnapshotter.snapshot(classes) + ClassSnapshotter.snapshot(classes, protoBased) } catch (e: Throwable) { if (isKnownProblematicClasspathEntry(classpathEntry)) { classes.map { ContentHashJavaClassSnapshot(it.contents.md5()) } @@ -66,7 +72,6 @@ object ClasspathEntrySnapshotter { } /** Creates [ClassSnapshot]s of classes. */ -@Suppress("SpellCheckingInspection") object ClassSnapshotter { /** @@ -75,7 +80,11 @@ object ClassSnapshotter { * Note that for Java (non-Kotlin) classes, creating a [ClassSnapshot] for a nested class will require accessing the outer class (and * possibly vice versa). Therefore, outer classes and nested classes must be passed together in one invocation of this method. */ - fun snapshot(classes: List): List { + fun snapshot( + classes: List, + protoBased: Boolean? = null, + includeDebugInfoInSnapshot: Boolean? = null + ): List { // Snapshot Kotlin classes first val kotlinClassSnapshots: Map = classes.associateWith { trySnapshotKotlinClass(it) @@ -83,7 +92,7 @@ object ClassSnapshotter { // Snapshot the remaining Java classes in one invocation val javaClasses: List = classes.filter { kotlinClassSnapshots[it] == null } - val snapshots: List = snapshotJavaClasses(javaClasses) + val snapshots: List = snapshotJavaClasses(javaClasses, protoBased, includeDebugInfoInSnapshot) val javaClassSnapshots: Map = javaClasses.zipToMap(snapshots) return classes.map { kotlinClassSnapshots[it] ?: javaClassSnapshots[it]!! } @@ -92,7 +101,33 @@ object ClassSnapshotter { /** Creates [KotlinClassSnapshot] of the given class, or returns `null` if the class is not a Kotlin class. */ private fun trySnapshotKotlinClass(clazz: ClassFileWithContents): KotlinClassSnapshot? { return KotlinClassInfo.tryCreateFrom(clazz.contents)?.let { - KotlinClassSnapshot(it) + KotlinClassSnapshot(it, computeSupertypes(it, clazz.contents)) + } + } + + // TODO: Find a faster way to get supertypes without loading protos (e.g., attach to an existing ASM visitor) + private fun computeSupertypes(classInfo: KotlinClassInfo, classContents: ByteArray): List { + return try { + val (nameResolver, proto) = JvmProtoBufUtil.readClassDataFrom(classInfo.classHeaderData, classInfo.classHeaderStrings) + val supertypeClassIds = proto.supertypes(TypeTable(proto.typeTable)).map { nameResolver.getClassId(it.className) } + supertypeClassIds.map { JvmClassName.byClassId(it) } + } catch (e: Exception) { + // The above method call currently fails on a few classes for some reason: + // - org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException: Message was missing required fields. + // (Lite runtime could not determine which fields were missing) for SomeClassKt.class + // - java.lang.NullPointerException: parseDelimitedFrom(this, EXTENSION_REGISTRY) must not be null for + // kotlin-stdlib-1.6.255-SNAPSHOT.jar + // Fall back to ASM visitor to get the supertypes. + val supertypeClassNames = mutableListOf() + ClassReader(classContents).accept(object : ClassVisitor(Opcodes.API_VERSION) { + override fun visit( + version: Int, access: Int, name: String, signature: String?, superName: String?, interfaces: Array? + ) { + superName?.let { supertypeClassNames.add(it) } + interfaces?.let { supertypeClassNames.addAll(it) } + } + }, ClassReader.SKIP_CODE or ClassReader.SKIP_DEBUG) + supertypeClassNames.map { JvmClassName.byInternalName(it) } } } @@ -102,9 +137,13 @@ object ClassSnapshotter { * Note that creating a [JavaClassSnapshot] for a nested class will require accessing the outer class (and possibly vice versa). * Therefore, outer classes and nested classes must be passed together in one invocation of this method. */ - private fun snapshotJavaClasses(classes: List): List { + private fun snapshotJavaClasses( + classes: List, + protoBased: Boolean? = null, + includeDebugInfoInSnapshot: Boolean? = null + ): List { val classNames: List = classes.map { JavaClassName.compute(it.contents) } - val classNameToClassFile: LinkedHashMap = classNames.zipToMap(classes) + val classNameToClassFile: Map = classNames.zipToMap(classes) // We divide classes into 2 categories: // - Special classes, which includes local, anonymous, or synthetic classes, and their nested classes. These classes can't be @@ -120,17 +159,34 @@ object ClassSnapshotter { } else null } - // Snapshot the remaining regular classes in one invocation + // Snapshot the remaining regular classes val regularClasses: List = classNames.filter { specialClassSnapshots[it] == null } - val regularClassIds: List = computeJavaClassIds(regularClasses) - val regularClassesContents: List = regularClasses.map { classNameToClassFile[it]!!.contents } + val regularClassIds = computeJavaClassIds(regularClasses) + val regularClassFiles: List = regularClasses.map { classNameToClassFile[it]!! } - val descriptors: List = JavaClassDescriptorCreator.create(regularClassIds, regularClassesContents) + val snapshots: List = if (protoBased ?: protoBasedDefaultValue) { + snapshotJavaClassesProtoBased(regularClassIds, regularClassFiles) + } else { + regularClassIds.mapIndexed { index, classId -> + JavaClassSnapshotter.snapshot(classId, regularClassFiles[index].contents, includeDebugInfoInSnapshot) + } + } + val regularClassSnapshots: Map = regularClasses.zipToMap(snapshots) + + return classNames.map { specialClassSnapshots[it] ?: regularClassSnapshots[it]!! } + } + + private fun snapshotJavaClassesProtoBased( + classIds: List, + classFilesWithContents: List + ): List { + val classesContents = classFilesWithContents.map { it.contents } + val descriptors: List = JavaClassDescriptorCreator.create(classIds, classesContents) val snapshots: List = descriptors.mapIndexed { index, descriptor -> - val classFileWithContents = classNameToClassFile[regularClasses[index]]!! + val classFileWithContents = classFilesWithContents[index] if (descriptor != null) { try { - RegularJavaClassSnapshot(descriptor.toSerializedJavaClass()) + ProtoBasedJavaClassSnapshot(descriptor.toSerializedJavaClass()) } catch (e: Throwable) { if (isKnownExceptionWhenReadingDescriptor(e)) { ContentHashJavaClassSnapshot(classFileWithContents.contents.md5()) @@ -147,9 +203,7 @@ object ClassSnapshotter { } } } - val regularClassSnapshots: LinkedHashMap = regularClasses.zipToMap(snapshots) - - return classNames.map { specialClassSnapshots[it] ?: regularClassSnapshots[it]!! } + return snapshots } /** Returns local, anonymous, or synthetic classes, and their nested classes. */ @@ -300,4 +354,4 @@ private fun List.zipToMap(other: List): LinkedHashMap { return map } -private fun ByteArray.md5(): ByteArray = MessageDigest.getInstance("MD5").digest(this) +private const val protoBasedDefaultValue = false \ No newline at end of file diff --git a/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/incremental/JavaClassChangesComputer.kt b/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/incremental/JavaClassChangesComputer.kt new file mode 100644 index 00000000000..b0cffdf7453 --- /dev/null +++ b/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/incremental/JavaClassChangesComputer.kt @@ -0,0 +1,86 @@ +/* + * Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. + */ + +package org.jetbrains.kotlin.gradle.incremental + +import org.jetbrains.kotlin.name.ClassId +import org.jetbrains.kotlin.resolve.jvm.JvmClassName +import org.jetbrains.kotlin.resolve.sam.SAM_LOOKUP_NAME + +/** Computes [ChangeSet] between two lists of [JavaClassSnapshot]s .*/ +object JavaClassChangesComputer { + + /** + * Computes [ChangeSet] between two lists of [JavaClassSnapshot]s. + * + * Each list must not contain duplicate classes (having the same [JvmClassName]/[ClassId]). + */ + fun compute( + currentJavaClassSnapshots: List, + previousJavaClassSnapshots: List + ): ChangeSet { + val currentClasses: Map = currentJavaClassSnapshots.associateBy { it.classId } + val previousClasses: Map = previousJavaClassSnapshots.associateBy { it.classId } + + // No need to collect added classes as they don't impact recompilation + val removedClasses = previousClasses.keys - currentClasses.keys + val unchangedOrModifiedClasses = previousClasses.keys - removedClasses + + return ChangeSet.Collector().run { + addChangedClasses(removedClasses) + unchangedOrModifiedClasses.forEach { + collectClassChanges(currentClasses[it]!!, previousClasses[it]!!, this) + } + getChanges() + } + } + + /** + * Collects changes between two [JavaClassSnapshot]s. + * + * The two classes must have the same [ClassId]. + */ + private fun collectClassChanges( + currentClassSnapshot: RegularJavaClassSnapshot, + previousClassSnapshot: RegularJavaClassSnapshot, + changes: ChangeSet.Collector + ) { + val classId = currentClassSnapshot.classId.also { check(it == previousClassSnapshot.classId) } + if (currentClassSnapshot.classAbiExcludingMembers.abiHash != previousClassSnapshot.classAbiExcludingMembers.abiHash) { + changes.addChangedClass(classId) + } else { + collectClassMemberChanges(classId, currentClassSnapshot.fieldsAbi, previousClassSnapshot.fieldsAbi, changes) + collectClassMemberChanges(classId, currentClassSnapshot.methodsAbi, previousClassSnapshot.methodsAbi, changes) + } + } + + /** Collects changes between two lists of fields/methods within a class. */ + private fun collectClassMemberChanges( + classId: ClassId, + currentMemberSnapshots: List, + previousMemberSnapshots: List, + changes: ChangeSet.Collector + ) { + val currentMemberHashes: Set = currentMemberSnapshots.map { it.abiHash }.toSet() + val previousMemberHashes: Map = previousMemberSnapshots.associateBy { it.abiHash } + + val addedMembers = currentMemberHashes - previousMemberHashes.keys + val removedMembers = previousMemberHashes.keys - currentMemberHashes + + // Note: + // - No need to collect added members as they don't impact recompilation. + // - Modified members have a current version and a previous version. The current version will appear in addedMembers (which will + // not be collected), and the previous version will appear in removedMembers (which will be collected). + // - Multiple members may have the same name (but never the same signature (name + desc) or ABI hash). It's okay to report the + // same name multiple times. + changes.addChangedClassMembers(classId, removedMembers.map { previousMemberHashes[it]!!.name }) + + // TODO: Check whether the condition to add SAM_LOOKUP_NAME below is too broad, and correct it if necessary. + // Currently, it matches the logic in ChangesCollector.getDirtyData in buildUtil.kt. + if (addedMembers.isNotEmpty() || removedMembers.isNotEmpty()) { + changes.addChangedClassMember(classId, SAM_LOOKUP_NAME.asString()) + } + } +} diff --git a/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/incremental/JavaClassSnapshotter.kt b/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/incremental/JavaClassSnapshotter.kt new file mode 100644 index 00000000000..75aafacb2c8 --- /dev/null +++ b/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/incremental/JavaClassSnapshotter.kt @@ -0,0 +1,87 @@ +/* + * Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. + */ + +package org.jetbrains.kotlin.gradle.incremental + +import com.google.gson.GsonBuilder +import org.jetbrains.kotlin.incremental.md5 +import org.jetbrains.kotlin.name.ClassId +import org.jetbrains.kotlin.resolve.jvm.JvmClassName +import org.jetbrains.org.objectweb.asm.ClassReader +import org.jetbrains.org.objectweb.asm.Opcodes +import org.jetbrains.org.objectweb.asm.tree.ClassNode + +/** Computes a [JavaClassSnapshot] of a Java class. */ +object JavaClassSnapshotter { + + fun snapshot(classId: ClassId, classContents: ByteArray, includeDebugInfoInSnapshot: Boolean? = null): JavaClassSnapshot { + // We will extract ABI information from the given class and store it into the `abiClass` variable. + // It is acceptable to collect more info than required, but it is incorrect to collect less info than required. + // There are 2 approaches: + // 1. Collect ABI info directly. The collected info must be exhaustive (now and in the future when there are updates to Java/ASM). + // 2. Collect all info and remove non-ABI info. The removed info should be exhaustive, but even if it's not, it is still + // acceptable. + // In the following, we will use the second approach as it is safer. + val abiClass = ClassNode() + + // First, collect all info. + // Note the parsing options passed to ClassReader: + // - SKIP_CODE is set as method bodies will not be part of the ABI of the class. + // - SKIP_DEBUG is not set as it would skip method parameters, which may be used by annotation processors like Room. + // - SKIP_FRAMES and EXPAND_FRAMES are not relevant when SKIP_CODE is set. + val classReader = ClassReader(classContents) + classReader.accept(abiClass, ClassReader.SKIP_CODE) + + // Then, remove non-ABI info: + // - Method bodies have already been removed (see SKIP_CODE above). + // - If the class is private, its snapshot will be empty. Otherwise, remove its private fields and methods. + if (abiClass.access.isPrivate()) { + return EmptyJavaClassSnapshot + } + abiClass.fields.removeIf { it.access.isPrivate() } + abiClass.methods.removeIf { it.access.isPrivate() } + + // Sort fields and methods as their order is not important (we still use List instead of Set as we want the serialized snapshot to + // be deterministic). + abiClass.fields.sortWith(compareBy({ it.name }, { it.desc })) + abiClass.methods.sortWith(compareBy({ it.name }, { it.desc })) + + val supertypes = (listOf(abiClass.superName) + abiClass.interfaces.toList()).map { JvmClassName.byInternalName(it) } + + val fieldsAbi = abiClass.fields.map { snapshotJavaElement(it, it.name, includeDebugInfoInSnapshot) } + val methodsAbi = abiClass.methods.map { snapshotJavaElement(it, it.name, includeDebugInfoInSnapshot) } + + abiClass.fields.clear() + abiClass.methods.clear() + val classAbiExcludingMembers = abiClass.let { snapshotJavaElement(it, it.name, includeDebugInfoInSnapshot) } + + return RegularJavaClassSnapshot(classId, supertypes, classAbiExcludingMembers, fieldsAbi, methodsAbi) + } + + private fun Int.isPrivate() = (this and Opcodes.ACC_PRIVATE) != 0 + + private val gson by lazy { + // Use serializeSpecialFloatingPointValues() to avoid + // "java.lang.IllegalArgumentException: NaN is not a valid double value as per JSON specification. To override this behavior, use + // GsonBuilder.serializeSpecialFloatingPointValues() method." + // on jars such as ~/.gradle/kotlin-build-dependencies/repo/kotlin.build/ideaIC/203.8084.24/artifacts/lib/rhino-1.7.12.jar. + GsonBuilder() + .serializeSpecialFloatingPointValues() + .setPrettyPrinting() + .create() + } + + private fun snapshotJavaElement(javaElement: Any, javaElementName: String, includeDebugInfoInSnapshot: Boolean? = null): AbiSnapshot { + // TODO: Optimize this method later if necessary. Currently we focus on correctness first. + val abiValue = gson.toJson(javaElement) + val abiHash = abiValue.toByteArray().md5() + + return if (includeDebugInfoInSnapshot == true) { + AbiSnapshotForTests(javaElementName, abiHash, abiValue) + } else { + AbiSnapshot(javaElementName, abiHash) + } + } +} diff --git a/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/tasks/Tasks.kt b/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/tasks/Tasks.kt index f5de3baf2aa..1166fc9d6e9 100644 --- a/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/tasks/Tasks.kt +++ b/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/tasks/Tasks.kt @@ -8,9 +8,9 @@ package org.jetbrains.kotlin.gradle.tasks import org.gradle.api.GradleException import org.gradle.api.Project import org.gradle.api.Task +import org.gradle.api.attributes.Attribute import org.gradle.api.file.* import org.gradle.api.invocation.Gradle -import org.gradle.api.attributes.Attribute import org.gradle.api.logging.Logger import org.gradle.api.model.ObjectFactory import org.gradle.api.model.ReplacedBy @@ -53,15 +53,14 @@ import org.jetbrains.kotlin.gradle.plugin.statistics.KotlinBuildStatsService import org.jetbrains.kotlin.gradle.report.ReportingSettings import org.jetbrains.kotlin.gradle.targets.js.ir.isProduceUnzippedKlib import org.jetbrains.kotlin.gradle.utils.* -import org.jetbrains.kotlin.incremental.ClasspathChanges import org.jetbrains.kotlin.incremental.ChangedFiles +import org.jetbrains.kotlin.incremental.ClasspathChanges import org.jetbrains.kotlin.incremental.IncrementalCompilerRunner import org.jetbrains.kotlin.library.impl.isKotlinLibrary import org.jetbrains.kotlin.statistics.metrics.BooleanMetrics import org.jetbrains.kotlin.utils.JsLibraryUtils import org.jetbrains.kotlin.utils.addToStdlib.cast import java.io.File -import java.util.LinkedHashSet import java.util.concurrent.ConcurrentHashMap import javax.inject.Inject @@ -844,7 +843,7 @@ abstract class KotlinCompile @Inject constructor( private fun getClasspathChanges(inputChanges: InputChanges): ClasspathChanges { val fileChanges = inputChanges.getFileChanges(classpathSnapshotProperties.classpathSnapshot).toList() return if (fileChanges.isEmpty()) { - ClasspathChanges.Available(LinkedHashSet(), LinkedHashSet()) + ClasspathChanges.Available(emptySet(), emptySet()) } else { val previousClasspathEntrySnapshotFiles = getPreviousClasspathEntrySnapshotFiles() if (previousClasspathEntrySnapshotFiles.isEmpty()) { diff --git a/libraries/tools/kotlin-gradle-plugin/src/test/kotlin/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest.kt b/libraries/tools/kotlin-gradle-plugin/src/test/kotlin/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest.kt index 30ece09f761..f2f5ce1d36c 100644 --- a/libraries/tools/kotlin-gradle-plugin/src/test/kotlin/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest.kt +++ b/libraries/tools/kotlin-gradle-plugin/src/test/kotlin/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest.kt @@ -5,16 +5,18 @@ package org.jetbrains.kotlin.gradle.incremental -import org.jetbrains.kotlin.gradle.incremental.ClasspathSnapshotTestCommon.* +import org.jetbrains.kotlin.gradle.incremental.ClasspathSnapshotTestCommon.Util.compileAll import org.jetbrains.kotlin.gradle.incremental.ClasspathSnapshotTestCommon.Util.snapshot +import org.jetbrains.kotlin.gradle.incremental.ClasspathSnapshotTestCommon.Util.snapshotAll import org.jetbrains.kotlin.incremental.ClasspathChanges import org.jetbrains.kotlin.incremental.LookupSymbol -import org.jetbrains.kotlin.name.FqName import org.jetbrains.kotlin.resolve.sam.SAM_LOOKUP_NAME -import org.junit.Assert.assertEquals import org.junit.Test import org.junit.rules.TemporaryFolder +import org.junit.runner.RunWith +import org.junit.runners.Parameterized import java.io.File +import kotlin.test.fail abstract class ClasspathChangesComputerTest : ClasspathSnapshotTestCommon() { @@ -25,184 +27,311 @@ abstract class ClasspathChangesComputerTest : ClasspathSnapshotTestCommon() { // - adding an annotation @Test - abstract fun testSingleClass_changePublicMethodSignature() + abstract fun testAbiChange_changePublicMethodSignature() @Test - abstract fun testSingleClass_changeMethodImplementation() + abstract fun testNonAbiChange_changeMethodImplementation() @Test - abstract fun testMultipleClasses() + abstract fun testVariousAbiChanges() + + @Test + abstract fun testImpactAnalysis() } -class KotlinClassesClasspathChangesComputerTest : ClasspathChangesComputerTest() { +class KotlinOnlyClasspathChangesComputerTest : ClasspathChangesComputerTest() { @Test - override fun testSingleClass_changePublicMethodSignature() { + override fun testAbiChange_changePublicMethodSignature() { val sourceFile = SimpleKotlinClass(tmpDir) val previousSnapshot = sourceFile.compileAndSnapshot() val currentSnapshot = sourceFile.changePublicMethodSignature().compileAndSnapshot() - val changes = ClasspathChangesComputer.compute(listOf(currentSnapshot), listOf(previousSnapshot)).normalize() + val changes = ClasspathChangesComputer.computeClassChanges(listOf(currentSnapshot), listOf(previousSnapshot)).normalize() - assertEquals( - Changes( - lookupSymbols = setOf( - LookupSymbol(name = SAM_LOOKUP_NAME.asString(), scope = "com.example.SimpleKotlinClass"), - LookupSymbol(name = "changedPublicMethod", scope = "com.example.SimpleKotlinClass"), - LookupSymbol(name = "publicMethod", scope = "com.example.SimpleKotlinClass") - ), - fqNames = setOf( - FqName("com.example.SimpleKotlinClass") - ), + Changes( + lookupSymbols = setOf( + LookupSymbol(name = "publicFunction", scope = "com.example.SimpleKotlinClass"), + LookupSymbol(name = SAM_LOOKUP_NAME.asString(), scope = "com.example.SimpleKotlinClass") ), - changes - ) + fqNames = setOf("com.example.SimpleKotlinClass") + ).assertEquals(changes) } @Test - override fun testSingleClass_changeMethodImplementation() { + override fun testNonAbiChange_changeMethodImplementation() { val sourceFile = SimpleKotlinClass(tmpDir) val previousSnapshot = sourceFile.compileAndSnapshot() val currentSnapshot = sourceFile.changeMethodImplementation().compileAndSnapshot() - val changes = ClasspathChangesComputer.compute(listOf(currentSnapshot), listOf(previousSnapshot)).normalize() + val changes = ClasspathChangesComputer.computeClassChanges(listOf(currentSnapshot), listOf(previousSnapshot)).normalize() - assertEquals(Changes(emptySet(), emptySet()), changes) + Changes(emptySet(), emptySet()).assertEquals(changes) } @Test - override fun testMultipleClasses() { - val classpathSourceDir = File(testDataDir, "../ClasspathChangesComputerTest/testMultipleClasses/src/kotlin").canonicalFile + override fun testVariousAbiChanges() { + val classpathSourceDir = File(testDataDir, "../ClasspathChangesComputerTest/testVariousAbiChanges/src/kotlin").canonicalFile val currentSnapshot = snapshotClasspath(File(classpathSourceDir, "current-classpath"), tmpDir) val previousSnapshot = snapshotClasspath(File(classpathSourceDir, "previous-classpath"), tmpDir) val changes = ClasspathChangesComputer.compute(currentSnapshot, previousSnapshot).normalize() - assertEquals( - Changes( - lookupSymbols = setOf( - LookupSymbol(name = SAM_LOOKUP_NAME.asString(), scope = "com.example.B"), - LookupSymbol(name = "b2", scope = "com.example.B"), - LookupSymbol(name = "b3", scope = "com.example.B"), - LookupSymbol(name = "b4", scope = "com.example.B"), - LookupSymbol(name = "C", scope = "com.example"), - LookupSymbol(name = "D", scope = "com.example"), - LookupSymbol(name = SAM_LOOKUP_NAME.asString(), scope = "com.example"), - LookupSymbol(name = "topLevelFuncB", scope = "com.example"), - LookupSymbol(name = "topLevelFuncC", scope = "com.example"), - LookupSymbol(name = "topLevelFuncD", scope = "com.example"), - LookupSymbol(name = "topLevelFuncInCKtMovedToDKt", scope = "com.example"), - LookupSymbol(name = "CKt", scope = "com.example"), - ), - fqNames = setOf( - FqName("com.example.B"), - FqName("com.example.C"), - FqName("com.example.D"), - FqName("com.example"), - FqName("com.example.CKt"), - ) + Changes( + lookupSymbols = setOf( + // ModifiedClassUnchangedMembers + LookupSymbol(name = "ModifiedClassUnchangedMembers", scope = "com.example"), + + // ModifiedClassChangedMembers + LookupSymbol(name = "modifiedProperty", scope = "com.example.ModifiedClassChangedMembers"), + LookupSymbol(name = "addedProperty", scope = "com.example.ModifiedClassChangedMembers"), + LookupSymbol(name = "removedProperty", scope = "com.example.ModifiedClassChangedMembers"), + LookupSymbol(name = "modifiedFunction", scope = "com.example.ModifiedClassChangedMembers"), + LookupSymbol(name = "addedFunction", scope = "com.example.ModifiedClassChangedMembers"), + LookupSymbol(name = "removedFunction", scope = "com.example.ModifiedClassChangedMembers"), + LookupSymbol(name = SAM_LOOKUP_NAME.asString(), scope = "com.example.ModifiedClassChangedMembers"), + + // AddedClass + LookupSymbol(name = "AddedClass", scope = "com.example"), + + // RemovedClass + LookupSymbol(name = "RemovedClass", scope = "com.example"), + + // Top-level properties and functions + LookupSymbol(name = "modifiedTopLevelProperty", scope = "com.example"), + LookupSymbol(name = "addedTopLevelProperty", scope = "com.example"), + LookupSymbol(name = "removedTopLevelProperty", scope = "com.example"), + LookupSymbol(name = "movedTopLevelProperty", scope = "com.example"), + LookupSymbol(name = "modifiedTopLevelFunction", scope = "com.example"), + LookupSymbol(name = "addedTopLevelFunction", scope = "com.example"), + LookupSymbol(name = "removedTopLevelFunction", scope = "com.example"), + LookupSymbol(name = "movedTopLevelFunction", scope = "com.example"), + LookupSymbol(name = SAM_LOOKUP_NAME.asString(), scope = "com.example") ), - changes - ) - } -} - -class JavaClassesClasspathChangesComputerTest : ClasspathChangesComputerTest() { - - @Test - override fun testSingleClass_changePublicMethodSignature() { - val sourceFile = SimpleJavaClass(tmpDir) - val previousSnapshot = sourceFile.compileAndSnapshot() - val currentSnapshot = sourceFile.changePublicMethodSignature().compileAndSnapshot() - val changes = ClasspathChangesComputer.compute(listOf(currentSnapshot), listOf(previousSnapshot)).normalize() - - assertEquals( - Changes( - lookupSymbols = setOf( - LookupSymbol(name = SAM_LOOKUP_NAME.asString(), scope = "com.example.SimpleJavaClass"), - LookupSymbol(name = "changedPublicMethod", scope = "com.example.SimpleJavaClass"), - LookupSymbol(name = "publicMethod", scope = "com.example.SimpleJavaClass") - ), - fqNames = setOf( - FqName("com.example.SimpleJavaClass") - ), - ), - changes - ) + fqNames = setOf( + "com.example.ModifiedClassUnchangedMembers", + "com.example.ModifiedClassChangedMembers", + "com.example.AddedClass", + "com.example.RemovedClass", + "com.example" + ) + ).assertEquals(changes) } @Test - override fun testSingleClass_changeMethodImplementation() { - val sourceFile = SimpleJavaClass(tmpDir) - val previousSnapshot = sourceFile.compileAndSnapshot() - val currentSnapshot = sourceFile.changeMethodImplementation().compileAndSnapshot() - val changes = ClasspathChangesComputer.compute(listOf(currentSnapshot), listOf(previousSnapshot)).normalize() - - assertEquals(Changes(emptySet(), emptySet()), changes) - } - - @Test - override fun testMultipleClasses() { - val classpathSourceDir = File(testDataDir, "../ClasspathChangesComputerTest/testMultipleClasses/src/java").canonicalFile + override fun testImpactAnalysis() { + val classpathSourceDir = + File(testDataDir, "../ClasspathChangesComputerTest/testImpactAnalysis_KotlinOrJava/src/kotlin").canonicalFile val currentSnapshot = snapshotClasspath(File(classpathSourceDir, "current-classpath"), tmpDir) val previousSnapshot = snapshotClasspath(File(classpathSourceDir, "previous-classpath"), tmpDir) val changes = ClasspathChangesComputer.compute(currentSnapshot, previousSnapshot).normalize() - assertEquals( - Changes( - lookupSymbols = setOf( - LookupSymbol(name = SAM_LOOKUP_NAME.asString(), scope = "com.example.B"), - LookupSymbol(name = "b2", scope = "com.example.B"), - LookupSymbol(name = "b3", scope = "com.example.B"), - LookupSymbol(name = "b4", scope = "com.example.B"), - LookupSymbol(name = "C", scope = "com.example"), - LookupSymbol(name = "D", scope = "com.example"), - LookupSymbol(name = SAM_LOOKUP_NAME.asString(), scope = "com.example.D"), - LookupSymbol(name = "", scope = "com.example.D"), - LookupSymbol(name = "d", scope = "com.example.D") - ), - fqNames = setOf( - FqName("com.example.B"), - FqName("com.example.C"), - FqName("com.example.D") - ) + Changes( + lookupSymbols = setOf( + LookupSymbol(name = "changedProperty", scope = "com.example.ChangedSuperClass"), + LookupSymbol(name = "changedProperty", scope = "com.example.SubClass"), + LookupSymbol(name = "changedProperty", scope = "com.example.SubSubClass"), + LookupSymbol(name = "changedFunction", scope = "com.example.ChangedSuperClass"), + LookupSymbol(name = "changedFunction", scope = "com.example.SubClass"), + LookupSymbol(name = "changedFunction", scope = "com.example.SubSubClass"), + LookupSymbol(name = SAM_LOOKUP_NAME.asString(), scope = "com.example.ChangedSuperClass"), + LookupSymbol(name = SAM_LOOKUP_NAME.asString(), scope = "com.example.SubClass"), + LookupSymbol(name = SAM_LOOKUP_NAME.asString(), scope = "com.example.SubSubClass") ), - changes - ) + fqNames = setOf( + "com.example.ChangedSuperClass", + "com.example.SubClass", + "com.example.SubSubClass" + ) + ).assertEquals(changes) } } -private fun snapshotClasspath(classpathSourceDir: File, tmpDir: TemporaryFolder): ClasspathSnapshot { - val classpathEntrySnapshots = classpathSourceDir.listFiles()!!.map { classpathEntrySourceDir -> - val relativePathsInDir = classpathEntrySourceDir.walk() - .filter { it.extension == "kt" || it.extension == "java" } - .map { file -> file.toRelativeString(classpathEntrySourceDir) } - .sortedBy { it } - val sourceFiles = relativePathsInDir.map { relativePath -> - if (relativePath.endsWith(".kt")) { - val preCompiledClassFilesRoot = classpathEntrySourceDir.path.let { - File(it.substringBeforeLast("src") + "classes" + it.substringAfterLast("src")) - }.also { check(it.exists()) } - KotlinSourceFile( - classpathEntrySourceDir, relativePath, - preCompiledClassFiles = listOf( - ClassFile(preCompiledClassFilesRoot, relativePath.replace(".kt", ".class")), - ClassFile(preCompiledClassFilesRoot, relativePath.replace(".kt", "Kt.class")) - ).filter { File(it.classRoot, it.unixStyleRelativePath).exists() } +@RunWith(Parameterized::class) +class JavaOnlyClasspathChangesComputerTest(private val protoBased: Boolean) : ClasspathChangesComputerTest() { + + companion object { + @Parameterized.Parameters(name = "protoBased={0}") + @JvmStatic + fun parameters() = listOf(true, false) + } + + @Test + override fun testAbiChange_changePublicMethodSignature() { + val sourceFile = SimpleJavaClass(tmpDir) + val previousSnapshot = sourceFile.compile().snapshot(protoBased) + val currentSnapshot = sourceFile.changePublicMethodSignature().compile().snapshot(protoBased) + val changes = ClasspathChangesComputer.computeClassChanges(listOf(currentSnapshot), listOf(previousSnapshot)).normalize() + + Changes( + lookupSymbols = setOf( + LookupSymbol(name = "publicMethod", scope = "com.example.SimpleJavaClass"), + LookupSymbol(name = SAM_LOOKUP_NAME.asString(), scope = "com.example.SimpleJavaClass") + ), + fqNames = setOf("com.example.SimpleJavaClass") + ).assertEquals(changes) + } + + @Test + override fun testNonAbiChange_changeMethodImplementation() { + val sourceFile = SimpleJavaClass(tmpDir) + val previousSnapshot = sourceFile.compile().snapshot(protoBased) + val currentSnapshot = sourceFile.changeMethodImplementation().compile().snapshot(protoBased) + val changes = ClasspathChangesComputer.computeClassChanges(listOf(currentSnapshot), listOf(previousSnapshot)).normalize() + + Changes(emptySet(), emptySet()).assertEquals(changes) + } + + @Test + override fun testVariousAbiChanges() { + val classpathSourceDir = File(testDataDir, "../ClasspathChangesComputerTest/testVariousAbiChanges/src/java").canonicalFile + val currentSnapshot = snapshotClasspath(File(classpathSourceDir, "current-classpath"), tmpDir, protoBased) + val previousSnapshot = snapshotClasspath(File(classpathSourceDir, "previous-classpath"), tmpDir, protoBased) + val changes = ClasspathChangesComputer.compute(currentSnapshot, previousSnapshot).normalize() + + Changes( + lookupSymbols = setOf( + // ModifiedClassUnchangedMembers + LookupSymbol(name = "ModifiedClassUnchangedMembers", scope = "com.example"), + + // ModifiedClassChangedMembers + LookupSymbol(name = "modifiedField", scope = "com.example.ModifiedClassChangedMembers"), + LookupSymbol(name = "removedField", scope = "com.example.ModifiedClassChangedMembers"), + LookupSymbol(name = "modifiedMethod", scope = "com.example.ModifiedClassChangedMembers"), + LookupSymbol(name = "removedMethod", scope = "com.example.ModifiedClassChangedMembers"), + LookupSymbol(name = SAM_LOOKUP_NAME.asString(), scope = "com.example.ModifiedClassChangedMembers"), + + // RemovedClass + LookupSymbol(name = "RemovedClass", scope = "com.example") + ) + if (protoBased) { + setOf( + // ModifiedClassChangedMembers + LookupSymbol(name = "addedField", scope = "com.example.ModifiedClassChangedMembers"), + LookupSymbol(name = "addedMethod", scope = "com.example.ModifiedClassChangedMembers"), + + // AddedClass + LookupSymbol(name = "AddedClass", scope = "com.example"), ) } else { - SourceFile(classpathEntrySourceDir, relativePath) + emptySet() + }, + fqNames = setOf( + "com.example.ModifiedClassUnchangedMembers", + "com.example.ModifiedClassChangedMembers", + "com.example.RemovedClass" + ) + if (protoBased) { + setOf("com.example.AddedClass") + } else { + emptySet() } - } - val classFiles = sourceFiles.flatMap { TestSourceFile(it, tmpDir).compileAll() } + ).assertEquals(changes) + } + + @Test + override fun testImpactAnalysis() { + val classpathSourceDir = File(testDataDir, "../ClasspathChangesComputerTest/testImpactAnalysis_KotlinOrJava/src/java").canonicalFile + val currentSnapshot = snapshotClasspath(File(classpathSourceDir, "current-classpath"), tmpDir, protoBased) + val previousSnapshot = snapshotClasspath(File(classpathSourceDir, "previous-classpath"), tmpDir, protoBased) + val changes = ClasspathChangesComputer.compute(currentSnapshot, previousSnapshot).normalize() + + Changes( + lookupSymbols = setOf( + LookupSymbol(name = "changedField", scope = "com.example.ChangedSuperClass"), + LookupSymbol(name = "changedField", scope = "com.example.SubClass"), + LookupSymbol(name = "changedField", scope = "com.example.SubSubClass"), + LookupSymbol(name = "changedMethod", scope = "com.example.ChangedSuperClass"), + LookupSymbol(name = "changedMethod", scope = "com.example.SubClass"), + LookupSymbol(name = "changedMethod", scope = "com.example.SubSubClass"), + LookupSymbol(name = SAM_LOOKUP_NAME.asString(), scope = "com.example.ChangedSuperClass"), + LookupSymbol(name = SAM_LOOKUP_NAME.asString(), scope = "com.example.SubClass"), + LookupSymbol(name = SAM_LOOKUP_NAME.asString(), scope = "com.example.SubSubClass") + ), + fqNames = setOf( + "com.example.ChangedSuperClass", + "com.example.SubClass", + "com.example.SubSubClass" + ) + ).assertEquals(changes) + } +} + +class KotlinAndJavaClasspathChangesComputerTest : ClasspathSnapshotTestCommon() { + + @Test + fun testImpactAnalysis() { + val classpathSourceDir = File(testDataDir, "../ClasspathChangesComputerTest/testImpactAnalysis_KotlinAndJava/src").canonicalFile + val currentSnapshot = snapshotClasspath(File(classpathSourceDir, "current-classpath"), tmpDir) + val previousSnapshot = snapshotClasspath(File(classpathSourceDir, "previous-classpath"), tmpDir) + val changes = ClasspathChangesComputer.compute(currentSnapshot, previousSnapshot).normalize() + + Changes( + lookupSymbols = setOf( + LookupSymbol(name = "changedProperty", scope = "com.example.ChangedKotlinSuperClass"), + LookupSymbol(name = "changedProperty", scope = "com.example.KotlinSubClassOfKotlinSuperClass"), + LookupSymbol(name = "changedProperty", scope = "com.example.JavaSubClassOfKotlinSuperClass"), + LookupSymbol(name = "changedFunction", scope = "com.example.ChangedKotlinSuperClass"), + LookupSymbol(name = "changedFunction", scope = "com.example.KotlinSubClassOfKotlinSuperClass"), + LookupSymbol(name = "changedFunction", scope = "com.example.JavaSubClassOfKotlinSuperClass"), + LookupSymbol(name = SAM_LOOKUP_NAME.asString(), scope = "com.example.ChangedKotlinSuperClass"), + LookupSymbol(name = SAM_LOOKUP_NAME.asString(), scope = "com.example.KotlinSubClassOfKotlinSuperClass"), + LookupSymbol(name = SAM_LOOKUP_NAME.asString(), scope = "com.example.JavaSubClassOfKotlinSuperClass"), + LookupSymbol(name = "changedField", scope = "com.example.ChangedJavaSuperClass"), + LookupSymbol(name = "changedField", scope = "com.example.KotlinSubClassOfJavaSuperClass"), + LookupSymbol(name = "changedField", scope = "com.example.JavaSubClassOfJavaSuperClass"), + LookupSymbol(name = "changedMethod", scope = "com.example.ChangedJavaSuperClass"), + LookupSymbol(name = "changedMethod", scope = "com.example.KotlinSubClassOfJavaSuperClass"), + LookupSymbol(name = "changedMethod", scope = "com.example.JavaSubClassOfJavaSuperClass"), + LookupSymbol(name = SAM_LOOKUP_NAME.asString(), scope = "com.example.ChangedJavaSuperClass"), + LookupSymbol(name = SAM_LOOKUP_NAME.asString(), scope = "com.example.KotlinSubClassOfJavaSuperClass"), + LookupSymbol(name = SAM_LOOKUP_NAME.asString(), scope = "com.example.JavaSubClassOfJavaSuperClass") + ), + fqNames = setOf( + "com.example.ChangedKotlinSuperClass", + "com.example.KotlinSubClassOfKotlinSuperClass", + "com.example.JavaSubClassOfKotlinSuperClass", + "com.example.ChangedJavaSuperClass", + "com.example.KotlinSubClassOfJavaSuperClass", + "com.example.JavaSubClassOfJavaSuperClass" + ) + ).assertEquals(changes) + } +} + +private fun snapshotClasspath(classpathSourceDir: File, tmpDir: TemporaryFolder, protoBased: Boolean = true): ClasspathSnapshot { + val classpath = mutableListOf() + val classpathEntrySnapshots = classpathSourceDir.listFiles()!!.sortedBy { it.name }.map { classpathEntrySourceDir -> + val classFiles = compileAll(classpathEntrySourceDir, classpath, tmpDir) + classpath.addAll(listOfNotNull(classFiles.firstOrNull()?.classRoot)) + + val relativePaths = classFiles.map { it.unixStyleRelativePath } + val classSnapshots = classFiles.snapshotAll(protoBased) ClasspathEntrySnapshot( - classSnapshots = classFiles.map { it.unixStyleRelativePath to it.snapshot() }.toMap(LinkedHashMap()) + classSnapshots = relativePaths.zip(classSnapshots).toMap(LinkedHashMap()) ) } return ClasspathSnapshot(classpathEntrySnapshots) } /** Adapted version of [ClasspathChanges.Available] for readability in this test. */ -private data class Changes(private val lookupSymbols: Set, private val fqNames: Set) +private data class Changes(val lookupSymbols: Set, val fqNames: Set) private fun ClasspathChanges.normalize(): Changes { this as ClasspathChanges.Available - return Changes(lookupSymbols, fqNames) + return Changes(lookupSymbols, fqNames.map { it.asString() }.toSet()) +} + +private fun Changes.assertEquals(actual: Changes) { + listOfNotNull( + compare(expected = this.lookupSymbols, actual = actual.lookupSymbols), + compare(expected = this.fqNames, actual = actual.fqNames) + ).also { + if (it.isNotEmpty()) { + fail(it.joinToString("\n")) + } + } +} + +private fun compare(expected: Set<*>, actual: Set<*>): String? { + return if (expected != actual) { + "Two sets differ:\n" + + "Elements in expected set but not in actual set: ${expected - actual}\n" + + "Elements in actual set but not in expected set: ${actual - expected}" + } else null } diff --git a/libraries/tools/kotlin-gradle-plugin/src/test/kotlin/org/jetbrains/kotlin/gradle/incremental/ClasspathSnapshotSerializerTest.kt b/libraries/tools/kotlin-gradle-plugin/src/test/kotlin/org/jetbrains/kotlin/gradle/incremental/ClasspathSnapshotSerializerTest.kt index 7832cf77088..9ea01c8f049 100644 --- a/libraries/tools/kotlin-gradle-plugin/src/test/kotlin/org/jetbrains/kotlin/gradle/incremental/ClasspathSnapshotSerializerTest.kt +++ b/libraries/tools/kotlin-gradle-plugin/src/test/kotlin/org/jetbrains/kotlin/gradle/incremental/ClasspathSnapshotSerializerTest.kt @@ -5,7 +5,8 @@ package org.jetbrains.kotlin.gradle.incremental -import org.junit.Assert.* +import org.jetbrains.kotlin.gradle.incremental.ClasspathSnapshotTestCommon.Util.readBytes +import org.junit.Assert.assertEquals import org.junit.Test abstract class ClasspathSnapshotSerializerTest : ClasspathSnapshotTestCommon() { @@ -32,23 +33,12 @@ class JavaClassesClasspathSnapshotSerializerTest : ClasspathSnapshotSerializerTe @Test override fun `test ClassSnapshotDataSerializer`() { - val originalSnapshot = testSourceFile.compileAndSnapshot() + val originalSnapshot = testSourceFile.compile().let { + ClassSnapshotter.snapshot(listOf(ClassFileWithContents(it, it.readBytes())), includeDebugInfoInSnapshot = false) + }.single() val serializedSnapshot = ClassSnapshotDataSerializer.toByteArray(originalSnapshot) val deserializedSnapshot = ClassSnapshotDataSerializer.fromByteArray(serializedSnapshot) - // The deserialized object does not exactly match the original object as they contain fields called `memoizedSerializedSize` which - // are not part of the serialized data and their values seem to be generated separately. Therefore, we remove these fields from the - // check below. - assertNotEquals(originalSnapshot.toGson(), deserializedSnapshot.toGson()) - assertEquals( - originalSnapshot.toGson().stripLinesContainingText("memoizedSerializedSize"), - deserializedSnapshot.toGson().stripLinesContainingText("memoizedSerializedSize") - ) - // Add another check to confirm that those fields are not part of the serialized data. - assertArrayEquals(serializedSnapshot, ClassSnapshotDataSerializer.toByteArray(deserializedSnapshot)) - } - - private fun String.stripLinesContainingText(text: String): String { - return lines().filterNot { it.contains(text, ignoreCase = true) }.joinToString("\n") + assertEquals(originalSnapshot.toGson(), deserializedSnapshot.toGson()) } } diff --git a/libraries/tools/kotlin-gradle-plugin/src/test/kotlin/org/jetbrains/kotlin/gradle/incremental/ClasspathSnapshotTestCommon.kt b/libraries/tools/kotlin-gradle-plugin/src/test/kotlin/org/jetbrains/kotlin/gradle/incremental/ClasspathSnapshotTestCommon.kt index 56669f09d3c..3a28d8412c8 100644 --- a/libraries/tools/kotlin-gradle-plugin/src/test/kotlin/org/jetbrains/kotlin/gradle/incremental/ClasspathSnapshotTestCommon.kt +++ b/libraries/tools/kotlin-gradle-plugin/src/test/kotlin/org/jetbrains/kotlin/gradle/incremental/ClasspathSnapshotTestCommon.kt @@ -6,9 +6,13 @@ package org.jetbrains.kotlin.gradle.incremental import com.google.gson.GsonBuilder -import org.jetbrains.kotlin.gradle.incremental.ClasspathSnapshotTestCommon.Util.readBytes +import org.jetbrains.kotlin.gradle.incremental.ClasspathSnapshotTestCommon.SourceFile.JavaSourceFile +import org.jetbrains.kotlin.gradle.incremental.ClasspathSnapshotTestCommon.SourceFile.KotlinSourceFile +import org.jetbrains.kotlin.gradle.incremental.ClasspathSnapshotTestCommon.Util.compile +import org.jetbrains.kotlin.gradle.incremental.ClasspathSnapshotTestCommon.Util.compileAll import org.jetbrains.kotlin.gradle.incremental.ClasspathSnapshotTestCommon.Util.snapshot -import org.jetbrains.kotlin.gradle.util.compileSources +import org.jetbrains.kotlin.gradle.incremental.ClasspathSnapshotTestCommon.Util.snapshotAll +import org.jetbrains.kotlin.test.KotlinTestUtils import org.junit.Rule import org.junit.rules.TemporaryFolder import java.io.File @@ -16,7 +20,8 @@ import java.io.File abstract class ClasspathSnapshotTestCommon { companion object { - val testDataDir = File("libraries/tools/kotlin-gradle-plugin/src/testData/kotlin.incremental.useClasspathSnapshot") + val testDataDir = + File("libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathSnapshotTestCommon") } @get:Rule @@ -26,7 +31,7 @@ abstract class ClasspathSnapshotTestCommon { private val gson by lazy { GsonBuilder().setPrettyPrinting().create() } protected fun Any.toGson(): String = gson.toJson(this) - open class SourceFile(val baseDir: File, relativePath: String) { + sealed class SourceFile(val baseDir: File, relativePath: String) { val unixStyleRelativePath: String init { @@ -34,13 +39,15 @@ abstract class ClasspathSnapshotTestCommon { } fun asFile() = File(baseDir, unixStyleRelativePath) - } - class KotlinSourceFile(baseDir: File, relativePath: String, val preCompiledClassFiles: List) : - SourceFile(baseDir, relativePath) { + class KotlinSourceFile(baseDir: File, relativePath: String, val preCompiledClassFiles: List) : + SourceFile(baseDir, relativePath) { - constructor(baseDir: File, relativePath: String, preCompiledClassFile: ClassFile) : - this(baseDir, relativePath, listOf(preCompiledClassFile)) + constructor(baseDir: File, relativePath: String, preCompiledClassFile: ClassFile) : + this(baseDir, relativePath, listOf(preCompiledClassFile)) + } + + class JavaSourceFile(baseDir: File, relativePath: String) : SourceFile(baseDir, relativePath) } /** Same as [SourceFile] but with a [TemporaryFolder] to store the results of operations on the [SourceFile]. */ @@ -50,9 +57,10 @@ abstract class ClasspathSnapshotTestCommon { val fileContents = sourceFile.asFile().readText() check(fileContents.contains(oldValue)) { "String '$oldValue' not found in file '${sourceFile.asFile().path}'" } - val newSourceFile = - preCompiledKotlinClassFile?.let { KotlinSourceFile(tmpDir.newFolder(), sourceFile.unixStyleRelativePath, it) } - ?: SourceFile(tmpDir.newFolder(), sourceFile.unixStyleRelativePath) + val newSourceFile = when (sourceFile) { + is KotlinSourceFile -> KotlinSourceFile(tmpDir.newFolder(), sourceFile.unixStyleRelativePath, preCompiledKotlinClassFile!!) + is JavaSourceFile -> JavaSourceFile(tmpDir.newFolder(), sourceFile.unixStyleRelativePath) + } newSourceFile.asFile().parentFile.mkdirs() newSourceFile.asFile().writeText(fileContents.replace(oldValue, newValue)) return TestSourceFile(newSourceFile, tmpDir) @@ -68,45 +76,7 @@ abstract class ClasspathSnapshotTestCommon { /** Compiles this source file and returns all generated .class files. */ @Suppress("MemberVisibilityCanBePrivate") - fun compileAll(): List { - val filePath = sourceFile.asFile().path - return when { - filePath.endsWith(".kt") -> compileKotlin() - filePath.endsWith(".java") -> compileJava() - else -> error("Unexpected file name extension: $filePath") - } - } - - private fun compileKotlin(): List { - sourceFile as KotlinSourceFile - - // TODO: Call Kotlin compiler to generate classes. - // If /dist/kotlinc/lib/kotlin-compiler.jar is available (e.g., by running ./gradlew dist), we will be able to - // call the Kotlin compiler to generate classes from here. For example: -// val classesDir = tmpDir.newFolder() -// org.jetbrains.kotlin.test.MockLibraryUtil.compileKotlin(sourceFile.asFile().path, classesDir) -// val classFiles = classesDir.walk() -// .filter { it.isFile && !it.toRelativeString(classesDir).startsWith("META-INF/") } -// .map { ClassFile(classesDir, it.toRelativeString(classesDir)) } -// .sortedBy { it.unixStyleRelativePath.substringBefore(".class") } -// .toList() -// kotlin.test.assertEquals(classFiles.size, sourceFile.preCompiledClassFiles.size) -// sourceFile.preCompiledClassFiles.forEach { -// File(classesDir, it.unixStyleRelativePath).copyTo(File(it.classRoot, it.unixStyleRelativePath), overwrite = true) -// } - // However, kotlin-compiler.jar is currently not available in CI builds, so we need to pre-compile the classes, put them in the - // test data, and use them here instead. - return sourceFile.preCompiledClassFiles - } - - private fun compileJava(): List { - val classesDir = tmpDir.newFolder() - compileSources(listOf(sourceFile.asFile()), classesDir) - return classesDir.walk().filter { it.isFile } - .map { ClassFile(classesDir, it.toRelativeString(classesDir)) } - .sortedBy { it.unixStyleRelativePath.substringBefore(".class") } - .toList() - } + fun compileAll(): List = sourceFile.compile(tmpDir) /** * Compiles this source file and returns the snapshot of a single generated .class file, or fails if zero or more than one .class @@ -117,23 +87,120 @@ abstract class ClasspathSnapshotTestCommon { fun compileAndSnapshot() = compile().snapshot() /** Compiles this source file and returns the snapshots of all generated .class files. */ - fun compileAndSnapshotAll(): List { - val classes = compileAll().map { - ClassFileWithContents(it, it.readBytes()) - } - return ClassSnapshotter.snapshot(classes) - } + fun compileAndSnapshotAll(): List = compileAll().snapshotAll() } object Util { - fun ClassFile.readBytes(): ByteArray { - // The class files in tests are currently in a directory, so we don't need to handle jars - return File(classRoot, unixStyleRelativePath).readBytes() + /** Compiles the source files in the given directory and returns all generated .class files. */ + fun compileAll(srcDir: File, classpath: List, tmpDir: TemporaryFolder): List { + val kotlinClasses = compileKotlin(srcDir, classpath, tmpDir) + + val javaClasspath = classpath + listOfNotNull(kotlinClasses.firstOrNull()?.classRoot) + val javaClasses = compileJava(srcDir, javaClasspath, tmpDir) + + return kotlinClasses + javaClasses } - fun ClassFile.snapshot(): ClassSnapshot { - return ClassSnapshotter.snapshot(listOf(ClassFileWithContents(this, readBytes()))).single() + private fun compileKotlin(srcDir: File, classpath: List, tmpDir: TemporaryFolder): List { + val preCompiledKotlinClassesDir = srcDir.path.let { + File(it.substringBeforeLast("src") + "classes" + it.substringAfterLast("src")) + } + preCompileKotlinFilesIfNecessary(srcDir, preCompiledKotlinClassesDir, classpath, tmpDir) + return getClassFilesInDir(preCompiledKotlinClassesDir) + } + + private val preCompiledKotlinClassesDirs = mutableSetOf() + + /** + * If /dist/kotlinc/lib/kotlin-compiler.jar is available (e.g., by running ./gradlew dist), we will be able to call the + * Kotlin compiler to generate classes. However, kotlin-compiler.jar is currently not available in CI builds, so we need to + * pre-compile the classes locally and put them in the test data to check in. + */ + @Synchronized // To safe-guard shared variable preCompiledKotlinClassesDirs + private fun preCompileKotlinFilesIfNecessary( + srcDir: File, + preCompiledKotlinClassesDir: File, + classpath: List, + tmpDir: TemporaryFolder, + preCompile: Boolean = false // Set to `true` to pre-compile Kotlin class files locally (DO NOT check in with preCompile = true) + ) { + if (preCompile) { + if (!preCompiledKotlinClassesDirs.contains(preCompiledKotlinClassesDir)) { + val classFiles = doCompileKotlin(srcDir, classpath, tmpDir) + preCompiledKotlinClassesDir.deleteRecursively() + for (classFile in classFiles) { + File(preCompiledKotlinClassesDir, classFile.unixStyleRelativePath).apply { + parentFile.mkdirs() + classFile.asFile().copyTo(this) + } + } + preCompiledKotlinClassesDirs.add(preCompiledKotlinClassesDir) + } + } + } + + fun SourceFile.compile(tmpDir: TemporaryFolder): List { + return if (this is KotlinSourceFile) { + preCompiledClassFiles.forEach { + preCompileKotlinFilesIfNecessary(baseDir, it.classRoot, classpath = emptyList(), tmpDir) + } + preCompiledClassFiles + } else { + val srcDir = tmpDir.newFolder() + asFile().copyTo(File(srcDir, unixStyleRelativePath)) + compileAll(srcDir, classpath = emptyList(), tmpDir) + } + } + + private fun doCompileKotlin(srcDir: File, classpath: List, tmpDir: TemporaryFolder): List { + if (srcDir.walk().none { it.path.endsWith(".kt") }) { + return emptyList() + } + + val classesDir = tmpDir.newFolder() + org.jetbrains.kotlin.test.MockLibraryUtil.compileKotlin( + srcDir.path, + classesDir, + extraClasspath = classpath.map { it.path }.toTypedArray() + ) + return getClassFilesInDir(classesDir) + } + + private fun compileJava(srcDir: File, classpath: List, tmpDir: TemporaryFolder): List { + val javaFiles = srcDir.walk().toList().filter { it.path.endsWith(".java") } + if (javaFiles.isEmpty()) { + return emptyList() + } + + val classesDir = tmpDir.newFolder() + val classpathOption = + if (classpath.isNotEmpty()) listOf("-classpath", classpath.joinToString(File.pathSeparator)) else emptyList() + + KotlinTestUtils.compileJavaFiles(javaFiles, listOf("-d", classesDir.path) + classpathOption) + return getClassFilesInDir(classesDir) + } + + private fun getClassFilesInDir(classesDir: File): List { + return classesDir.walk().toList() + .filter { it.isFile && it.path.endsWith(".class") } + .map { ClassFile(classesDir, it.toRelativeString(classesDir)) } + .sortedBy { it.unixStyleRelativePath.substringBefore(".class") } + } + + // `ClassFile`s in production code could be in a jar, but the `ClassFile`s in tests are currently in a directory, so converting it + // to a File is possible. + @Suppress("MemberVisibilityCanBePrivate") + fun ClassFile.asFile() = File(classRoot, unixStyleRelativePath) + + @Suppress("MemberVisibilityCanBePrivate") + fun ClassFile.readBytes() = asFile().readBytes() + + fun ClassFile.snapshot(protoBased: Boolean? = null): ClassSnapshot = listOf(this).snapshotAll(protoBased).single() + + fun List.snapshotAll(protoBased: Boolean? = null): List { + val classFilesWithContents = this.map { ClassFileWithContents(it, it.readBytes()) } + return ClassSnapshotter.snapshot(classFilesWithContents, protoBased, includeDebugInfoInSnapshot = true) } } @@ -146,45 +213,44 @@ abstract class ClasspathSnapshotTestCommon { class SimpleKotlinClass(tmpDir: TemporaryFolder) : ChangeableTestSourceFile( KotlinSourceFile( - baseDir = File(testDataDir, "src/original"), - relativePath = "com/example/SimpleKotlinClass.kt", - preCompiledClassFile = ClassFile(File(testDataDir, "classes/original"), "com/example/SimpleKotlinClass.class") + baseDir = File(testDataDir, "src/kotlin"), relativePath = "com/example/SimpleKotlinClass.kt", + preCompiledClassFile = ClassFile(File(testDataDir, "classes/kotlin/original"), "com/example/SimpleKotlinClass.class") ), tmpDir ) { override fun changePublicMethodSignature() = replace( - "publicMethod()", "changedPublicMethod()", + "publicFunction()", "publicFunction(newParam: Int)", preCompiledKotlinClassFile = ClassFile( - File(testDataDir, "classes/changedPublicMethodSignature"), "com/example/SimpleKotlinClass.class" + File(testDataDir, "classes/kotlin/changedPublicMethodSignature"), "com/example/SimpleKotlinClass.class" ) ) override fun changeMethodImplementation() = replace( - "I'm in a public method", "This method implementation has changed!", + "I'm in a public function", "This function's implementation has changed!", preCompiledKotlinClassFile = ClassFile( - File(testDataDir, "classes/changedMethodImplementation"), "com/example/SimpleKotlinClass.class" + File(testDataDir, "classes/kotlin/changedMethodImplementation"), "com/example/SimpleKotlinClass.class" ) ) } class SimpleJavaClass(tmpDir: TemporaryFolder) : ChangeableTestSourceFile( - SourceFile(File(testDataDir, "src/original"), "com/example/SimpleJavaClass.java"), tmpDir + JavaSourceFile(File(testDataDir, "src/java"), "com/example/SimpleJavaClass.java"), tmpDir ) { - override fun changePublicMethodSignature() = replace("publicMethod()", "changedPublicMethod()") + override fun changePublicMethodSignature() = replace("publicMethod()", "publicMethod(int newParam)") - override fun changeMethodImplementation() = replace("I'm in a public method", "This method implementation has changed!") + override fun changeMethodImplementation() = replace("I'm in a public method", "This method's implementation has changed!") } class JavaClassWithNestedClasses(tmpDir: TemporaryFolder) : ChangeableTestSourceFile( - SourceFile(File(testDataDir, "src/original"), "com/example/JavaClassWithNestedClasses.java"), tmpDir + JavaSourceFile(File(testDataDir, "src/java"), "com/example/JavaClassWithNestedClasses.java"), tmpDir ) { - /** The source file contains multiple classes, select the one we are mostly interested in. */ + /** The source file contains multiple classes, select the one that we want to test. */ val nestedClassToTest = "com/example/JavaClassWithNestedClasses\$InnerClass" - override fun changePublicMethodSignature() = replace("publicMethod()", "changedPublicMethod()") + override fun changePublicMethodSignature() = replace("publicMethod()", "publicMethod(int newParam)") - override fun changeMethodImplementation() = replace("I'm in a public method", "This method implementation has changed!") + override fun changeMethodImplementation() = replace("I'm in a public method", "This method's implementation has changed!") } } diff --git a/libraries/tools/kotlin-gradle-plugin/src/test/kotlin/org/jetbrains/kotlin/gradle/incremental/ClasspathSnapshotterTest.kt b/libraries/tools/kotlin-gradle-plugin/src/test/kotlin/org/jetbrains/kotlin/gradle/incremental/ClasspathSnapshotterTest.kt index 7ff66bc1712..37eedeff3de 100644 --- a/libraries/tools/kotlin-gradle-plugin/src/test/kotlin/org/jetbrains/kotlin/gradle/incremental/ClasspathSnapshotterTest.kt +++ b/libraries/tools/kotlin-gradle-plugin/src/test/kotlin/org/jetbrains/kotlin/gradle/incremental/ClasspathSnapshotterTest.kt @@ -3,14 +3,15 @@ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. */ -@file:Suppress("SpellCheckingInspection") - package org.jetbrains.kotlin.gradle.incremental +import org.jetbrains.kotlin.gradle.incremental.ClasspathSnapshotTestCommon.Util.snapshot import org.junit.Assert.assertEquals import org.junit.Assert.assertNotEquals import org.junit.Before import org.junit.Test +import org.junit.runner.RunWith +import org.junit.runners.Parameterized import java.io.File abstract class ClasspathSnapshotterTest : ClasspathSnapshotTestCommon() { @@ -26,8 +27,11 @@ abstract class ClasspathSnapshotterTest : ClasspathSnapshotTestCommon() { @Test fun `test ClassSnapshotter's result against expected snapshot`() { - val expectedSnapshot = File("${testSourceFile.sourceFile.asFile().path.substringBeforeLast('.')}-expected-snapshot.json").readText() - assertEquals(expectedSnapshot, testClassSnapshot.toGson()) + assertEquals(getExpectedSnapshotFile().readText(), testClassSnapshot.toGson()) + } + + private fun getExpectedSnapshotFile() = testSourceFile.sourceFile.asFile().path.let { + File(it.substringBeforeLast("src") + "expected-snapshot" + it.substringAfterLast("src").substringBeforeLast('.') + ".json") } @Test @@ -53,8 +57,53 @@ class KotlinClassesClasspathSnapshotterTest : ClasspathSnapshotterTest() { override val testSourceFile = SimpleKotlinClass(tmpDir) } -class JavaClassesClasspathSnapshotterTest : ClasspathSnapshotterTest() { - override val testSourceFile = SimpleJavaClass(tmpDir) +@RunWith(Parameterized::class) +class JavaClassesClasspathSnapshotterTest(private val protoBased: Boolean) : ClasspathSnapshotTestCommon() { + + companion object { + @Parameterized.Parameters(name = "protoBased={0}") + @JvmStatic + fun parameters() = listOf(true, false) + } + + private val testSourceFile = SimpleJavaClass(tmpDir) + + private lateinit var testClassSnapshot: ClassSnapshot + + @Before + fun setUp() { + testClassSnapshot = testSourceFile.compile().snapshot(protoBased) + } + + @Test + fun `test ClassSnapshotter's result against expected snapshot`() { + assertEquals(getExpectedSnapshotFile().readText(), testClassSnapshot.toGson()) + } + + private fun getExpectedSnapshotFile() = testSourceFile.sourceFile.asFile().path.let { + File( + it.substringBeforeLast("src") + "expected-snapshot" + it.substringAfterLast("src") + .substringBeforeLast('.') + "-protoBased=$protoBased.json" + ) + } + + @Test + fun `test ClassSnapshotter extracts ABI info from a class`() { + // Change public method signature + val updatedSnapshot = testSourceFile.changePublicMethodSignature().compile().snapshot(protoBased) + + // The snapshot must change + assertNotEquals(testClassSnapshot.toGson(), updatedSnapshot.toGson()) + } + + @Test + fun `test ClassSnapshotter does not extract non-ABI info from a class`() { + // Change method implementation + val updatedSnapshot = testSourceFile.changeMethodImplementation().compile().snapshot(protoBased) + + // The snapshot must not change + assertEquals(testClassSnapshot.toGson(), updatedSnapshot.toGson()) + } } class JavaClassWithNestedClassesClasspathSnapshotterTest : ClasspathSnapshotTestCommon() { @@ -69,19 +118,17 @@ class JavaClassWithNestedClassesClasspathSnapshotterTest : ClasspathSnapshotTest } private fun TestSourceFile.compileAndSnapshotNestedClass(): ClassSnapshot { - return compileAndSnapshotAll()[5].also { - assertEquals( - testSourceFile.nestedClassToTest, - (it as RegularJavaClassSnapshot).serializedJavaClass.classId.asString().replace('.', '$') - ) + return compileAndSnapshotAll().single { + if (it is RegularJavaClassSnapshot) { + it.classAbiExcludingMembers.name == testSourceFile.nestedClassToTest + } else false } } @Test fun `test ClassSnapshotter's result against expected snapshot`() { - val expectedSnapshot = - File("${testDataDir.path}/src/original/${testSourceFile.nestedClassToTest}-expected-snapshot.json").readText() - assertEquals(expectedSnapshot, testClassSnapshot.toGson()) + val expectedSnapshotFile = File("${testDataDir.path}/expected-snapshot/java/${testSourceFile.nestedClassToTest}.json") + assertEquals(expectedSnapshotFile.readText(), testClassSnapshot.toGson()) } @Test diff --git a/libraries/tools/kotlin-gradle-plugin/src/testData/ClasspathChangesComputerTest/testMultipleClasses/classes/kotlin/current-classpath/0/com/example/A.class b/libraries/tools/kotlin-gradle-plugin/src/testData/ClasspathChangesComputerTest/testMultipleClasses/classes/kotlin/current-classpath/0/com/example/A.class deleted file mode 100644 index 9532995349518a65c4260226076f412fa084dd97..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 582 zcmZutOG{fp7(Fxhk?S?7H)*sneb-IfMQ;>$ikP+(E~G8k5`?TK$)IEIqhu!HGOPZO zuH6WN;6j4S{;1M#ZVN@|V$SzE=bJh6^VjtafNg9r)J8=X%QKOEOJ&@xfH6cT;#9<` z$dBUB!xK3&6*vt3uF93!V{l%+>Q~{x58hNSbcRPZ*e>lT=Z| zy(Mt0Fw}dK!lWvXKT0FU!U&S^?9`!`F$=y0kZMBxGi9p|W#dhT{l&Z)@)i$yw3vrH zut{KJYcb#A9ro6{{o(V7A2cJU%{%Vl?f3W83Btv^?FL@t+dW&%Zg;zHCWgYhVl1r* zmCH}FY$&H+#W1B#qgRYX+80x0>%YzLOEH^{j$&ks7&^iRz&IMd0~W6MXs?) zPTkT(!y2cI)0Omfgiol7tv!m~>nj8o<@hO~9fO3=2&;bxSVBlu9m{3suJ{tsISo1f ziM{`bIi8oS$9O?;pBC5YEsX)31osm(6Rcv5Qanh|!ukMAqm73HR5U`3M;g9HtxT3R Gs=oox6ka$0 diff --git a/libraries/tools/kotlin-gradle-plugin/src/testData/ClasspathChangesComputerTest/testMultipleClasses/classes/kotlin/current-classpath/0/com/example/AKt.class b/libraries/tools/kotlin-gradle-plugin/src/testData/ClasspathChangesComputerTest/testMultipleClasses/classes/kotlin/current-classpath/0/com/example/AKt.class deleted file mode 100644 index 09c24e7031dd6bad350c18e8cbf53dded39c5e77..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 358 zcmW+w%}&BV7@XZgk@`as|H>2S#e(tXsWBmGL`~Fi;k2|Hv(WAmx+NTWC9fU~XCKP= zEti@3W-`0;`}h3=;2se}Co^R%H=AJ77x-!a!}B)1Do^k{NPW5-I%m%5zE)rXiBAvZ({xUDKHo;!~ge zAwK({iN?eS)9~nzGM*__E+w1H`OfA0&e=2b`_Io`0M@a>FwsgoL3AWK@8c+_XTcc! zeQ_v)SS0P>b#p&z=`1V;=dnzre#&4iF6|VMf#bnOmH{qu47|ComQZY<6&h^}2$h0F}UmZ$^Mv5Q{3z)*RVO|*(P=o2krSTRF3yrkf4)!D6 z>eb)&ytz}$)UJVU8*km^__!K+A%J)s4a^3I_}8)D{g z%mJF{fZ|8ec(gaZM?-!X^yfWZ;U4z~eUG~axMVG|MY48f&|l*#te!dkkax<+s*h6C9;%o&nI%eM~VD6qu@Jc0$PY&Up~+bb6dSc%T5#~hf>LA z96dYT02Mt?_ad`*nM9ktPBZGh5maODD{YB*M|7p}M?r5p?R8txOKB=*N5VT}vRI|7 zv1u6=%I2mBmCaq#rfP&8va`b&ZJMl2KD`+_ACUKixb$+6ul;~qD|_Ej{7NpzLpqBj zX$Urzn>Y4|JR?ixn1oNZL|=I%6_7Q#Ozj)4ekO1tVmeXq3_0_kJc9~VnK{mqi(f8~ zolD4Pf31Y-rBhtHIE8zO5XbVc-4e|JY|*sWY1$jRutMAnaVx}aED*$<5O;BJ7fj(k e7I!hB;49=59EGVNC@GW`@5K5<4y2ZRO>`dv>W=bm9aWk zAG*}+-WyX`X?0;rj37{RMfhePb@7(Fxhk=xtE+@w*{_-wmryXZ}eJ4LDn;X(+Vq?Tr_%IFe!{>ebdoA+ zxU&L|IzyvBEljHN_?(4%q_;D+8I=t(iTz~3OCkU5|jvIK9Z}%K9yWQ>WO$~)N#Y9>Y zDwjv|Y$RtN#VDmtvtNuwIuJ8u>%YzLLouI?&Nrls7wx&Rz!J~=Y3MoPFK>`5k96Ww)QA`yWbIfEyqs??HD9{N?5%iUX{`yxs4g&o2Nyv>6(KN<6XU$vPI^V5G}n4DOQW+>5z<_g)rD5s+##)U{fV zMK0oDCW8TkeS0@!xc;m9vOm%jm5XqyD2$;wUMU?%(whj)L$3KFgO%hqoo5D02Ef2p zhFD~7Bf~nx!Y;$jephk!JI8V@D(#X>V09P~%TzP}{c0RZ@th?K zv6=EkOp5cSvP~d{k!f15nbc7tW>FfE`y{2(Tt`Z#=)yw5yoqWHMU*J}g1Xj0qe~w| z7%mBo1yso@|36lvyek^FaDK?@(Q<|It8>^s93MwMYN-1-M#G1T<{T`=2~NpRQA}}` GqWlX=Nl#7y diff --git a/libraries/tools/kotlin-gradle-plugin/src/testData/ClasspathChangesComputerTest/testMultipleClasses/classes/kotlin/previous-classpath/0/com/example/A.class b/libraries/tools/kotlin-gradle-plugin/src/testData/ClasspathChangesComputerTest/testMultipleClasses/classes/kotlin/previous-classpath/0/com/example/A.class deleted file mode 100644 index 134b7762aa18d868204b74e407076cf46110cbae..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 582 zcmZutO-ma=7=C7Uvsu@~Y|^yGSnY?Gwuf$%-dc)jOJN}@SP4Q-lVs2_`%y9z@t9M8 zNYA|#3WXj@@aT^c-&uts^f1r+^*ry)GgsGt{sMS|Er#kSPa}CD(yxh(x@9ni@JyVG zC=uC7bTB-VBU6UM;Js6sGVd9j7ccu2l;8z$QD$(>snQI!-n~t4X>cMQFY`X4qZKn*nd}fQO5D zzNI-!NF;qRRkprs24C{obR<73%UC;{Wk#j4ue2gcH_LJ(jLI{O zZF1@sCK}c_Wt^_0uOr-~Dzf${mR|ja|FalBA+%$_!BfJ@EdfgisH$VR=-e0oLimG* z9RI}bf5aTm3f2amQ{1J+b$Ux<04K(S7|j?D@rY8a#%N(}0H)E#`T%8(K;yB7r%^4E HWsS-W&JkWV diff --git a/libraries/tools/kotlin-gradle-plugin/src/testData/ClasspathChangesComputerTest/testMultipleClasses/classes/kotlin/previous-classpath/0/com/example/AKt.class b/libraries/tools/kotlin-gradle-plugin/src/testData/ClasspathChangesComputerTest/testMultipleClasses/classes/kotlin/previous-classpath/0/com/example/AKt.class deleted file mode 100644 index 33ec1a04f0c0fe9ee9d577d18687b56344a6be43..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 358 zcmW+w%}&BV7@XZg(JE5Jzw!inv0%J;YD`EPQ4=*>I4$kQEVR3XZV5+T$*Tv$*@rTI z%VlQ1nau9|{(b)dxJSg$$xIo`jVPCejFTtZ0%Hj0VlCoA=+F3dHkTQ>9z)xj{w~}QkOHi`Vg~%oZ#Kmt4xlRJEFH*TUE-5 zsuZP(*2W5}jIJ;QN5c)FHzPFR6Q9!+?LBh8_R$5Qi+~mtE{QqLa78>Mw?)N+DZCVi bDS{M7I8M>VNs11_DOiOrPN(1%niYEg&9Xr| diff --git a/libraries/tools/kotlin-gradle-plugin/src/testData/ClasspathChangesComputerTest/testMultipleClasses/classes/kotlin/previous-classpath/0/com/example/B.class b/libraries/tools/kotlin-gradle-plugin/src/testData/ClasspathChangesComputerTest/testMultipleClasses/classes/kotlin/previous-classpath/0/com/example/B.class deleted file mode 100644 index 30d8764d71adfaf199350e556ea2ae25e60bf794..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 830 zcmZuuO>fgc5PiG;h~qlc328~g_jg+)oTl7BNCbprDS%W^gp|`JvC1}yjk24n$DH^f zoVg$&A#p%akNhaatdj$6bD4SbW}au~`On{9zX3eKBZg8x8%N2B7=IomQL6yP5FUwR z5sgH87`^KqC4F6h#o#`ZsnpLItnHmn00*uQ8wCbif0Bw}y?y3OPZ^xUM7Q>GLCnB= z1X&!QgiA$mtS<+erqv8kShl`+c{rc>+%v$V?AGS9CU3BobNbcgAwQ^wR-HHOkEdT= z5##yuS>5)W(4|J0 ztfOqx6X<7Ad_YxX45IAp{)G3P0LMd$rfoj5O)*#upa`F;GS+hDtoR4QZ`Ax>Y_AlT zSBk6W#m-9c#!7MRyx3hK=Ge*KcOScy+jP`r7C7}^&w_CIl;TBR;e5*cSLWMwyKa5 zRVqp!v^G{)Wps%FIBISPy&0hnpZJWfXz!8xwU5pTT?90#a6!y*ic8`FxeY2FOyMPH cCI}K7;wV82#|hd9r(h*IIGKW%sF&#e1JPeWKmY&$ diff --git a/libraries/tools/kotlin-gradle-plugin/src/testData/ClasspathChangesComputerTest/testMultipleClasses/classes/kotlin/previous-classpath/0/com/example/C.class b/libraries/tools/kotlin-gradle-plugin/src/testData/ClasspathChangesComputerTest/testMultipleClasses/classes/kotlin/previous-classpath/0/com/example/C.class deleted file mode 100644 index 3aa0fa67439a5162ffd5b8cf1a52d7066d0c1dcb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 582 zcmZutOKVd>7(Fxhk=xtE-o#YX__iB$;Y~|-6=@q0E<}YYp^(+&W@x9m56MhQms$Bk zT)Pnjp$iFJ`lG~eu7y%?G3R@o^Ua+3{paErfE{cyG}1DU<+;c|XEN^Bz!;)aaVFwS z6vy$0@u^Hr4Gx3 zTPxsLV`vVhrO8wgzmrBxgb^g+`I$p6V-|c1Ak~!m=gL++$|hS3d&@;T%X{w8<(D_q3Bu)~>jqxr+dbRNZg=}Hr^beIBCQEk z$oKPnEN7p@IHOK$P^KaqikY(YRWtlp&S$B7t1M&Va9$Xd%c0VWDEmcG8evpfXl#*F zw=&VP#wp`;C4C*?L#kqHkD~YDCxY+Q_z|HUgM^O>>;DK?K}b~-t5xTw_y?kIG~~Dz zd;bx0JgHa@@RZ^nEpF0VS|d0KZYO9bSjQboaW_E+8zV4{F7Ay`(+D;0Yxo+CDp}R2 F{{`UwUP1r> diff --git a/libraries/tools/kotlin-gradle-plugin/src/testData/ClasspathChangesComputerTest/testMultipleClasses/classes/kotlin/previous-classpath/0/com/example/CKt.class b/libraries/tools/kotlin-gradle-plugin/src/testData/ClasspathChangesComputerTest/testMultipleClasses/classes/kotlin/previous-classpath/0/com/example/CKt.class deleted file mode 100644 index 9e797e17994ece1a559fab09b60d9a7860f0802e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 441 zcmah^O;5r=6r64OtRTg2F!8Jx3x=B~Q$x}KnkeDIX=yj6((V$vZ8-9mym~O4{ZYoZ zoVdAr{~pI-n5=rXiIm3m^s(^Voof26Bm4DLHGxR-GG<~=XoMM$d6(9~)* z7KKQLxeR><`}$_aaQRmaBt=YAA)={z9BGF3c&T&}OK&1HkGSUd3|3m$bevPxvoB#&_8fXSML@R)c_8ct35st~vP|k3Y Gq52C(P)|z$ diff --git a/libraries/tools/kotlin-gradle-plugin/src/testData/ClasspathChangesComputerTest/testMultipleClasses/src/java/current-classpath/0/com/example/A.java b/libraries/tools/kotlin-gradle-plugin/src/testData/ClasspathChangesComputerTest/testMultipleClasses/src/java/current-classpath/0/com/example/A.java deleted file mode 100644 index 40564fe58a0..00000000000 --- a/libraries/tools/kotlin-gradle-plugin/src/testData/ClasspathChangesComputerTest/testMultipleClasses/src/java/current-classpath/0/com/example/A.java +++ /dev/null @@ -1,6 +0,0 @@ -package com.example; - -// Unchanged class -public class A { - public int a = 0; -} diff --git a/libraries/tools/kotlin-gradle-plugin/src/testData/ClasspathChangesComputerTest/testMultipleClasses/src/java/current-classpath/0/com/example/B.java b/libraries/tools/kotlin-gradle-plugin/src/testData/ClasspathChangesComputerTest/testMultipleClasses/src/java/current-classpath/0/com/example/B.java deleted file mode 100644 index 574d6af1c2d..00000000000 --- a/libraries/tools/kotlin-gradle-plugin/src/testData/ClasspathChangesComputerTest/testMultipleClasses/src/java/current-classpath/0/com/example/B.java +++ /dev/null @@ -1,9 +0,0 @@ -package com.example; - -// Modified class -public class B { - public int b1 = 0; // Unchanged field - public String b2 = ""; // Modified field - //public int b3 = 0; // Removed field - public int b4 = 0; // Added field -} diff --git a/libraries/tools/kotlin-gradle-plugin/src/testData/ClasspathChangesComputerTest/testMultipleClasses/src/java/current-classpath/0/com/example/D.java b/libraries/tools/kotlin-gradle-plugin/src/testData/ClasspathChangesComputerTest/testMultipleClasses/src/java/current-classpath/0/com/example/D.java deleted file mode 100644 index 1a8dbcf65dd..00000000000 --- a/libraries/tools/kotlin-gradle-plugin/src/testData/ClasspathChangesComputerTest/testMultipleClasses/src/java/current-classpath/0/com/example/D.java +++ /dev/null @@ -1,6 +0,0 @@ -package com.example; - -// Added class -public class D { - public int d = 0; -} diff --git a/libraries/tools/kotlin-gradle-plugin/src/testData/ClasspathChangesComputerTest/testMultipleClasses/src/java/previous-classpath/0/com/example/A.java b/libraries/tools/kotlin-gradle-plugin/src/testData/ClasspathChangesComputerTest/testMultipleClasses/src/java/previous-classpath/0/com/example/A.java deleted file mode 100644 index 31d2c687b77..00000000000 --- a/libraries/tools/kotlin-gradle-plugin/src/testData/ClasspathChangesComputerTest/testMultipleClasses/src/java/previous-classpath/0/com/example/A.java +++ /dev/null @@ -1,5 +0,0 @@ -package com.example; - -public class A { - public int a = 0; -} diff --git a/libraries/tools/kotlin-gradle-plugin/src/testData/ClasspathChangesComputerTest/testMultipleClasses/src/java/previous-classpath/0/com/example/B.java b/libraries/tools/kotlin-gradle-plugin/src/testData/ClasspathChangesComputerTest/testMultipleClasses/src/java/previous-classpath/0/com/example/B.java deleted file mode 100644 index 8453bca0bac..00000000000 --- a/libraries/tools/kotlin-gradle-plugin/src/testData/ClasspathChangesComputerTest/testMultipleClasses/src/java/previous-classpath/0/com/example/B.java +++ /dev/null @@ -1,7 +0,0 @@ -package com.example; - -public class B { - public int b1 = 0; - public int b2 = 0; - public int b3 = 0; -} diff --git a/libraries/tools/kotlin-gradle-plugin/src/testData/ClasspathChangesComputerTest/testMultipleClasses/src/java/previous-classpath/0/com/example/C.java b/libraries/tools/kotlin-gradle-plugin/src/testData/ClasspathChangesComputerTest/testMultipleClasses/src/java/previous-classpath/0/com/example/C.java deleted file mode 100644 index cb58175056b..00000000000 --- a/libraries/tools/kotlin-gradle-plugin/src/testData/ClasspathChangesComputerTest/testMultipleClasses/src/java/previous-classpath/0/com/example/C.java +++ /dev/null @@ -1,6 +0,0 @@ -package com.example; - -// To-be-removed class -public class C { - public int c = 0; -} diff --git a/libraries/tools/kotlin-gradle-plugin/src/testData/ClasspathChangesComputerTest/testMultipleClasses/src/kotlin/current-classpath/0/com/example/A.kt b/libraries/tools/kotlin-gradle-plugin/src/testData/ClasspathChangesComputerTest/testMultipleClasses/src/kotlin/current-classpath/0/com/example/A.kt deleted file mode 100644 index fe3ff84c843..00000000000 --- a/libraries/tools/kotlin-gradle-plugin/src/testData/ClasspathChangesComputerTest/testMultipleClasses/src/kotlin/current-classpath/0/com/example/A.kt +++ /dev/null @@ -1,9 +0,0 @@ -package com.example - -// Unchanged class -class A { - val a: Int = 0 -} - -// Unchanged top-level function -fun topLevelFuncA() {} diff --git a/libraries/tools/kotlin-gradle-plugin/src/testData/ClasspathChangesComputerTest/testMultipleClasses/src/kotlin/current-classpath/0/com/example/B.kt b/libraries/tools/kotlin-gradle-plugin/src/testData/ClasspathChangesComputerTest/testMultipleClasses/src/kotlin/current-classpath/0/com/example/B.kt deleted file mode 100644 index e7514c83f08..00000000000 --- a/libraries/tools/kotlin-gradle-plugin/src/testData/ClasspathChangesComputerTest/testMultipleClasses/src/kotlin/current-classpath/0/com/example/B.kt +++ /dev/null @@ -1,12 +0,0 @@ -package com.example - -// Modified class -public class B { - val b1: Int = 0 // Unchanged field - val b2: String = "" // Modified field - //val b3: Int = 0 // Removed field - val b4: Int = 0 // Added field -} - -// Modified top-level function -fun topLevelFuncB(): Int = 0 diff --git a/libraries/tools/kotlin-gradle-plugin/src/testData/ClasspathChangesComputerTest/testMultipleClasses/src/kotlin/current-classpath/0/com/example/D.kt b/libraries/tools/kotlin-gradle-plugin/src/testData/ClasspathChangesComputerTest/testMultipleClasses/src/kotlin/current-classpath/0/com/example/D.kt deleted file mode 100644 index 11f0fea4a63..00000000000 --- a/libraries/tools/kotlin-gradle-plugin/src/testData/ClasspathChangesComputerTest/testMultipleClasses/src/kotlin/current-classpath/0/com/example/D.kt +++ /dev/null @@ -1,12 +0,0 @@ -package com.example - -// Added class -public class D { - val d: Int = 0 -} - -// Added top-level function -fun topLevelFuncD() {} - -// Moved top-level function -fun topLevelFuncInCKtMovedToDKt() {} diff --git a/libraries/tools/kotlin-gradle-plugin/src/testData/ClasspathChangesComputerTest/testMultipleClasses/src/kotlin/previous-classpath/0/com/example/A.kt b/libraries/tools/kotlin-gradle-plugin/src/testData/ClasspathChangesComputerTest/testMultipleClasses/src/kotlin/previous-classpath/0/com/example/A.kt deleted file mode 100644 index f780796b9f4..00000000000 --- a/libraries/tools/kotlin-gradle-plugin/src/testData/ClasspathChangesComputerTest/testMultipleClasses/src/kotlin/previous-classpath/0/com/example/A.kt +++ /dev/null @@ -1,7 +0,0 @@ -package com.example - -class A { - val a: Int = 0 -} - -fun topLevelFuncA() {} diff --git a/libraries/tools/kotlin-gradle-plugin/src/testData/ClasspathChangesComputerTest/testMultipleClasses/src/kotlin/previous-classpath/0/com/example/B.kt b/libraries/tools/kotlin-gradle-plugin/src/testData/ClasspathChangesComputerTest/testMultipleClasses/src/kotlin/previous-classpath/0/com/example/B.kt deleted file mode 100644 index 73e28502dcf..00000000000 --- a/libraries/tools/kotlin-gradle-plugin/src/testData/ClasspathChangesComputerTest/testMultipleClasses/src/kotlin/previous-classpath/0/com/example/B.kt +++ /dev/null @@ -1,9 +0,0 @@ -package com.example - -public class B { - val b1: Int = 0 - val b2: Int = 0 - val b3: Int = 0 -} - -fun topLevelFuncB() {} diff --git a/libraries/tools/kotlin-gradle-plugin/src/testData/ClasspathChangesComputerTest/testMultipleClasses/src/kotlin/previous-classpath/0/com/example/C.kt b/libraries/tools/kotlin-gradle-plugin/src/testData/ClasspathChangesComputerTest/testMultipleClasses/src/kotlin/previous-classpath/0/com/example/C.kt deleted file mode 100644 index f902cb1b522..00000000000 --- a/libraries/tools/kotlin-gradle-plugin/src/testData/ClasspathChangesComputerTest/testMultipleClasses/src/kotlin/previous-classpath/0/com/example/C.kt +++ /dev/null @@ -1,12 +0,0 @@ -package com.example - -// To-be-removed class -public class C { - val c: Int = 0 -} - -// To-be-removed top-level function -fun topLevelFuncC() {} - -// To-be-moved top-level function -fun topLevelFuncInCKtMovedToDKt() {} diff --git a/libraries/tools/kotlin-gradle-plugin/src/testData/kotlin.incremental.useClasspathSnapshot/classes/changedMethodImplementation/com/example/SimpleKotlinClass.class b/libraries/tools/kotlin-gradle-plugin/src/testData/kotlin.incremental.useClasspathSnapshot/classes/changedMethodImplementation/com/example/SimpleKotlinClass.class deleted file mode 100644 index 502740f501ac1d8ce57f08ab74e9e296fe1aea16..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 893 zcmaJhKz2jlwr00U*%nf z!bz_gs^Epx?WFZrn#Q|S%g9E7)RUfOSg4O`P>KJ#t76^IT`8j70xn=Ck7*Pc)(!J& zVVbyoq2;go7i;U0r(#cdLWm0|wTi_^C2p zl~8M&;r?(?a(S7%yf_@V+%bT=!$EmC*x^<7B>U}sjw1U`(OTx!%rm~9D`pKc_jj04 zo&V=yw>mV{%wE!x3^R2V%a^^VDZ2-v8B(NFPXZAhimo#LIOsN#UN?|Wm0>Ks>BU+_ z@=&FUD39YfIU9D0ZE*SsW?7V){sq}h@_f@C?b*%Ga6S;=xJA|+8|rPcg);*3aLJp+ z)bGpph;4ZJkC-jZeZtZo0hf*}B08|oiR8y3B`i-CxjaF{C6TEKA{=)pH^&CHXn#nR rtWaZDj$qZWT7y@^8md diff --git a/libraries/tools/kotlin-gradle-plugin/src/testData/kotlin.incremental.useClasspathSnapshot/classes/changedPublicMethodSignature/com/example/SimpleKotlinClass.class b/libraries/tools/kotlin-gradle-plugin/src/testData/kotlin.incremental.useClasspathSnapshot/classes/changedPublicMethodSignature/com/example/SimpleKotlinClass.class deleted file mode 100644 index ec49c752f9320821f4c8462b83b73438245b940d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 883 zcmaJ&lO|*%TirR?bg{NVe$dtV_>_F-pzr}x` z51RO3h>!j#;~A)Jjl_L8xB1TZoinpPe|`H7;67Z2H7^QWc_M;iU%GW=+{;M&D%|%) z9NS~=NtBMqtfgQ~n?`~3rZn4FV6cx3n;()ud7^M(*^1e23Cj)^vBEG**n!aU&$!Fy zf|G+Y#mfx&T6cVxE}=zRXhB=^U|`YZGhLOi|?^m9vU`CvlL@C5?Z?$Zk>Qn)S#hx4t6%i2{y0WX-XG-X)uz0FZ%0SspWI%?}7|aGB4@7v{fU z^_;+=Ba47(*cV7Lrz8awr;}WnLgEm~%oGxid!)^=iEZ+aX_7Ts>}nHM73)=$s87UMQHnn=ZPVw7VO%#4HLZ_MAYnE(I) diff --git a/libraries/tools/kotlin-gradle-plugin/src/testData/kotlin.incremental.useClasspathSnapshot/classes/original/com/example/SimpleKotlinClass.class b/libraries/tools/kotlin-gradle-plugin/src/testData/kotlin.incremental.useClasspathSnapshot/classes/original/com/example/SimpleKotlinClass.class deleted file mode 100644 index 83b86e6a5e00fd86d2d001e889012564dfc6d332..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 876 zcmaJKV#PpGh7&dDERjx2( zdV`jy+ApO(3Oj$<)IUU8`ZhA89u73aQf+bu6}oTwD$sS^m%^`Pa0&A%%puFLT;24G zDkzHLRJG_&WRu7*_3a?g%9jllDWW_Lf=~;s!XUyfIK8|1 zEV8EGfZ{e~t{IQk`1V&MKM~-#L(yy->RpPNDFG=sl;w~vtLFj^ zZCON2!oDDqIu*%dZMMjj86pmeq-Th5+#_#}E$q^#% diff --git a/libraries/tools/kotlin-gradle-plugin/src/testData/kotlin.incremental.useClasspathSnapshot/src/original/com/example/SimpleJavaClass-expected-snapshot.json b/libraries/tools/kotlin-gradle-plugin/src/testData/kotlin.incremental.useClasspathSnapshot/src/original/com/example/SimpleJavaClass-expected-snapshot.json deleted file mode 100644 index eaa4f78a567..00000000000 --- a/libraries/tools/kotlin-gradle-plugin/src/testData/kotlin.incremental.useClasspathSnapshot/src/original/com/example/SimpleJavaClass-expected-snapshot.json +++ /dev/null @@ -1,697 +0,0 @@ -{ - "serializedJavaClass": { - "proto": { - "unknownFields": { - "bytes": [], - "hash": 0 - }, - "bitField0_": 3, - "flags_": 22, - "fqName_": 2, - "companionObjectName_": 0, - "typeParameter_": [], - "supertype_": [ - { - "unknownFields": { - "bytes": [], - "hash": 0 - }, - "bitField0_": 16, - "argument_": [], - "nullable_": false, - "flexibleTypeCapabilitiesId_": 0, - "flexibleUpperBound_": { - "unknownFields": { - "bytes": [], - "hash": 0 - }, - "bitField0_": 0, - "argument_": [], - "nullable_": false, - "flexibleTypeCapabilitiesId_": 0, - "flexibleUpperBoundId_": 0, - "className_": 0, - "typeParameter_": 0, - "typeParameterName_": 0, - "typeAliasName_": 0, - "outerTypeId_": 0, - "abbreviatedTypeId_": 0, - "flags_": 0, - "memoizedIsInitialized": -1, - "memoizedSerializedSize": -1, - "extensions": { - "fields": {}, - "isImmutable": false, - "hasLazyField": false - }, - "memoizedHashCode": 0 - }, - "flexibleUpperBoundId_": 0, - "className_": 5, - "typeParameter_": 0, - "typeParameterName_": 0, - "typeAliasName_": 0, - "outerType_": { - "unknownFields": { - "bytes": [], - "hash": 0 - }, - "bitField0_": 0, - "argument_": [], - "nullable_": false, - "flexibleTypeCapabilitiesId_": 0, - "flexibleUpperBoundId_": 0, - "className_": 0, - "typeParameter_": 0, - "typeParameterName_": 0, - "typeAliasName_": 0, - "outerTypeId_": 0, - "abbreviatedTypeId_": 0, - "flags_": 0, - "memoizedIsInitialized": -1, - "memoizedSerializedSize": -1, - "extensions": { - "fields": {}, - "isImmutable": false, - "hasLazyField": false - }, - "memoizedHashCode": 0 - }, - "outerTypeId_": 0, - "abbreviatedType_": { - "unknownFields": { - "bytes": [], - "hash": 0 - }, - "bitField0_": 0, - "argument_": [], - "nullable_": false, - "flexibleTypeCapabilitiesId_": 0, - "flexibleUpperBoundId_": 0, - "className_": 0, - "typeParameter_": 0, - "typeParameterName_": 0, - "typeAliasName_": 0, - "outerTypeId_": 0, - "abbreviatedTypeId_": 0, - "flags_": 0, - "memoizedIsInitialized": -1, - "memoizedSerializedSize": -1, - "extensions": { - "fields": {}, - "isImmutable": false, - "hasLazyField": false - }, - "memoizedHashCode": 0 - }, - "abbreviatedTypeId_": 0, - "flags_": 0, - "memoizedIsInitialized": 1, - "memoizedSerializedSize": -1, - "extensions": { - "fields": {}, - "isImmutable": true, - "hasLazyField": false - }, - "memoizedHashCode": 0 - } - ], - "supertypeId_": [], - "supertypeIdMemoizedSerializedSize": -1, - "nestedClassName_": [], - "nestedClassNameMemoizedSerializedSize": -1, - "constructor_": [ - { - "unknownFields": { - "bytes": [], - "hash": 0 - }, - "bitField0_": 1, - "flags_": 54, - "valueParameter_": [], - "versionRequirement_": [], - "memoizedIsInitialized": 1, - "memoizedSerializedSize": -1, - "extensions": { - "fields": {}, - "isImmutable": true, - "hasLazyField": false - }, - "memoizedHashCode": 0 - } - ], - "function_": [ - { - "unknownFields": { - "bytes": [], - "hash": 0 - }, - "bitField0_": 13, - "flags_": 32786, - "oldFlags_": 6, - "name_": 6, - "returnType_": { - "unknownFields": { - "bytes": [], - "hash": 0 - }, - "bitField0_": 16, - "argument_": [], - "nullable_": false, - "flexibleTypeCapabilitiesId_": 0, - "flexibleUpperBound_": { - "unknownFields": { - "bytes": [], - "hash": 0 - }, - "bitField0_": 0, - "argument_": [], - "nullable_": false, - "flexibleTypeCapabilitiesId_": 0, - "flexibleUpperBoundId_": 0, - "className_": 0, - "typeParameter_": 0, - "typeParameterName_": 0, - "typeAliasName_": 0, - "outerTypeId_": 0, - "abbreviatedTypeId_": 0, - "flags_": 0, - "memoizedIsInitialized": -1, - "memoizedSerializedSize": -1, - "extensions": { - "fields": {}, - "isImmutable": false, - "hasLazyField": false - }, - "memoizedHashCode": 0 - }, - "flexibleUpperBoundId_": 0, - "className_": 7, - "typeParameter_": 0, - "typeParameterName_": 0, - "typeAliasName_": 0, - "outerType_": { - "unknownFields": { - "bytes": [], - "hash": 0 - }, - "bitField0_": 0, - "argument_": [], - "nullable_": false, - "flexibleTypeCapabilitiesId_": 0, - "flexibleUpperBoundId_": 0, - "className_": 0, - "typeParameter_": 0, - "typeParameterName_": 0, - "typeAliasName_": 0, - "outerTypeId_": 0, - "abbreviatedTypeId_": 0, - "flags_": 0, - "memoizedIsInitialized": -1, - "memoizedSerializedSize": -1, - "extensions": { - "fields": {}, - "isImmutable": false, - "hasLazyField": false - }, - "memoizedHashCode": 0 - }, - "outerTypeId_": 0, - "abbreviatedType_": { - "unknownFields": { - "bytes": [], - "hash": 0 - }, - "bitField0_": 0, - "argument_": [], - "nullable_": false, - "flexibleTypeCapabilitiesId_": 0, - "flexibleUpperBoundId_": 0, - "className_": 0, - "typeParameter_": 0, - "typeParameterName_": 0, - "typeAliasName_": 0, - "outerTypeId_": 0, - "abbreviatedTypeId_": 0, - "flags_": 0, - "memoizedIsInitialized": -1, - "memoizedSerializedSize": -1, - "extensions": { - "fields": {}, - "isImmutable": false, - "hasLazyField": false - }, - "memoizedHashCode": 0 - }, - "abbreviatedTypeId_": 0, - "flags_": 0, - "memoizedIsInitialized": 1, - "memoizedSerializedSize": -1, - "extensions": { - "fields": {}, - "isImmutable": true, - "hasLazyField": false - }, - "memoizedHashCode": 0 - }, - "returnTypeId_": 0, - "typeParameter_": [], - "receiverType_": { - "unknownFields": { - "bytes": [], - "hash": 0 - }, - "bitField0_": 0, - "argument_": [], - "nullable_": false, - "flexibleTypeCapabilitiesId_": 0, - "flexibleUpperBoundId_": 0, - "className_": 0, - "typeParameter_": 0, - "typeParameterName_": 0, - "typeAliasName_": 0, - "outerTypeId_": 0, - "abbreviatedTypeId_": 0, - "flags_": 0, - "memoizedIsInitialized": -1, - "memoizedSerializedSize": -1, - "extensions": { - "fields": {}, - "isImmutable": false, - "hasLazyField": false - }, - "memoizedHashCode": 0 - }, - "receiverTypeId_": 0, - "valueParameter_": [], - "typeTable_": { - "unknownFields": { - "bytes": [], - "hash": 0 - }, - "bitField0_": 0, - "type_": [], - "firstNullable_": -1, - "memoizedIsInitialized": -1, - "memoizedSerializedSize": -1, - "memoizedHashCode": 0 - }, - "versionRequirement_": [], - "contract_": { - "unknownFields": { - "bytes": [], - "hash": 0 - }, - "effect_": [], - "memoizedIsInitialized": -1, - "memoizedSerializedSize": -1, - "memoizedHashCode": 0 - }, - "memoizedIsInitialized": 1, - "memoizedSerializedSize": -1, - "extensions": { - "fields": {}, - "isImmutable": true, - "hasLazyField": false - }, - "memoizedHashCode": 0 - }, - { - "unknownFields": { - "bytes": [], - "hash": 0 - }, - "bitField0_": 13, - "flags_": 32790, - "oldFlags_": 6, - "name_": 9, - "returnType_": { - "unknownFields": { - "bytes": [], - "hash": 0 - }, - "bitField0_": 16, - "argument_": [], - "nullable_": false, - "flexibleTypeCapabilitiesId_": 0, - "flexibleUpperBound_": { - "unknownFields": { - "bytes": [], - "hash": 0 - }, - "bitField0_": 0, - "argument_": [], - "nullable_": false, - "flexibleTypeCapabilitiesId_": 0, - "flexibleUpperBoundId_": 0, - "className_": 0, - "typeParameter_": 0, - "typeParameterName_": 0, - "typeAliasName_": 0, - "outerTypeId_": 0, - "abbreviatedTypeId_": 0, - "flags_": 0, - "memoizedIsInitialized": -1, - "memoizedSerializedSize": -1, - "extensions": { - "fields": {}, - "isImmutable": false, - "hasLazyField": false - }, - "memoizedHashCode": 0 - }, - "flexibleUpperBoundId_": 0, - "className_": 7, - "typeParameter_": 0, - "typeParameterName_": 0, - "typeAliasName_": 0, - "outerType_": { - "unknownFields": { - "bytes": [], - "hash": 0 - }, - "bitField0_": 0, - "argument_": [], - "nullable_": false, - "flexibleTypeCapabilitiesId_": 0, - "flexibleUpperBoundId_": 0, - "className_": 0, - "typeParameter_": 0, - "typeParameterName_": 0, - "typeAliasName_": 0, - "outerTypeId_": 0, - "abbreviatedTypeId_": 0, - "flags_": 0, - "memoizedIsInitialized": -1, - "memoizedSerializedSize": -1, - "extensions": { - "fields": {}, - "isImmutable": false, - "hasLazyField": false - }, - "memoizedHashCode": 0 - }, - "outerTypeId_": 0, - "abbreviatedType_": { - "unknownFields": { - "bytes": [], - "hash": 0 - }, - "bitField0_": 0, - "argument_": [], - "nullable_": false, - "flexibleTypeCapabilitiesId_": 0, - "flexibleUpperBoundId_": 0, - "className_": 0, - "typeParameter_": 0, - "typeParameterName_": 0, - "typeAliasName_": 0, - "outerTypeId_": 0, - "abbreviatedTypeId_": 0, - "flags_": 0, - "memoizedIsInitialized": -1, - "memoizedSerializedSize": -1, - "extensions": { - "fields": {}, - "isImmutable": false, - "hasLazyField": false - }, - "memoizedHashCode": 0 - }, - "abbreviatedTypeId_": 0, - "flags_": 0, - "memoizedIsInitialized": 1, - "memoizedSerializedSize": -1, - "extensions": { - "fields": {}, - "isImmutable": true, - "hasLazyField": false - }, - "memoizedHashCode": 0 - }, - "returnTypeId_": 0, - "typeParameter_": [], - "receiverType_": { - "unknownFields": { - "bytes": [], - "hash": 0 - }, - "bitField0_": 0, - "argument_": [], - "nullable_": false, - "flexibleTypeCapabilitiesId_": 0, - "flexibleUpperBoundId_": 0, - "className_": 0, - "typeParameter_": 0, - "typeParameterName_": 0, - "typeAliasName_": 0, - "outerTypeId_": 0, - "abbreviatedTypeId_": 0, - "flags_": 0, - "memoizedIsInitialized": -1, - "memoizedSerializedSize": -1, - "extensions": { - "fields": {}, - "isImmutable": false, - "hasLazyField": false - }, - "memoizedHashCode": 0 - }, - "receiverTypeId_": 0, - "valueParameter_": [], - "typeTable_": { - "unknownFields": { - "bytes": [], - "hash": 0 - }, - "bitField0_": 0, - "type_": [], - "firstNullable_": -1, - "memoizedIsInitialized": -1, - "memoizedSerializedSize": -1, - "memoizedHashCode": 0 - }, - "versionRequirement_": [], - "contract_": { - "unknownFields": { - "bytes": [], - "hash": 0 - }, - "effect_": [], - "memoizedIsInitialized": -1, - "memoizedSerializedSize": -1, - "memoizedHashCode": 0 - }, - "memoizedIsInitialized": 1, - "memoizedSerializedSize": -1, - "extensions": { - "fields": {}, - "isImmutable": true, - "hasLazyField": false - }, - "memoizedHashCode": 0 - } - ], - "property_": [], - "typeAlias_": [], - "enumEntry_": [], - "sealedSubclassFqName_": [], - "sealedSubclassFqNameMemoizedSerializedSize": -1, - "inlineClassUnderlyingPropertyName_": 0, - "inlineClassUnderlyingType_": { - "unknownFields": { - "bytes": [], - "hash": 0 - }, - "bitField0_": 0, - "argument_": [], - "nullable_": false, - "flexibleTypeCapabilitiesId_": 0, - "flexibleUpperBoundId_": 0, - "className_": 0, - "typeParameter_": 0, - "typeParameterName_": 0, - "typeAliasName_": 0, - "outerTypeId_": 0, - "abbreviatedTypeId_": 0, - "flags_": 0, - "memoizedIsInitialized": -1, - "memoizedSerializedSize": -1, - "extensions": { - "fields": {}, - "isImmutable": false, - "hasLazyField": false - }, - "memoizedHashCode": 0 - }, - "inlineClassUnderlyingTypeId_": 0, - "typeTable_": { - "unknownFields": { - "bytes": [], - "hash": 0 - }, - "bitField0_": 0, - "type_": [], - "firstNullable_": -1, - "memoizedIsInitialized": -1, - "memoizedSerializedSize": -1, - "memoizedHashCode": 0 - }, - "versionRequirement_": [], - "versionRequirementTable_": { - "unknownFields": { - "bytes": [], - "hash": 0 - }, - "requirement_": [], - "memoizedIsInitialized": -1, - "memoizedSerializedSize": -1, - "memoizedHashCode": 0 - }, - "memoizedIsInitialized": 1, - "memoizedSerializedSize": -1, - "extensions": { - "fields": {}, - "isImmutable": true, - "hasLazyField": false - }, - "memoizedHashCode": 0 - }, - "stringTable": { - "unknownFields": { - "bytes": [], - "hash": 0 - }, - "string_": [ - "com", - "example", - "SimpleJavaClass", - "java", - "lang", - "Object", - "privateMethod", - "kotlin", - "Unit", - "publicMethod" - ], - "memoizedIsInitialized": 1, - "memoizedSerializedSize": -1, - "memoizedHashCode": 0 - }, - "qualifiedNameTable": { - "unknownFields": { - "bytes": [], - "hash": 0 - }, - "qualifiedName_": [ - { - "unknownFields": { - "bytes": [], - "hash": 0 - }, - "bitField0_": 2, - "parentQualifiedName_": -1, - "shortName_": 0, - "kind_": "PACKAGE", - "memoizedIsInitialized": 1, - "memoizedSerializedSize": -1, - "memoizedHashCode": 0 - }, - { - "unknownFields": { - "bytes": [], - "hash": 0 - }, - "bitField0_": 3, - "parentQualifiedName_": 0, - "shortName_": 1, - "kind_": "PACKAGE", - "memoizedIsInitialized": 1, - "memoizedSerializedSize": -1, - "memoizedHashCode": 0 - }, - { - "unknownFields": { - "bytes": [], - "hash": 0 - }, - "bitField0_": 7, - "parentQualifiedName_": 1, - "shortName_": 2, - "kind_": "CLASS", - "memoizedIsInitialized": 1, - "memoizedSerializedSize": -1, - "memoizedHashCode": 0 - }, - { - "unknownFields": { - "bytes": [], - "hash": 0 - }, - "bitField0_": 2, - "parentQualifiedName_": -1, - "shortName_": 3, - "kind_": "PACKAGE", - "memoizedIsInitialized": 1, - "memoizedSerializedSize": -1, - "memoizedHashCode": 0 - }, - { - "unknownFields": { - "bytes": [], - "hash": 0 - }, - "bitField0_": 3, - "parentQualifiedName_": 3, - "shortName_": 4, - "kind_": "PACKAGE", - "memoizedIsInitialized": 1, - "memoizedSerializedSize": -1, - "memoizedHashCode": 0 - }, - { - "unknownFields": { - "bytes": [], - "hash": 0 - }, - "bitField0_": 7, - "parentQualifiedName_": 4, - "shortName_": 5, - "kind_": "CLASS", - "memoizedIsInitialized": 1, - "memoizedSerializedSize": -1, - "memoizedHashCode": 0 - }, - { - "unknownFields": { - "bytes": [], - "hash": 0 - }, - "bitField0_": 2, - "parentQualifiedName_": -1, - "shortName_": 7, - "kind_": "PACKAGE", - "memoizedIsInitialized": 1, - "memoizedSerializedSize": -1, - "memoizedHashCode": 0 - }, - { - "unknownFields": { - "bytes": [], - "hash": 0 - }, - "bitField0_": 7, - "parentQualifiedName_": 6, - "shortName_": 8, - "kind_": "CLASS", - "memoizedIsInitialized": 1, - "memoizedSerializedSize": -1, - "memoizedHashCode": 0 - } - ], - "memoizedIsInitialized": 1, - "memoizedSerializedSize": -1, - "memoizedHashCode": 0 - } - } -} \ No newline at end of file diff --git a/libraries/tools/kotlin-gradle-plugin/src/testData/kotlin.incremental.useClasspathSnapshot/src/original/com/example/SimpleKotlinClass-expected-snapshot.json b/libraries/tools/kotlin-gradle-plugin/src/testData/kotlin.incremental.useClasspathSnapshot/src/original/com/example/SimpleKotlinClass-expected-snapshot.json deleted file mode 100644 index a199d90e710..00000000000 --- a/libraries/tools/kotlin-gradle-plugin/src/testData/kotlin.incremental.useClasspathSnapshot/src/original/com/example/SimpleKotlinClass-expected-snapshot.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "classInfo": { - "classId": { - "packageFqName": { - "fqName": { - "fqName": "com.example" - } - }, - "relativeClassName": { - "fqName": { - "fqName": "SimpleKotlinClass" - } - }, - "local": false - }, - "classKind": "CLASS", - "classHeaderData": [ - "\u0000\u0012\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0010\u0002\n\u0000\u0018\u00002\u00020\u0001B\u0005¢\u0006\u0002\u0010\u0002J\b\u0010\u0003\u001a\u00020\u0004H\u0002J\u0006\u0010\u0005\u001a\u00020\u0004" - ], - "classHeaderStrings": [ - "Lcom/example/SimpleKotlinClass;", - "", - "()V", - "privateMethod", - "", - "publicMethod" - ], - "constantsMap": {}, - "inlineFunctionsMap": {}, - "className$delegate": { - "initializer": {}, - "_value": {} - } - } -} \ No newline at end of file diff --git a/libraries/tools/kotlin-gradle-plugin/src/testData/kotlin.incremental.useClasspathSnapshot/src/original/com/example/SimpleKotlinClass.kt b/libraries/tools/kotlin-gradle-plugin/src/testData/kotlin.incremental.useClasspathSnapshot/src/original/com/example/SimpleKotlinClass.kt deleted file mode 100644 index 00e00af258f..00000000000 --- a/libraries/tools/kotlin-gradle-plugin/src/testData/kotlin.incremental.useClasspathSnapshot/src/original/com/example/SimpleKotlinClass.kt +++ /dev/null @@ -1,12 +0,0 @@ -package com.example - -class SimpleKotlinClass { - - fun publicMethod() { - println("I'm in a public method") - } - - private fun privateMethod() { - println("I'm in a private method") - } -} diff --git a/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinAndJava/classes/current-classpath/0/com/example/ChangedKotlinSuperClass.class b/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinAndJava/classes/current-classpath/0/com/example/ChangedKotlinSuperClass.class new file mode 100644 index 0000000000000000000000000000000000000000..d210531b0760f8b94c14a69272c94115a808f9ac GIT binary patch literal 921 zcma))-)a*<6vn^V-E20Sm~LXMY3jdPt8GEI7VoNpMhdC1N+U(+)nqfIlWum)?xfVa zT=^hAfr27Qa8h}IQqa_Q+2mF1Q5 zhft->IO+O5q1p+TQR?$3iWOHfCVx9t+k-G9;@OQi2T`DN45jA5_&xj=Lh%k)oK!~t z$fOr!db0Hd26jN}$5KaYdY>kE$*Qgq<;f;o_;b^Bw)^uj8qv5)-#-3(Q-rI&} zY}sD6W~^B|70=Z6&B?oGlyThAux2?K&(_3shT1<`bnieh%8x=(k1knv+JiBo27E%M+>N$)eke2T33{rB=*Mz`N(LSfIXH0BMUO~JKLh#IFK|}N?q?J~QfOe2<|2vp28)JE_7+7NM{>-- zBU_?TCbdTSl+n4&>L(OGkaG&rCxHOd&6&yO1zJD5RSA_}pt}>0S$6-#WPZb#f58}7 z8XtTEx5?HCbcu?c-GkY{>^HK&~A_iS>(3^)eBz&ezFl!lckYV9%P2YuJIvR3j2{p_H>Zix;F zW-TMyXW00$&Y!kuV&VTicRQN=mBW@`n5oJ@T*ZDvM7O-*QD(jxHn~^lku-dmbZcQ8 zHN}}Uirh^cXz7c(RFWhoK@e)LWf&;z!J_jGJ(_Eh*DTSZ@l1be`vv3A6j;a+nlfNx zl`!)yzy#c+zLww$*6BZ>+9b8h+`+D3s)FeXW-v=3<|>%S!X22xB9^GG;3_ODIA6v* BhV}pe literal 0 HcmV?d00001 diff --git a/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinAndJava/classes/current-classpath/0/com/example/KotlinSubClassOfKotlinSuperClass.class b/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinAndJava/classes/current-classpath/0/com/example/KotlinSubClassOfKotlinSuperClass.class new file mode 100644 index 0000000000000000000000000000000000000000..7b930ba928ff35016597f10b31541990b484fc60 GIT binary patch literal 584 zcmah_O-n*S6g~4^zUpPEeQM=Of{M_Lc12J^AX!0%8&{)FHTXWn8N;Q&rGL;WXc5w~ z9~IqsB^V(s=FGk4p1Jp)`S^T&18|5e!(KD=3!=~cjwcEiq4s1@?KMgsSL*t1ly^io zVy3|ua^o*b4?MURt-nH>!8w+J)F%w~_D(I17#tT?IOJCHak|a3|f>3iU!$6@3i$3wkr}m+t literal 0 HcmV?d00001 diff --git a/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinAndJava/classes/current-classpath/0/com/example/UnimpactedKotlinClass.class b/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinAndJava/classes/current-classpath/0/com/example/UnimpactedKotlinClass.class new file mode 100644 index 0000000000000000000000000000000000000000..347d5aefc735723bcf01516c0500d99a4d144b2e GIT binary patch literal 496 zcmah_%Sr=55UiO^Ho8WW_)L6(cu^0oiZ?}2K?p_#AGvs%YzCcVcQ#}u!DGI~Kky`Y zkl@je5__UY!Ao^_RZmZKe}28a1K7t3!&;Okp?nfaCzj!zR!K)hRyNO58!LSp3uAI% z48@k{i!c`YA-rm|WMp&j82m$}l|5qcHa6>dWZ?(MAjgogkIFEt*Z!S;z)-5SN56#^ z(u$_Af;gV^J+jCg_zu9p+QdI8SM5;N++|oD4uXJ}dBBU54F~1nV2|&xlkCT{&x_o3 z?J@VZ{O4-hZA)HH)23u7)RdN&y`&+#x1tdfGhIs~5!Xdmx%!t3Zqi;il4r_wRIYp4 zszlb6QPgs*b!vrGsW#XJr&IhIcb9P{s0`gA6ti2e7<-|FqeAFpz{4V8{-*)s2uAwS r2p6zSai6pa8kfI^SH)x%Q&kjDq!gtprZIC5W-yC6(hUNGc?16&Q%z~e literal 0 HcmV?d00001 diff --git a/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinAndJava/classes/previous-classpath/0/com/example/ChangedKotlinSuperClass.class b/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinAndJava/classes/previous-classpath/0/com/example/ChangedKotlinSuperClass.class new file mode 100644 index 0000000000000000000000000000000000000000..a4292654b5f2360072899f9e163a43fd14572410 GIT binary patch literal 771 zcma)3U279T6g{)M*=)9{-Nahc_*tvq2e`5LrU)7dtj1be2|}JGo1vX%vs-p1rM~6K zAL6qwf*|-Hp^yG3@y<5bDhj^bd+z6%d*=I(uipSX#7&0vI2(uJh>s5v5w`bux+{h+ zGo8qEXL2C&cEXh^gE0jA{E&wUHH5DR`y$q5*bMGtnM(bH!M=T`S49b~4+muiNAF3+ zaI5vzS@h+!!{dDUs2MO7@~Tm=@EPV1dX8f%%Q47Kj4xFCEb zG#_%!iNG2k+H^BB#x({EY()7ZX`&XP;RA-v*|gzX4a>KJ+0?f@13dCJdCOaA%%&Sw zi#;nHe{d=B!VStztL1Gk2R3=~6>G52ec%JlkvPm9`jx-&s+mlqwvFJ%9spV;!W||ur6xK)| zr#Q53gM YT*Bo(Dhj^B6$Mveu>cDSRfQVipNuDtvH$=8 literal 0 HcmV?d00001 diff --git a/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinAndJava/classes/previous-classpath/0/com/example/KotlinSubClassOfJavaSuperClass.class b/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinAndJava/classes/previous-classpath/0/com/example/KotlinSubClassOfJavaSuperClass.class new file mode 100644 index 0000000000000000000000000000000000000000..2edba3af041a89af05348481b03fcf20ff0956a6 GIT binary patch literal 574 zcmaJ-%Sr=55UklX8(ri3m8dxcFDhc9cvA!o2+^ouBo|MUWHdwe5q4&S$9#)_;7RZx z!J{7~_N+NX5f4+-)m?OV^~dMy8-N4k8Md3DUlfnr?|Pzm5o%8cwYX9CxKh{m=e);j zaaTkMPlGWOM)l=34<1D8x6Ed6j$|P9F@wFiRnH&=$Hf@Z3}d=26~j(-w9o%@4;kjF zon*D*rO>>^HK&~A_iS>(3^)eBz&ezFl!lckYV9%P2YuJIvR3j2{p_H>Zix;F zW-TMyXW00$&Y!kuV&VTicRQN=mBW@`n5oJ@T*ZDvM7O-*QD(jxHn~^lku-dmbZcQ8 zHN}}Uirh^cXz7c(RFWhoK@e)LWf&;z!J_jGJ(_Eh*DTSZ@l1be`vv3A6j;a+nlfNx zl`!)yzy#c+zLww$*6BZ>+9b8h+`+D3s)FeXW-v=3<|>%S!X22xB9^GG;3_ODIA6v* BhV}pe literal 0 HcmV?d00001 diff --git a/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinAndJava/classes/previous-classpath/0/com/example/KotlinSubClassOfKotlinSuperClass.class b/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinAndJava/classes/previous-classpath/0/com/example/KotlinSubClassOfKotlinSuperClass.class new file mode 100644 index 0000000000000000000000000000000000000000..7b930ba928ff35016597f10b31541990b484fc60 GIT binary patch literal 584 zcmah_O-n*S6g~4^zUpPEeQM=Of{M_Lc12J^AX!0%8&{)FHTXWn8N;Q&rGL;WXc5w~ z9~IqsB^V(s=FGk4p1Jp)`S^T&18|5e!(KD=3!=~cjwcEiq4s1@?KMgsSL*t1ly^io zVy3|ua^o*b4?MURt-nH>!8w+J)F%w~_D(I17#tT?IOJCHak|a3|f>3iU!$6@3i$3wkr}m+t literal 0 HcmV?d00001 diff --git a/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinAndJava/classes/previous-classpath/0/com/example/UnimpactedKotlinClass.class b/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinAndJava/classes/previous-classpath/0/com/example/UnimpactedKotlinClass.class new file mode 100644 index 0000000000000000000000000000000000000000..347d5aefc735723bcf01516c0500d99a4d144b2e GIT binary patch literal 496 zcmah_%Sr=55UiO^Ho8WW_)L6(cu^0oiZ?}2K?p_#AGvs%YzCcVcQ#}u!DGI~Kky`Y zkl@je5__UY!Ao^_RZmZKe}28a1K7t3!&;Okp?nfaCzj!zR!K)hRyNO58!LSp3uAI% z48@k{i!c`YA-rm|WMp&j82m$}l|5qcHa6>dWZ?(MAjgogkIFEt*Z!S;z)-5SN56#^ z(u$_Af;gV^J+jCg_zu9p+QdI8SM5;N++|oD4uXJ}dBBU54F~1nV2|&xlkCT{&x_o3 z?J@VZ{O4-hZA)HH)23u7)RdN&y`&+#x1tdfGhIs~5!Xdmx%!t3Zqi;il4r_wRIYp4 zszlb6QPgs*b!vrGsW#XJr&IhIcb9P{s0`gA6ti2e7<-|FqeAFpz{4V8{-*)s2uAwS r2p6zSai6pa8kfI^SH)x%Q&kjDq!gtprZIC5W-yC6(hUNGc?16&Q%z~e literal 0 HcmV?d00001 diff --git a/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinAndJava/src/current-classpath/0/com/example/ChangedJavaSuperClass.java b/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinAndJava/src/current-classpath/0/com/example/ChangedJavaSuperClass.java new file mode 100644 index 00000000000..c61fefd0749 --- /dev/null +++ b/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinAndJava/src/current-classpath/0/com/example/ChangedJavaSuperClass.java @@ -0,0 +1,10 @@ +package com.example; + +public class ChangedJavaSuperClass { + + public String changedField = ""; + + public String changedMethod() { + return ""; + } +} \ No newline at end of file diff --git a/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinAndJava/src/current-classpath/0/com/example/ChangedKotlinSuperClass.kt b/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinAndJava/src/current-classpath/0/com/example/ChangedKotlinSuperClass.kt new file mode 100644 index 00000000000..1755587336a --- /dev/null +++ b/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinAndJava/src/current-classpath/0/com/example/ChangedKotlinSuperClass.kt @@ -0,0 +1,6 @@ +package com.example; + +open class ChangedKotlinSuperClass { + val changedProperty = "" + fun changedFunction() = "" +} \ No newline at end of file diff --git a/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinAndJava/src/current-classpath/0/com/example/JavaSubClassOfJavaSuperClass.java b/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinAndJava/src/current-classpath/0/com/example/JavaSubClassOfJavaSuperClass.java new file mode 100644 index 00000000000..595bf203e9a --- /dev/null +++ b/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinAndJava/src/current-classpath/0/com/example/JavaSubClassOfJavaSuperClass.java @@ -0,0 +1,4 @@ +package com.example; + +public class JavaSubClassOfJavaSuperClass extends ChangedJavaSuperClass { +} \ No newline at end of file diff --git a/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinAndJava/src/current-classpath/0/com/example/JavaSubClassOfKotlinSuperClass.java b/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinAndJava/src/current-classpath/0/com/example/JavaSubClassOfKotlinSuperClass.java new file mode 100644 index 00000000000..c8a1fba1a32 --- /dev/null +++ b/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinAndJava/src/current-classpath/0/com/example/JavaSubClassOfKotlinSuperClass.java @@ -0,0 +1,4 @@ +package com.example; + +public class JavaSubClassOfKotlinSuperClass extends ChangedKotlinSuperClass { +} \ No newline at end of file diff --git a/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinAndJava/src/current-classpath/0/com/example/KotlinSubClassOfJavaSuperClass.kt b/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinAndJava/src/current-classpath/0/com/example/KotlinSubClassOfJavaSuperClass.kt new file mode 100644 index 00000000000..2f672bf834a --- /dev/null +++ b/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinAndJava/src/current-classpath/0/com/example/KotlinSubClassOfJavaSuperClass.kt @@ -0,0 +1,3 @@ +package com.example + +class KotlinSubClassOfJavaSuperClass : ChangedJavaSuperClass() \ No newline at end of file diff --git a/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinAndJava/src/current-classpath/0/com/example/KotlinSubClassOfKotlinSuperClass.kt b/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinAndJava/src/current-classpath/0/com/example/KotlinSubClassOfKotlinSuperClass.kt new file mode 100644 index 00000000000..30ada7218e5 --- /dev/null +++ b/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinAndJava/src/current-classpath/0/com/example/KotlinSubClassOfKotlinSuperClass.kt @@ -0,0 +1,3 @@ +package com.example + +class KotlinSubClassOfKotlinSuperClass : ChangedKotlinSuperClass() \ No newline at end of file diff --git a/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinAndJava/src/current-classpath/0/com/example/UnimpactedJavaClass.java b/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinAndJava/src/current-classpath/0/com/example/UnimpactedJavaClass.java new file mode 100644 index 00000000000..67180f2d20c --- /dev/null +++ b/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinAndJava/src/current-classpath/0/com/example/UnimpactedJavaClass.java @@ -0,0 +1,4 @@ +package com.example; + +public class UnimpactedJavaClass { +} \ No newline at end of file diff --git a/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinAndJava/src/current-classpath/0/com/example/UnimpactedKotlinClass.kt b/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinAndJava/src/current-classpath/0/com/example/UnimpactedKotlinClass.kt new file mode 100644 index 00000000000..c61d34e27a8 --- /dev/null +++ b/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinAndJava/src/current-classpath/0/com/example/UnimpactedKotlinClass.kt @@ -0,0 +1,3 @@ +package com.example + +class UnimpactedKotlinClass \ No newline at end of file diff --git a/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinAndJava/src/previous-classpath/0/com/example/ChangedJavaSuperClass.java b/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinAndJava/src/previous-classpath/0/com/example/ChangedJavaSuperClass.java new file mode 100644 index 00000000000..cb764c10053 --- /dev/null +++ b/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinAndJava/src/previous-classpath/0/com/example/ChangedJavaSuperClass.java @@ -0,0 +1,9 @@ +package com.example; + +public class ChangedJavaSuperClass { + + public int changedField = 0; + + public void changedMethod() { + } +} \ No newline at end of file diff --git a/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinAndJava/src/previous-classpath/0/com/example/ChangedKotlinSuperClass.kt b/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinAndJava/src/previous-classpath/0/com/example/ChangedKotlinSuperClass.kt new file mode 100644 index 00000000000..69ac9671165 --- /dev/null +++ b/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinAndJava/src/previous-classpath/0/com/example/ChangedKotlinSuperClass.kt @@ -0,0 +1,6 @@ +package com.example; + +open class ChangedKotlinSuperClass { + val changedProperty = 0 + fun changedFunction() {} +} \ No newline at end of file diff --git a/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinAndJava/src/previous-classpath/0/com/example/JavaSubClassOfJavaSuperClass.java b/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinAndJava/src/previous-classpath/0/com/example/JavaSubClassOfJavaSuperClass.java new file mode 100644 index 00000000000..595bf203e9a --- /dev/null +++ b/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinAndJava/src/previous-classpath/0/com/example/JavaSubClassOfJavaSuperClass.java @@ -0,0 +1,4 @@ +package com.example; + +public class JavaSubClassOfJavaSuperClass extends ChangedJavaSuperClass { +} \ No newline at end of file diff --git a/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinAndJava/src/previous-classpath/0/com/example/JavaSubClassOfKotlinSuperClass.java b/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinAndJava/src/previous-classpath/0/com/example/JavaSubClassOfKotlinSuperClass.java new file mode 100644 index 00000000000..c8a1fba1a32 --- /dev/null +++ b/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinAndJava/src/previous-classpath/0/com/example/JavaSubClassOfKotlinSuperClass.java @@ -0,0 +1,4 @@ +package com.example; + +public class JavaSubClassOfKotlinSuperClass extends ChangedKotlinSuperClass { +} \ No newline at end of file diff --git a/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinAndJava/src/previous-classpath/0/com/example/KotlinSubClassOfJavaSuperClass.kt b/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinAndJava/src/previous-classpath/0/com/example/KotlinSubClassOfJavaSuperClass.kt new file mode 100644 index 00000000000..2f672bf834a --- /dev/null +++ b/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinAndJava/src/previous-classpath/0/com/example/KotlinSubClassOfJavaSuperClass.kt @@ -0,0 +1,3 @@ +package com.example + +class KotlinSubClassOfJavaSuperClass : ChangedJavaSuperClass() \ No newline at end of file diff --git a/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinAndJava/src/previous-classpath/0/com/example/KotlinSubClassOfKotlinSuperClass.kt b/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinAndJava/src/previous-classpath/0/com/example/KotlinSubClassOfKotlinSuperClass.kt new file mode 100644 index 00000000000..30ada7218e5 --- /dev/null +++ b/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinAndJava/src/previous-classpath/0/com/example/KotlinSubClassOfKotlinSuperClass.kt @@ -0,0 +1,3 @@ +package com.example + +class KotlinSubClassOfKotlinSuperClass : ChangedKotlinSuperClass() \ No newline at end of file diff --git a/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinAndJava/src/previous-classpath/0/com/example/UnimpactedJavaClass.java b/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinAndJava/src/previous-classpath/0/com/example/UnimpactedJavaClass.java new file mode 100644 index 00000000000..67180f2d20c --- /dev/null +++ b/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinAndJava/src/previous-classpath/0/com/example/UnimpactedJavaClass.java @@ -0,0 +1,4 @@ +package com.example; + +public class UnimpactedJavaClass { +} \ No newline at end of file diff --git a/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinAndJava/src/previous-classpath/0/com/example/UnimpactedKotlinClass.kt b/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinAndJava/src/previous-classpath/0/com/example/UnimpactedKotlinClass.kt new file mode 100644 index 00000000000..c61d34e27a8 --- /dev/null +++ b/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinAndJava/src/previous-classpath/0/com/example/UnimpactedKotlinClass.kt @@ -0,0 +1,3 @@ +package com.example + +class UnimpactedKotlinClass \ No newline at end of file diff --git a/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinOrJava/classes/kotlin/current-classpath/0/com/example/ChangedSuperClass.class b/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinOrJava/classes/kotlin/current-classpath/0/com/example/ChangedSuperClass.class new file mode 100644 index 0000000000000000000000000000000000000000..0808ff2e8c0d6bf70a163ecc150e79bae3d1107a GIT binary patch literal 903 zcmaKq-A)rh6vzLw+ud##EZe$bDI!+<01{m!-k~O1LsC+Up@x`nHEkzl=ysRvP6^)i z$_McYG|`xNVHz%dDC3z@tPx`-IUjS*{N|iF^W*2Y?*Ja-KEqNw?g!$O_m4vnR1bO7 z6`khbSR~bur)d_9!8_t7JP0Wi?6!_XTV-J~*iU36)iVZjb!~qZ7Hk(8WEtQf$1vAE zXT45hf~j{5#rl-fREdnbTeFzKYz_vlFl5xBOc|Ez|1D^XI9;J8g-+rA>e^*I!%96) zy1|i9t%S=c4R{pAiYpnD-H26V5Qap&sC9b~wRMc4Q18Vmlu__XDBj_UQ-HyXNzqm4Xi)0r=ghMUF)dtse@uno`HvAt~B z*vRbpo~iZQv-dA4;<%$>IpbKKt%;iq{-v=z>?wxDy+Nd8U(})#naWluo==;j=d8vZ zL9NwgBpQQ$OC)bN<>)cQZ65CPL~4Js={Dm*(iYoNXDm#>`Xro22Olt7pOODa#yLda1OiMCTa&{T+P|o(0RK1W!31O$-M=x`9~ko=7z2057vI7? y(p3Uoqh{w1VAgQGhEfd+D3giB8g5|e04&8#EFZv0;ibr>uv5&8jY5iI3jY_)<*w=g literal 0 HcmV?d00001 diff --git a/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinOrJava/classes/kotlin/current-classpath/0/com/example/SubClass.class b/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinOrJava/classes/kotlin/current-classpath/0/com/example/SubClass.class new file mode 100644 index 0000000000000000000000000000000000000000..e44be6b6684a739750d9e83388bcd4e81c3d77ce GIT binary patch literal 502 zcmZWlO-n*S6g~5vKJ95)W~P-yyK0dp?uwvUl>vFv`qu+Yp?Z#C;#ixOkyT0dXY@b& zG%vOEb2ilExE}TeL#8PMaUc0zF@EG-k1E+_*yCQCkEO{MMYk13(2w#WG5U7IhhFo4wPqsY&7AerGd9!}jB; z&rtM4AqL^#ftyW%vL9 literal 0 HcmV?d00001 diff --git a/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinOrJava/classes/kotlin/current-classpath/0/com/example/UnimpactedClass.class b/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinOrJava/classes/kotlin/current-classpath/0/com/example/UnimpactedClass.class new file mode 100644 index 0000000000000000000000000000000000000000..cabb97b00f352067502521409af5e5bf1c258c68 GIT binary patch literal 478 zcmaJ-O-}+b6r6Tt(G>;p3q(Du2UiIyLUf?cOW$teA z&pP`(OY_y!j%3I;m6n%-q%Hfmq8*b`Y^ITjTcWRAJr#qSbkL9FxpIl}^*~#d$d)pS zBBxrXR#=s4gF|pye>$@J4SK#rW$0F*Gqd-K*%u-lWkP2I9ySPbzX8l4`0*=0xQ`~hw(-V{M2ft6ULl_2Ca*$nM8o86L`lzPj_ zKg6>aK@dDh=+Qq)e3J%Sf8gc4?|tvbH}B2&A78%#c!*mJ>q$O}F0 zb|;5&+)9PkMKFf&KpcrErBw8)e;^Z6gu~!HR+%zS7@XU8x@8pL1#nShaLvBb3>%&Q zPJYBt-IHda_-=4gGP8mO#O&hLX2t7M>i&?GOU-!H}G<2X=K9ICSM`dz* zGV06m8_`dRsdn;2q+KyqHeQgyZax_&vaM{z+Rh|1Y9zZ#D=K-KWw{ad02-Tg8F#*7 z)gFqFLrUl>vFv`qu+Yp?Z#C;#ixOkyT0dXY@b& zG%vOEb2ilExE}TeL#8PMaUc0zF@EG-k1E+_*yCQCkEO{MMYk13(2w#WG5U7IhhFo4wPqsY&7AerGd9!}jB; z&rtM4AqL^#ftyW%vL9 literal 0 HcmV?d00001 diff --git a/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinOrJava/classes/kotlin/previous-classpath/0/com/example/UnimpactedClass.class b/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testImpactAnalysis_KotlinOrJava/classes/kotlin/previous-classpath/0/com/example/UnimpactedClass.class new file mode 100644 index 0000000000000000000000000000000000000000..cabb97b00f352067502521409af5e5bf1c258c68 GIT binary patch literal 478 zcmaJ-O-}+b6r6Tt(G>;p3q(Du2UiIyLUf?cOW$teA z&pP`(OY_y!j%3I;m6n%-q%Hfmq8*b`Y^ITjTcWRAJr#qSbkL9FxpIl}^*~#d$d)pS zBBxrXR#=s4gF|pye>$@J4SK#rW$0F*Gqd-K*%u-lWkP2I9ySPbzX8l4`0*=0xQ?GEj#&_$&2RLbQrwFwY7>N(s5`?U7GM9Rrd6e9nQg>PT zLtMKN1i^)bF8xvBxiM%f-JJ8C=f`(AKYxAy0pKz2GOP}ZERrW8J4$7=og^~ZNrl#B zFoy6@9E&Iw`9bt%a43hS42Qvcs&ZwXF*x_`_o^tt3*e&6;F|YJGc>ywuYAI=d?3wU zk;%8?;z*9ohxv|}p{ma%SzJX8mnz^`UKBf%d}vgWGt|4I!lWvXUP&VoVFc~v*|9@{ zm^Gd?U|=K4pC}u(2_>5h-PyDm@Fovz6{$?%ZOQsrK(|k4A>>uu~+G#CBCKUr(}u9Pf)kN|{Et z7>cwf#>&QvWUyCE#zWarwqtE~k{gxDp3;h1w)4C&!s^!8q-(fyWes~ALJo1$^~v6% zD6*Q#mmYkB|Ahd@ZL+p(Tknvq{%Jr30Y!Bz%`@kRzasoh#k0fig~Ro~%nzyGlCb|- zOJ@ezf|X-^zWydQ$aiS4K_V{q;lx;paV5qot`bBu#u{3EFpX=t-bY0v(72)DY1HOm KNz>z?PWU(W$a^RN literal 0 HcmV?d00001 diff --git a/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testVariousAbiChanges/classes/kotlin/current-classpath/0/com/example/ModifiedClassChangedMembers.class b/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testVariousAbiChanges/classes/kotlin/current-classpath/0/com/example/ModifiedClassChangedMembers.class new file mode 100644 index 0000000000000000000000000000000000000000..a332f4c52f1c5bc521f4f5025286e669a90c7b7c GIT binary patch literal 1439 zcma)5-%ry}6#j0zbzK>w8&iHMprEiJ6wo)+1TiEt0}UuKAu;LJD-^nx^mYW_c=C_% z(Ptkt(U|yP79RbhjOVgJE0AcK-1Fm}?>pbU_w?8AA3p&+zpT=0Fa~qaKC~^5^49bE9&bb$s0`Xe*LS1G4C-`wD~B{R z11V$}pd(A5W|#Fv7##30ddE<##YCG?==wWLIrJcxg@Rs&RJ7{~hH~vcwJkA}c6jv4 zZ*(NbjYv_Iq0qX#!>T#-qa-_CW9TRN+2Lb!X}Ww_D8oc82zRVK9@RtJ^@U~oeh}G_ z8<4*qMC&cjBSj`rE;|l)V!mEG8Rsz4>3<`saFw)5s>Hp;sSZIL7i#-KlI745}_4#^B z&hSf{YUJ<*4cptYLs!P#q_G*a!UkV;WyMgJc5?~NgYXW{__QJ`U-IJXax*ksp95E71|X< z1&p5G#tb!9AklwF*_OWyMv)!|+MdPA)Jpom_(7(lx|GR%SL2}k#p@)~3 zd=HCc-;jb^^iH?8p;j?b#bgzCaF<+6RWXh7Hkd#KGutQ#m;zY=OaK@dDh=+Qq){3fYM4#aiNzZXd*e~r zx5}1p1>=!#d4_m|HlgKZ%j40eRb?+TXP;aWcHJObv8vudDXBRHLql)8Y z0@qaCWF~9%pU?29qiL>NX)G9)YBCXfL-Rauc&kfFv6i-Zx4{R}?9WC2bvhih#f~(N zm4jiTWluDul4N<2B&p_RN(vh^Kxgv1MKe!gHnl^qX_}(lV>1ZC%)@W+z7Vl+n^vFD zSRMNA5X(fgc5Ph?D6W8>^g%*3I)zU|+AZv>p{_<@L6g2?vBjcVD4)V~~Ag8#u} zim=?*rTRQ6hN?P|!!A5BWD3w5e%&Dr;5Y3%(UqQ^4**}@&C+O3Q> z=Fs4G*E!l?bmsp+c+E)6u*ezfas4AK{Ht7aWo&da1A$FOfeyA9UvtqSk6jwTOR$_E fO0a^*37%jz!5W?pKsBDBHGp5ES)*NJu14c8u6b*G literal 0 HcmV?d00001 diff --git a/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testVariousAbiChanges/classes/kotlin/current-classpath/0/com/example/TopLevelDeclarationsKt.class b/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testVariousAbiChanges/classes/kotlin/current-classpath/0/com/example/TopLevelDeclarationsKt.class new file mode 100644 index 0000000000000000000000000000000000000000..8d600b33fbfb5b6adb29d65971c28c6ad211f578 GIT binary patch literal 1323 zcmah{Nl)8A6#m9>5@#Wpu*OMg3tgZKhN`z#l~56q)c{qY2#J#uPg8>z+K+*tf}xy-tuMEB1#xmqD-nJQOlk;NYS`E$X~?h>5aw)-F=n1p&Hxm z&h`Ldy#yGjFkC#O7ab4dPESiEKM1bn$S2Mqel*y9YtbwA?k?Xba;OD8KLGqBs)Vm)b-KR6Vk&W-Ss}AU5%pZ)4wDCg^=Mft*S=xRZu{Y*!wa^ zzV>D67f!06Jcxh1pFd6f6PTp46n}+&^|5bi`AI`wOTuAt!oY{DJNo~Dl9+(pX4EeE$9%wX2R9o%(r p5BGP$1m-Zmi(!FLfr>y`AR|!f+6954Kvp0vQ0;oA1Zn~ke*r5X1c3km literal 0 HcmV?d00001 diff --git a/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testVariousAbiChanges/classes/kotlin/current-classpath/0/com/example/UnchangedClass.class b/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testVariousAbiChanges/classes/kotlin/current-classpath/0/com/example/UnchangedClass.class new file mode 100644 index 0000000000000000000000000000000000000000..e4dfd42ae422c14ca20ad334327afb6f1274b4e4 GIT binary patch literal 733 zcmZ`%TWb?R6#iy*v)OD@yNOlPSTC(UcmX#pzA1uM0xR)CTZ53N$!2J$*-ObxN`1?d zKg4HW1VQjYLLdE6;+Ytv5q&x5JKwo{oHO&|=eO?w9^y7bGbyr2o{H=^mC@TgITZPU z9PFe*>oOQacqC3lloA`g?jOm-l;JRVk5#VB69(tb-EI{ncmZ6L8C-LyG{bu5|6?C9 ztQ<(QS7h?ds5q7*^L{obW~k}~lEqal<3a@-EAwP~oF_&VIYX^8EKI8M=%qAbAdH~7 zJUek{F=mZt4H(#v_)}%07NNlwLuWc^1iZlm9!@6#_bu?rJLGv|I@#te_N;XF(WCH% z7nYm6H4M6vop7uRjMtX@4?W}J$8zLq=h>wm#@ZIUyk-g zKP9H#DH4%(#YowBP6m6$c$CPtvK4E)%12 z^a^BeP!!p{$(QbZh5wlV$4#;}ZA&-ER(}_uf`FnLmS)Ui^B07lD0#lw{bzISkMe!0 zw<7Fs)zY~}Hdp1?oQ=PZTjbl+Sf?c}_Ta==jd3Z)Wn3YMMvOHydte$@vED;PBha{} P;b|<-z>=oVgBsyqTNr?4 literal 0 HcmV?d00001 diff --git a/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testVariousAbiChanges/classes/kotlin/previous-classpath/0/com/example/ModifiedClassChangedMembers.class b/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testVariousAbiChanges/classes/kotlin/previous-classpath/0/com/example/ModifiedClassChangedMembers.class new file mode 100644 index 0000000000000000000000000000000000000000..924afc6370fd4bedf317ebe89bec44a39346f293 GIT binary patch literal 1264 zcma)4T~8B16g{(Tx7%fbZTS!i;!iPn(R6g8-Xgr}uD!qDz6>1-Q(>ytmg zpWw4ECMG66n1)Axl=05CrKN0wFZbLzch1cH`t$eKZvc<6#;{xsydpn!ypuXFZU?UT zD7agyJ5rX89RHBJ+uS?g4VeaGu#cUVQ>+tTd~@m2K}kL?QE;1HoyMk-OS!_{0p$L3xO#g=g)qi5ZWGl5G ztP8)m%|pj^LWkROQ;+3J54_n9^VyG(3R)DAB2wTxx@yIJV`xD&@gEO$jhm*Mo7~lq@7jUNVY(y zqG~N+YV{|K@8oD$C9A^fkq2b0?geCE(kY9vh`A{K0s9*ThsDWQaW+;wJt|Jcif3ZQ zbE9HCRy==RvnooJ$42W-4++_Mz4@z!Myzn*YGEcusNrGM$`w2!+@n+%X<*m)ktk!S zj2mU##4U1hyNo-yyALLD5BK*mDPc-1OXw20$jM4r60;IB65|qM68VT%P literal 0 HcmV?d00001 diff --git a/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testVariousAbiChanges/classes/kotlin/previous-classpath/0/com/example/ModifiedClassUnchangedMembers.class b/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testVariousAbiChanges/classes/kotlin/previous-classpath/0/com/example/ModifiedClassUnchangedMembers.class new file mode 100644 index 0000000000000000000000000000000000000000..ed6664c36ab9fd357f96be699b67f33719166bd7 GIT binary patch literal 793 zcma)3O>Yx15PkM;Hk)lqHz7b8zRJgeQi)9~ZXhHminJ&N)Ix-mlan>Ao6T+&J5{;m z#1G-j1qlg>1B!a&MS!ZZZC-s2WdBDTzB;dXUK4ph8 zuTLi%yvZIFj^BAyKJmh0gE#%{TIf)AUmd@FOcOttP8zOX2t9k|2D3^l|MdFKz>s;H zc_JB>+A5Pz$Mz3ih+ayaYCG?Xv?E5!)+fziCm)acvZX9zd3&50HIyBt6;U2$S#E^2 zLSvm=a%YdNTGI$QbRGIKidU(MtPPY4w?D!EK!9U~q8(f6HHzgQ1e6d^Rl&ln^ZW8g zgzsrMzwG{XxpJz!Mtm#6{!}f@EwU3;j_b4Iuiysd7A;ok5ofz_V$@=si*X(o2%;Wi d8I3NO#zkD}qNEXMT-NY37H42VqpVRO{2l(Am{0%! literal 0 HcmV?d00001 diff --git a/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testVariousAbiChanges/classes/kotlin/previous-classpath/0/com/example/RemovedClass.class b/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testVariousAbiChanges/classes/kotlin/previous-classpath/0/com/example/RemovedClass.class new file mode 100644 index 0000000000000000000000000000000000000000..3876738e5a82bed032c6454de951265281b60923 GIT binary patch literal 727 zcmZ`%ON$dh5dOMnGMUU~%_Odxjqk_72RPZqn>M=-G^iuWJFz)@QjJF{$LRGu-^yOZ1`DvMr7BgVoAn#g`SN@ZVZMJ-RVEH}b#uCYV+aEsj<_B@0fQl}Rn zdzGTdZcV;)_bdF*1URmdwPo9Soow}Y11bn8s$-+boF;!k_=$?^WcQ!s`XA+c)Ne)D z->RiGB3r3)+$hFh!A!42f7lp)rE&u=k literal 0 HcmV?d00001 diff --git a/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testVariousAbiChanges/classes/kotlin/previous-classpath/0/com/example/TopLevelDeclarations2Kt.class b/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testVariousAbiChanges/classes/kotlin/previous-classpath/0/com/example/TopLevelDeclarations2Kt.class new file mode 100644 index 0000000000000000000000000000000000000000..85e27bc6caaf84340ad5ec9bc6fe16e26510ed55 GIT binary patch literal 406 zcmZusO;5r=6rA1iq4k5JqLix_y;vaLJQ)p1BWj|A3#X;sn1!}W=(gd=U-Ig~aP~(T z-(tLZnR#y}lQ-|{`{NV9HGGEiNT-2ZiFA?3V5ApAS<2*IMu}JoqjZ+{A50yL!JCOv z1c}Jrg6HW>Mx;6ntyGsX{>u%DEV3a6=i+kA&>YUSNmLd*N+V)n#0>*aONWj#3pER1 zU~@ZgGFQq@U7F$^!|`Tab2n?3d%RQgHtP=WQWGBcnN79Le|4|shM{t&W697Ms!To= z=~OO9Vw#ZRzUpEb$$_$q|59W|rE;utMec2uY4iIudf=$oa&*T>6*b}(ZT?mx^?hrd x5?TvzC~!v1ae_8+kJLH^cP4N`?1ped>|sB|0S-en;7!1CG;uTm&r!{B`~wn#ROJ8w literal 0 HcmV?d00001 diff --git a/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testVariousAbiChanges/classes/kotlin/previous-classpath/0/com/example/TopLevelDeclarationsKt.class b/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testVariousAbiChanges/classes/kotlin/previous-classpath/0/com/example/TopLevelDeclarationsKt.class new file mode 100644 index 0000000000000000000000000000000000000000..6861ef5b5453e0fa1945a531797664a74da36286 GIT binary patch literal 1213 zcmah{OK;Oa5dPM79LIGU_eB~vyuz#H(X@yg2nkVDvPcUmZH1JRYcIuZY*$$)Dz~2a z1N;NdT;Rw7MLqJP5VKC8D0S66>^D2#x3e>|^XvDIp8%dT9_SPp35tBor;%z%$l)F;m37>!CcZGhI(`P!T8!6a;D+>j+f;025a2c>n+a literal 0 HcmV?d00001 diff --git a/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testVariousAbiChanges/classes/kotlin/previous-classpath/0/com/example/UnchangedClass.class b/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testVariousAbiChanges/classes/kotlin/previous-classpath/0/com/example/UnchangedClass.class new file mode 100644 index 0000000000000000000000000000000000000000..e4dfd42ae422c14ca20ad334327afb6f1274b4e4 GIT binary patch literal 733 zcmZ`%TWb?R6#iy*v)OD@yNOlPSTC(UcmX#pzA1uM0xR)CTZ53N$!2J$*-ObxN`1?d zKg4HW1VQjYLLdE6;+Ytv5q&x5JKwo{oHO&|=eO?w9^y7bGbyr2o{H=^mC@TgITZPU z9PFe*>oOQacqC3lloA`g?jOm-l;JRVk5#VB69(tb-EI{ncmZ6L8C-LyG{bu5|6?C9 ztQ<(QS7h?ds5q7*^L{obW~k}~lEqal<3a@-EAwP~oF_&VIYX^8EKI8M=%qAbAdH~7 zJUek{F=mZt4H(#v_)}%07NNlwLuWc^1iZlm9!@6#_bu?rJLGv|I@#te_N;XF(WCH% z7nYm6H4M6vop7uRjMtX@4?W}J$8zLq=h>wm#@ZIUyk-g zKP9H#DH4%(#YowBP6m6$c$CPtvK4E)%12 z^a^BeP!!p{$(QbZh5wlV$4#;}ZA&-ER(}_uf`FnLmS)Ui^B07lD0#lw{bzISkMe!0 zw<7Fs)zY~}Hdp1?oQ=PZTjbl+Sf?c}_Ta==jd3Z)Wn3YMMvOHydte$@vED;PBha{} P;b|<-z>=oVgBsyqTNr?4 literal 0 HcmV?d00001 diff --git a/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testVariousAbiChanges/src/java/current-classpath/0/com/example/AddedClass.java b/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testVariousAbiChanges/src/java/current-classpath/0/com/example/AddedClass.java new file mode 100644 index 00000000000..bdf8bef9778 --- /dev/null +++ b/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testVariousAbiChanges/src/java/current-classpath/0/com/example/AddedClass.java @@ -0,0 +1,9 @@ +package com.example; + +public class AddedClass { + + public int someField = 0; + + public void someMethod() { + } +} \ No newline at end of file diff --git a/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testVariousAbiChanges/src/java/current-classpath/0/com/example/ModifiedClassChangedMembers.java b/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testVariousAbiChanges/src/java/current-classpath/0/com/example/ModifiedClassChangedMembers.java new file mode 100644 index 00000000000..e162515321b --- /dev/null +++ b/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testVariousAbiChanges/src/java/current-classpath/0/com/example/ModifiedClassChangedMembers.java @@ -0,0 +1,18 @@ +package com.example; + +public class ModifiedClassChangedMembers { + + public int unchangedField = 0; + public String modifiedField = ""; + public int addedField = 0; + + public void unchangedMethod() { + } + + public String modifiedMethod() { + return ""; + } + + public void addedMethod() { + } +} \ No newline at end of file diff --git a/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testVariousAbiChanges/src/java/current-classpath/0/com/example/ModifiedClassUnchangedMembers.java b/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testVariousAbiChanges/src/java/current-classpath/0/com/example/ModifiedClassUnchangedMembers.java new file mode 100644 index 00000000000..81704c22d4a --- /dev/null +++ b/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testVariousAbiChanges/src/java/current-classpath/0/com/example/ModifiedClassUnchangedMembers.java @@ -0,0 +1,10 @@ +package com.example; + +@Deprecated // Changed annotation +public class ModifiedClassUnchangedMembers { + + public int unchangedField = 0; + + public void unchangedMethod() { + } +} \ No newline at end of file diff --git a/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testVariousAbiChanges/src/java/current-classpath/0/com/example/UnchangedClass.java b/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testVariousAbiChanges/src/java/current-classpath/0/com/example/UnchangedClass.java new file mode 100644 index 00000000000..96f19d3d32a --- /dev/null +++ b/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testVariousAbiChanges/src/java/current-classpath/0/com/example/UnchangedClass.java @@ -0,0 +1,9 @@ +package com.example; + +public class UnchangedClass { + + public int someField = 0; + + public void someMethod() { + } +} \ No newline at end of file diff --git a/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testVariousAbiChanges/src/java/previous-classpath/0/com/example/ModifiedClassChangedMembers.java b/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testVariousAbiChanges/src/java/previous-classpath/0/com/example/ModifiedClassChangedMembers.java new file mode 100644 index 00000000000..f757eac2438 --- /dev/null +++ b/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testVariousAbiChanges/src/java/previous-classpath/0/com/example/ModifiedClassChangedMembers.java @@ -0,0 +1,17 @@ +package com.example; + +public class ModifiedClassChangedMembers { + + public int unchangedField = 0; + public int modifiedField = 0; + public int removedField = 0; + + public void unchangedMethod() { + } + + public void modifiedMethod() { + } + + public void removedMethod() { + } +} \ No newline at end of file diff --git a/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testVariousAbiChanges/src/java/previous-classpath/0/com/example/ModifiedClassUnchangedMembers.java b/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testVariousAbiChanges/src/java/previous-classpath/0/com/example/ModifiedClassUnchangedMembers.java new file mode 100644 index 00000000000..40ba69998c4 --- /dev/null +++ b/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testVariousAbiChanges/src/java/previous-classpath/0/com/example/ModifiedClassUnchangedMembers.java @@ -0,0 +1,9 @@ +package com.example; + +public class ModifiedClassUnchangedMembers { + + public int unchangedField = 0; + + public void unchangedMethod() { + } +} \ No newline at end of file diff --git a/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testVariousAbiChanges/src/java/previous-classpath/0/com/example/RemovedClass.java b/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testVariousAbiChanges/src/java/previous-classpath/0/com/example/RemovedClass.java new file mode 100644 index 00000000000..892add5fddb --- /dev/null +++ b/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testVariousAbiChanges/src/java/previous-classpath/0/com/example/RemovedClass.java @@ -0,0 +1,9 @@ +package com.example; + +public class RemovedClass { + + public int someField = 0; + + public void someMethod() { + } +} \ No newline at end of file diff --git a/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testVariousAbiChanges/src/java/previous-classpath/0/com/example/UnchangedClass.java b/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testVariousAbiChanges/src/java/previous-classpath/0/com/example/UnchangedClass.java new file mode 100644 index 00000000000..96f19d3d32a --- /dev/null +++ b/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testVariousAbiChanges/src/java/previous-classpath/0/com/example/UnchangedClass.java @@ -0,0 +1,9 @@ +package com.example; + +public class UnchangedClass { + + public int someField = 0; + + public void someMethod() { + } +} \ No newline at end of file diff --git a/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testVariousAbiChanges/src/kotlin/current-classpath/0/com/example/AddedClass.kt b/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testVariousAbiChanges/src/kotlin/current-classpath/0/com/example/AddedClass.kt new file mode 100644 index 00000000000..077052fc825 --- /dev/null +++ b/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testVariousAbiChanges/src/kotlin/current-classpath/0/com/example/AddedClass.kt @@ -0,0 +1,6 @@ +package com.example + +class AddedClass { + val someProperty = 0 + fun someFunction() {} +} \ No newline at end of file diff --git a/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testVariousAbiChanges/src/kotlin/current-classpath/0/com/example/ModifiedClassChangedMembers.kt b/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testVariousAbiChanges/src/kotlin/current-classpath/0/com/example/ModifiedClassChangedMembers.kt new file mode 100644 index 00000000000..49f07decfba --- /dev/null +++ b/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testVariousAbiChanges/src/kotlin/current-classpath/0/com/example/ModifiedClassChangedMembers.kt @@ -0,0 +1,10 @@ +package com.example + +class ModifiedClassChangedMembers { + val unchangedProperty = 0 + val modifiedProperty = "" + val addedProperty = 0 + fun unchangedFunction() {} + fun modifiedFunction() = "" + fun addedFunction() {} +} \ No newline at end of file diff --git a/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testVariousAbiChanges/src/kotlin/current-classpath/0/com/example/ModifiedClassUnchangedMembers.kt b/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testVariousAbiChanges/src/kotlin/current-classpath/0/com/example/ModifiedClassUnchangedMembers.kt new file mode 100644 index 00000000000..2ecfc069be2 --- /dev/null +++ b/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testVariousAbiChanges/src/kotlin/current-classpath/0/com/example/ModifiedClassUnchangedMembers.kt @@ -0,0 +1,7 @@ +package com.example + +@java.lang.Deprecated // Changed annotation +class ModifiedClassUnchangedMembers { + val unchangedProperty = 0 + fun unchangedFunction() {} +} \ No newline at end of file diff --git a/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testVariousAbiChanges/src/kotlin/current-classpath/0/com/example/UnchangedClass.kt b/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testVariousAbiChanges/src/kotlin/current-classpath/0/com/example/UnchangedClass.kt new file mode 100644 index 00000000000..a0171b626c2 --- /dev/null +++ b/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testVariousAbiChanges/src/kotlin/current-classpath/0/com/example/UnchangedClass.kt @@ -0,0 +1,6 @@ +package com.example + +class UnchangedClass { + val someProperty = 0 + fun someFunction() {} +} \ No newline at end of file diff --git a/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testVariousAbiChanges/src/kotlin/current-classpath/0/com/example/topLevelDeclarations.kt b/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testVariousAbiChanges/src/kotlin/current-classpath/0/com/example/topLevelDeclarations.kt new file mode 100644 index 00000000000..1b89834173b --- /dev/null +++ b/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testVariousAbiChanges/src/kotlin/current-classpath/0/com/example/topLevelDeclarations.kt @@ -0,0 +1,11 @@ +package com.example + +val unchangedTopLevelProperty = 0 +val modifiedTopLevelProperty = "" +val addedTopLevelProperty = 0 + +fun unchangedTopLevelFunction() {} +fun modifiedTopLevelFunction() = "" +fun addedTopLevelFunction() {} + +fun movedTopLevelFunction() {} \ No newline at end of file diff --git a/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testVariousAbiChanges/src/kotlin/current-classpath/0/com/example/topLevelDeclarations2.kt b/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testVariousAbiChanges/src/kotlin/current-classpath/0/com/example/topLevelDeclarations2.kt new file mode 100644 index 00000000000..645bd550b93 --- /dev/null +++ b/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testVariousAbiChanges/src/kotlin/current-classpath/0/com/example/topLevelDeclarations2.kt @@ -0,0 +1,3 @@ +package com.example + +val movedTopLevelProperty = 0 \ No newline at end of file diff --git a/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testVariousAbiChanges/src/kotlin/previous-classpath/0/com/example/ModifiedClassChangedMembers.kt b/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testVariousAbiChanges/src/kotlin/previous-classpath/0/com/example/ModifiedClassChangedMembers.kt new file mode 100644 index 00000000000..e629baf0dfe --- /dev/null +++ b/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testVariousAbiChanges/src/kotlin/previous-classpath/0/com/example/ModifiedClassChangedMembers.kt @@ -0,0 +1,10 @@ +package com.example + +class ModifiedClassChangedMembers { + val unchangedProperty = 0 + val modifiedProperty = 0 + val removedProperty = 0 + fun unchangedFunction() {} + fun modifiedFunction() {} + fun removedFunction() {} +} \ No newline at end of file diff --git a/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testVariousAbiChanges/src/kotlin/previous-classpath/0/com/example/ModifiedClassUnchangedMembers.kt b/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testVariousAbiChanges/src/kotlin/previous-classpath/0/com/example/ModifiedClassUnchangedMembers.kt new file mode 100644 index 00000000000..8aaf61b5472 --- /dev/null +++ b/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testVariousAbiChanges/src/kotlin/previous-classpath/0/com/example/ModifiedClassUnchangedMembers.kt @@ -0,0 +1,6 @@ +package com.example + +class ModifiedClassUnchangedMembers { + val unchangedProperty = 0 + fun unchangedFunction() {} +} \ No newline at end of file diff --git a/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testVariousAbiChanges/src/kotlin/previous-classpath/0/com/example/RemovedClass.kt b/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testVariousAbiChanges/src/kotlin/previous-classpath/0/com/example/RemovedClass.kt new file mode 100644 index 00000000000..5c9dd69f4aa --- /dev/null +++ b/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testVariousAbiChanges/src/kotlin/previous-classpath/0/com/example/RemovedClass.kt @@ -0,0 +1,6 @@ +package com.example + +class RemovedClass { + val someProperty = 0 + fun someFunction() {} +} \ No newline at end of file diff --git a/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testVariousAbiChanges/src/kotlin/previous-classpath/0/com/example/UnchangedClass.kt b/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testVariousAbiChanges/src/kotlin/previous-classpath/0/com/example/UnchangedClass.kt new file mode 100644 index 00000000000..a0171b626c2 --- /dev/null +++ b/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testVariousAbiChanges/src/kotlin/previous-classpath/0/com/example/UnchangedClass.kt @@ -0,0 +1,6 @@ +package com.example + +class UnchangedClass { + val someProperty = 0 + fun someFunction() {} +} \ No newline at end of file diff --git a/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testVariousAbiChanges/src/kotlin/previous-classpath/0/com/example/topLevelDeclarations.kt b/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testVariousAbiChanges/src/kotlin/previous-classpath/0/com/example/topLevelDeclarations.kt new file mode 100644 index 00000000000..289a9ddd136 --- /dev/null +++ b/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testVariousAbiChanges/src/kotlin/previous-classpath/0/com/example/topLevelDeclarations.kt @@ -0,0 +1,10 @@ +package com.example + +val unchangedTopLevelProperty = 0 +val modifiedTopLevelProperty = 0 +val removedTopLevelProperty = 0 +val movedTopLevelProperty = 0 + +fun unchangedTopLevelFunction() {} +fun modifiedTopLevelFunction() {} +fun removedTopLevelFunction() {} \ No newline at end of file diff --git a/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testVariousAbiChanges/src/kotlin/previous-classpath/0/com/example/topLevelDeclarations2.kt b/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testVariousAbiChanges/src/kotlin/previous-classpath/0/com/example/topLevelDeclarations2.kt new file mode 100644 index 00000000000..c4d498aa9cd --- /dev/null +++ b/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathChangesComputerTest/testVariousAbiChanges/src/kotlin/previous-classpath/0/com/example/topLevelDeclarations2.kt @@ -0,0 +1,3 @@ +package com.example + +fun movedTopLevelFunction() {} \ No newline at end of file diff --git a/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathSnapshotTestCommon/classes/kotlin/changedMethodImplementation/com/example/SimpleKotlinClass.class b/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathSnapshotTestCommon/classes/kotlin/changedMethodImplementation/com/example/SimpleKotlinClass.class new file mode 100644 index 0000000000000000000000000000000000000000..497b364379ab6a84ba01f760f0128196f6dc95db GIT binary patch literal 1122 zcmaJ>TTc@~6#izrZMRD)+X4zzWD%8{(t@`KjEQ21#j1o7V#3q39bsTEO?OM+t?|Jh z;cGHL>VM0feK@SgPz%X6@ zZ{;(#&i`^Ca&Nb!wAJ5^HB6}Fi0~7sPDQfnD-2Gjoj0`! z&D5+;+tdtY7^HR5n%QYjblR(0kv)x{eMk_pX;?;HE2f@nn+eNQ)^^5qf$&ozUv5OfebzXTz3{=#BJszb@#8W$B4mEw?I~JG|-;k}LZ) z?(FiWROcROR{U18CN`vsnA~o8p>)Nr3?zj-@jSo#YynniTXed!hMZa+vT~S>v`$oL zVM(qKT2Lb*9bfzg<5QHdN>aIj819lxcLR`uNvAA^BIIK77g!(3siB`7ADEmy@BEOW zRg=_bT+U5?#dN>BNv;@mGpJXeL8`|f2YYal>jR2psL05GA{zYwif!u}iKF-({L z%e=;r+B5u0yKag`#dTVS>mLVXC5B|{FPN1Q7(_A-1w&`<&9>d}g=166Txp?pq0#EG z=NncG!$j${eTLC;FokgP6<64P)preUttBvuu{cI>g&|X#x3a>{@@%hq_Vp>higAYF zOVVSw$`ETwK9jl_&Gl-W+tiv|%@nR_n8Y-LY8!7W+~pR-5TzY*-{=o9-ml+toonEF zKcT;?RQVwIQu*hG&zs!mv{S`84AG}$QbeTy13Mu6NXS=#tmZO9yW5%6l#HS&dbgt~ zsx(y6VbWx)N~YT>Dh2j9a`GWc(3YyJ6G|ceRM|@EnzV{heSma$C#i>|es%KhiHy~{ zot+Uq(u3YhNF`_@tVVUZ4W(IRvZaxKE^X<6K2mtYX&N+YS=h#lwpBOWm%MHgk}f+9 zZq~Rfc!EOKZQJp=ybce`bTwfbUO`$O5m{->1v*Tv z(BYE2OK4v1igaZ08`Muh!U{?0212+;GSLe_92&h+7zmJy$zPyQ;8^Y|_AgdH3dk*MsTtb&5 zx}kGD#ZT!J+@~}JMXZwECX$=9pZQ&cO30P4P{JZ^k%`+S+`-Z=m`7VH>>}YoqeXj& TdYB80K@S6-#AkzN%EQcWD5~BO literal 0 HcmV?d00001 diff --git a/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathSnapshotTestCommon/classes/kotlin/original/com/example/SimpleKotlinClass.class b/libraries/tools/kotlin-gradle-plugin/src/testData/org/jetbrains/kotlin/gradle/incremental/ClasspathSnapshotTestCommon/classes/kotlin/original/com/example/SimpleKotlinClass.class new file mode 100644 index 0000000000000000000000000000000000000000..10cbf992787aef3a04240343a3cfb9e4e576ce76 GIT binary patch literal 1103 zcmaJ=OHUI~6#njXI-L%sObckKB2`o#DpT;az?dk8SgcB@AttPD+Yv9!qv_ld*flQv zA+FtMj3zEj!_psRJau=n@@cRU{KIxp*cZbPP!U@#ttK*)y-iTQ=?43aP`=twc>@~wy%W~%?~ zyvmT(KK?uo``J8Zdac@#IRFl1YQ!K{+OD6(m27&{HGcY=l#VQ^-`+EFB3KZQK? z3OkZvvKo&sLT9rr0$G!7m;0+3OkgsNahzi)RObAW2ui%vr!BoXX>6jvFg~O_g(5?$ zrTTe9KRMs$_+v$@Y9|*lZQ%kgF^o~}0hjJzENbQSQ*FbrEoE(G?F4E4_3^tWDu-&eChTM%daodpprURXHXVT0Tw!XG ziGR*%X`dcMUkjTqePLAu?u(9JciXRc-6JGl4IA9s=53+;6VR%Kop!@r7b;_Fs}o4! zyW1iXl=3JDLdn$$L|CTN(CM2s