From 2951e0b955d9111c560590f2c0686143d5ff829e Mon Sep 17 00:00:00 2001 From: Alexander Udalov Date: Sat, 20 May 2023 00:00:50 +0200 Subject: [PATCH] Rename/remove some compileKotlinAgainstCustomBinaries tests "oldJvm*" tests are no longer testing the old JVM backend, so remove that prefix from them. Also, remove the test "firAgainstOldJvm" because it is now checking something that cannot NOT work. --- .../library/a.kt | 0 .../againstFir/output.txt | 8 ++++++++ .../{firAgainstOldJvm => againstFir}/source.kt | 0 .../library/a.kt | 0 .../output.txt | 0 .../source.kt | 0 .../library/a.kt | 0 .../againstFirWithStableAbi/output.txt | 8 ++++++++ .../source.kt | 0 .../library/a.kt | 0 .../output.txt | 0 .../source.kt | 0 .../library/a.kt | 0 .../output.txt | 0 .../source.kt | 0 .../library/a.kt | 0 .../againstUnstable/output.txt | 8 ++++++++ .../source.kt | 0 .../oldJvmAgainstFir/output.txt | 8 -------- .../oldJvmAgainstFirWithStableAbi/output.txt | 8 -------- .../oldJvmAgainstJvmIr/output.txt | 1 - .../library/a.kt | 5 ----- .../output.txt | 8 -------- .../oldJvmAgainstJvmIrWithUnstableAbi/source.kt | 5 ----- .../CompileKotlinAgainstCustomBinariesTest.kt | 17 ++++++----------- 25 files changed, 30 insertions(+), 46 deletions(-) rename compiler/testData/compileKotlinAgainstCustomBinaries/{firAgainstOldJvm => againstFir}/library/a.kt (100%) create mode 100644 compiler/testData/compileKotlinAgainstCustomBinaries/againstFir/output.txt rename compiler/testData/compileKotlinAgainstCustomBinaries/{firAgainstOldJvm => againstFir}/source.kt (100%) rename compiler/testData/compileKotlinAgainstCustomBinaries/{oldJvmAgainstFir => againstFirWithAllowUnstableDependencies}/library/a.kt (100%) rename compiler/testData/compileKotlinAgainstCustomBinaries/{firAgainstOldJvm => againstFirWithAllowUnstableDependencies}/output.txt (100%) rename compiler/testData/compileKotlinAgainstCustomBinaries/{oldJvmAgainstFir => againstFirWithAllowUnstableDependencies}/source.kt (100%) rename compiler/testData/compileKotlinAgainstCustomBinaries/{oldJvmAgainstFirWithAllowUnstableDependencies => againstFirWithStableAbi}/library/a.kt (100%) create mode 100644 compiler/testData/compileKotlinAgainstCustomBinaries/againstFirWithStableAbi/output.txt rename compiler/testData/compileKotlinAgainstCustomBinaries/{oldJvmAgainstFirWithAllowUnstableDependencies => againstFirWithStableAbi}/source.kt (100%) rename compiler/testData/compileKotlinAgainstCustomBinaries/{oldJvmAgainstFirWithStableAbi => againstFirWithStableAbiAndNoPrereleaseCheck}/library/a.kt (100%) rename compiler/testData/compileKotlinAgainstCustomBinaries/{oldJvmAgainstFirWithAllowUnstableDependencies => againstFirWithStableAbiAndNoPrereleaseCheck}/output.txt (100%) rename compiler/testData/compileKotlinAgainstCustomBinaries/{oldJvmAgainstFirWithStableAbi => againstFirWithStableAbiAndNoPrereleaseCheck}/source.kt (100%) rename compiler/testData/compileKotlinAgainstCustomBinaries/{oldJvmAgainstFirWithStableAbiAndNoPrereleaseCheck => againstStable}/library/a.kt (100%) rename compiler/testData/compileKotlinAgainstCustomBinaries/{oldJvmAgainstFirWithStableAbiAndNoPrereleaseCheck => againstStable}/output.txt (100%) rename compiler/testData/compileKotlinAgainstCustomBinaries/{oldJvmAgainstFirWithStableAbiAndNoPrereleaseCheck => againstStable}/source.kt (100%) rename compiler/testData/compileKotlinAgainstCustomBinaries/{oldJvmAgainstJvmIr => againstUnstable}/library/a.kt (100%) create mode 100644 compiler/testData/compileKotlinAgainstCustomBinaries/againstUnstable/output.txt rename compiler/testData/compileKotlinAgainstCustomBinaries/{oldJvmAgainstJvmIr => againstUnstable}/source.kt (100%) delete mode 100644 compiler/testData/compileKotlinAgainstCustomBinaries/oldJvmAgainstFir/output.txt delete mode 100644 compiler/testData/compileKotlinAgainstCustomBinaries/oldJvmAgainstFirWithStableAbi/output.txt delete mode 100644 compiler/testData/compileKotlinAgainstCustomBinaries/oldJvmAgainstJvmIr/output.txt delete mode 100644 compiler/testData/compileKotlinAgainstCustomBinaries/oldJvmAgainstJvmIrWithUnstableAbi/library/a.kt delete mode 100644 compiler/testData/compileKotlinAgainstCustomBinaries/oldJvmAgainstJvmIrWithUnstableAbi/output.txt delete mode 100644 compiler/testData/compileKotlinAgainstCustomBinaries/oldJvmAgainstJvmIrWithUnstableAbi/source.kt diff --git a/compiler/testData/compileKotlinAgainstCustomBinaries/firAgainstOldJvm/library/a.kt b/compiler/testData/compileKotlinAgainstCustomBinaries/againstFir/library/a.kt similarity index 100% rename from compiler/testData/compileKotlinAgainstCustomBinaries/firAgainstOldJvm/library/a.kt rename to compiler/testData/compileKotlinAgainstCustomBinaries/againstFir/library/a.kt diff --git a/compiler/testData/compileKotlinAgainstCustomBinaries/againstFir/output.txt b/compiler/testData/compileKotlinAgainstCustomBinaries/againstFir/output.txt new file mode 100644 index 00000000000..e4a064110a6 --- /dev/null +++ b/compiler/testData/compileKotlinAgainstCustomBinaries/againstFir/output.txt @@ -0,0 +1,8 @@ +error: pre-release classes were found in dependencies. Remove them from the classpath, recompile with a release compiler or use '-Xskip-prerelease-check' to suppress errors +compiler/testData/compileKotlinAgainstCustomBinaries/againstFir/source.kt:4:5: error: class 'lib.AKt' is compiled by a pre-release version of Kotlin and cannot be loaded by this version of the compiler + get { Box("OK").value } + ^ +compiler/testData/compileKotlinAgainstCustomBinaries/againstFir/source.kt:4:11: error: class 'lib.Box' is compiled by a pre-release version of Kotlin and cannot be loaded by this version of the compiler + get { Box("OK").value } + ^ +COMPILATION_ERROR diff --git a/compiler/testData/compileKotlinAgainstCustomBinaries/firAgainstOldJvm/source.kt b/compiler/testData/compileKotlinAgainstCustomBinaries/againstFir/source.kt similarity index 100% rename from compiler/testData/compileKotlinAgainstCustomBinaries/firAgainstOldJvm/source.kt rename to compiler/testData/compileKotlinAgainstCustomBinaries/againstFir/source.kt diff --git a/compiler/testData/compileKotlinAgainstCustomBinaries/oldJvmAgainstFir/library/a.kt b/compiler/testData/compileKotlinAgainstCustomBinaries/againstFirWithAllowUnstableDependencies/library/a.kt similarity index 100% rename from compiler/testData/compileKotlinAgainstCustomBinaries/oldJvmAgainstFir/library/a.kt rename to compiler/testData/compileKotlinAgainstCustomBinaries/againstFirWithAllowUnstableDependencies/library/a.kt diff --git a/compiler/testData/compileKotlinAgainstCustomBinaries/firAgainstOldJvm/output.txt b/compiler/testData/compileKotlinAgainstCustomBinaries/againstFirWithAllowUnstableDependencies/output.txt similarity index 100% rename from compiler/testData/compileKotlinAgainstCustomBinaries/firAgainstOldJvm/output.txt rename to compiler/testData/compileKotlinAgainstCustomBinaries/againstFirWithAllowUnstableDependencies/output.txt diff --git a/compiler/testData/compileKotlinAgainstCustomBinaries/oldJvmAgainstFir/source.kt b/compiler/testData/compileKotlinAgainstCustomBinaries/againstFirWithAllowUnstableDependencies/source.kt similarity index 100% rename from compiler/testData/compileKotlinAgainstCustomBinaries/oldJvmAgainstFir/source.kt rename to compiler/testData/compileKotlinAgainstCustomBinaries/againstFirWithAllowUnstableDependencies/source.kt diff --git a/compiler/testData/compileKotlinAgainstCustomBinaries/oldJvmAgainstFirWithAllowUnstableDependencies/library/a.kt b/compiler/testData/compileKotlinAgainstCustomBinaries/againstFirWithStableAbi/library/a.kt similarity index 100% rename from compiler/testData/compileKotlinAgainstCustomBinaries/oldJvmAgainstFirWithAllowUnstableDependencies/library/a.kt rename to compiler/testData/compileKotlinAgainstCustomBinaries/againstFirWithStableAbi/library/a.kt diff --git a/compiler/testData/compileKotlinAgainstCustomBinaries/againstFirWithStableAbi/output.txt b/compiler/testData/compileKotlinAgainstCustomBinaries/againstFirWithStableAbi/output.txt new file mode 100644 index 00000000000..462bd9a21af --- /dev/null +++ b/compiler/testData/compileKotlinAgainstCustomBinaries/againstFirWithStableAbi/output.txt @@ -0,0 +1,8 @@ +error: pre-release classes were found in dependencies. Remove them from the classpath, recompile with a release compiler or use '-Xskip-prerelease-check' to suppress errors +compiler/testData/compileKotlinAgainstCustomBinaries/againstFirWithStableAbi/source.kt:4:5: error: class 'lib.AKt' is compiled by a pre-release version of Kotlin and cannot be loaded by this version of the compiler + get { Box("OK").value } + ^ +compiler/testData/compileKotlinAgainstCustomBinaries/againstFirWithStableAbi/source.kt:4:11: error: class 'lib.Box' is compiled by a pre-release version of Kotlin and cannot be loaded by this version of the compiler + get { Box("OK").value } + ^ +COMPILATION_ERROR diff --git a/compiler/testData/compileKotlinAgainstCustomBinaries/oldJvmAgainstFirWithAllowUnstableDependencies/source.kt b/compiler/testData/compileKotlinAgainstCustomBinaries/againstFirWithStableAbi/source.kt similarity index 100% rename from compiler/testData/compileKotlinAgainstCustomBinaries/oldJvmAgainstFirWithAllowUnstableDependencies/source.kt rename to compiler/testData/compileKotlinAgainstCustomBinaries/againstFirWithStableAbi/source.kt diff --git a/compiler/testData/compileKotlinAgainstCustomBinaries/oldJvmAgainstFirWithStableAbi/library/a.kt b/compiler/testData/compileKotlinAgainstCustomBinaries/againstFirWithStableAbiAndNoPrereleaseCheck/library/a.kt similarity index 100% rename from compiler/testData/compileKotlinAgainstCustomBinaries/oldJvmAgainstFirWithStableAbi/library/a.kt rename to compiler/testData/compileKotlinAgainstCustomBinaries/againstFirWithStableAbiAndNoPrereleaseCheck/library/a.kt diff --git a/compiler/testData/compileKotlinAgainstCustomBinaries/oldJvmAgainstFirWithAllowUnstableDependencies/output.txt b/compiler/testData/compileKotlinAgainstCustomBinaries/againstFirWithStableAbiAndNoPrereleaseCheck/output.txt similarity index 100% rename from compiler/testData/compileKotlinAgainstCustomBinaries/oldJvmAgainstFirWithAllowUnstableDependencies/output.txt rename to compiler/testData/compileKotlinAgainstCustomBinaries/againstFirWithStableAbiAndNoPrereleaseCheck/output.txt diff --git a/compiler/testData/compileKotlinAgainstCustomBinaries/oldJvmAgainstFirWithStableAbi/source.kt b/compiler/testData/compileKotlinAgainstCustomBinaries/againstFirWithStableAbiAndNoPrereleaseCheck/source.kt similarity index 100% rename from compiler/testData/compileKotlinAgainstCustomBinaries/oldJvmAgainstFirWithStableAbi/source.kt rename to compiler/testData/compileKotlinAgainstCustomBinaries/againstFirWithStableAbiAndNoPrereleaseCheck/source.kt diff --git a/compiler/testData/compileKotlinAgainstCustomBinaries/oldJvmAgainstFirWithStableAbiAndNoPrereleaseCheck/library/a.kt b/compiler/testData/compileKotlinAgainstCustomBinaries/againstStable/library/a.kt similarity index 100% rename from compiler/testData/compileKotlinAgainstCustomBinaries/oldJvmAgainstFirWithStableAbiAndNoPrereleaseCheck/library/a.kt rename to compiler/testData/compileKotlinAgainstCustomBinaries/againstStable/library/a.kt diff --git a/compiler/testData/compileKotlinAgainstCustomBinaries/oldJvmAgainstFirWithStableAbiAndNoPrereleaseCheck/output.txt b/compiler/testData/compileKotlinAgainstCustomBinaries/againstStable/output.txt similarity index 100% rename from compiler/testData/compileKotlinAgainstCustomBinaries/oldJvmAgainstFirWithStableAbiAndNoPrereleaseCheck/output.txt rename to compiler/testData/compileKotlinAgainstCustomBinaries/againstStable/output.txt diff --git a/compiler/testData/compileKotlinAgainstCustomBinaries/oldJvmAgainstFirWithStableAbiAndNoPrereleaseCheck/source.kt b/compiler/testData/compileKotlinAgainstCustomBinaries/againstStable/source.kt similarity index 100% rename from compiler/testData/compileKotlinAgainstCustomBinaries/oldJvmAgainstFirWithStableAbiAndNoPrereleaseCheck/source.kt rename to compiler/testData/compileKotlinAgainstCustomBinaries/againstStable/source.kt diff --git a/compiler/testData/compileKotlinAgainstCustomBinaries/oldJvmAgainstJvmIr/library/a.kt b/compiler/testData/compileKotlinAgainstCustomBinaries/againstUnstable/library/a.kt similarity index 100% rename from compiler/testData/compileKotlinAgainstCustomBinaries/oldJvmAgainstJvmIr/library/a.kt rename to compiler/testData/compileKotlinAgainstCustomBinaries/againstUnstable/library/a.kt diff --git a/compiler/testData/compileKotlinAgainstCustomBinaries/againstUnstable/output.txt b/compiler/testData/compileKotlinAgainstCustomBinaries/againstUnstable/output.txt new file mode 100644 index 00000000000..c7ebc30d3da --- /dev/null +++ b/compiler/testData/compileKotlinAgainstCustomBinaries/againstUnstable/output.txt @@ -0,0 +1,8 @@ +error: classes compiled by an unstable version of the Kotlin compiler were found in dependencies. Remove them from the classpath or use '-Xallow-unstable-dependencies' to suppress errors +compiler/testData/compileKotlinAgainstCustomBinaries/againstUnstable/source.kt:4:5: error: class 'lib.AKt' is compiled by an unstable version of the Kotlin compiler and cannot be loaded by this compiler + get { Box("OK").value } + ^ +compiler/testData/compileKotlinAgainstCustomBinaries/againstUnstable/source.kt:4:11: error: class 'lib.Box' is compiled by an unstable version of the Kotlin compiler and cannot be loaded by this compiler + get { Box("OK").value } + ^ +COMPILATION_ERROR diff --git a/compiler/testData/compileKotlinAgainstCustomBinaries/oldJvmAgainstJvmIr/source.kt b/compiler/testData/compileKotlinAgainstCustomBinaries/againstUnstable/source.kt similarity index 100% rename from compiler/testData/compileKotlinAgainstCustomBinaries/oldJvmAgainstJvmIr/source.kt rename to compiler/testData/compileKotlinAgainstCustomBinaries/againstUnstable/source.kt diff --git a/compiler/testData/compileKotlinAgainstCustomBinaries/oldJvmAgainstFir/output.txt b/compiler/testData/compileKotlinAgainstCustomBinaries/oldJvmAgainstFir/output.txt deleted file mode 100644 index 4931db5f9de..00000000000 --- a/compiler/testData/compileKotlinAgainstCustomBinaries/oldJvmAgainstFir/output.txt +++ /dev/null @@ -1,8 +0,0 @@ -error: pre-release classes were found in dependencies. Remove them from the classpath, recompile with a release compiler or use '-Xskip-prerelease-check' to suppress errors -compiler/testData/compileKotlinAgainstCustomBinaries/oldJvmAgainstFir/source.kt:4:5: error: class 'lib.AKt' is compiled by a pre-release version of Kotlin and cannot be loaded by this version of the compiler - get { Box("OK").value } - ^ -compiler/testData/compileKotlinAgainstCustomBinaries/oldJvmAgainstFir/source.kt:4:11: error: class 'lib.Box' is compiled by a pre-release version of Kotlin and cannot be loaded by this version of the compiler - get { Box("OK").value } - ^ -COMPILATION_ERROR diff --git a/compiler/testData/compileKotlinAgainstCustomBinaries/oldJvmAgainstFirWithStableAbi/output.txt b/compiler/testData/compileKotlinAgainstCustomBinaries/oldJvmAgainstFirWithStableAbi/output.txt deleted file mode 100644 index 2d0dc08d41d..00000000000 --- a/compiler/testData/compileKotlinAgainstCustomBinaries/oldJvmAgainstFirWithStableAbi/output.txt +++ /dev/null @@ -1,8 +0,0 @@ -error: pre-release classes were found in dependencies. Remove them from the classpath, recompile with a release compiler or use '-Xskip-prerelease-check' to suppress errors -compiler/testData/compileKotlinAgainstCustomBinaries/oldJvmAgainstFirWithStableAbi/source.kt:4:5: error: class 'lib.AKt' is compiled by a pre-release version of Kotlin and cannot be loaded by this version of the compiler - get { Box("OK").value } - ^ -compiler/testData/compileKotlinAgainstCustomBinaries/oldJvmAgainstFirWithStableAbi/source.kt:4:11: error: class 'lib.Box' is compiled by a pre-release version of Kotlin and cannot be loaded by this version of the compiler - get { Box("OK").value } - ^ -COMPILATION_ERROR diff --git a/compiler/testData/compileKotlinAgainstCustomBinaries/oldJvmAgainstJvmIr/output.txt b/compiler/testData/compileKotlinAgainstCustomBinaries/oldJvmAgainstJvmIr/output.txt deleted file mode 100644 index d86bac9de59..00000000000 --- a/compiler/testData/compileKotlinAgainstCustomBinaries/oldJvmAgainstJvmIr/output.txt +++ /dev/null @@ -1 +0,0 @@ -OK diff --git a/compiler/testData/compileKotlinAgainstCustomBinaries/oldJvmAgainstJvmIrWithUnstableAbi/library/a.kt b/compiler/testData/compileKotlinAgainstCustomBinaries/oldJvmAgainstJvmIrWithUnstableAbi/library/a.kt deleted file mode 100644 index 71e3e5d293d..00000000000 --- a/compiler/testData/compileKotlinAgainstCustomBinaries/oldJvmAgainstJvmIrWithUnstableAbi/library/a.kt +++ /dev/null @@ -1,5 +0,0 @@ -package lib - -class Box(val value: String) - -inline fun get(block: () -> T): T = block() diff --git a/compiler/testData/compileKotlinAgainstCustomBinaries/oldJvmAgainstJvmIrWithUnstableAbi/output.txt b/compiler/testData/compileKotlinAgainstCustomBinaries/oldJvmAgainstJvmIrWithUnstableAbi/output.txt deleted file mode 100644 index 6914512561d..00000000000 --- a/compiler/testData/compileKotlinAgainstCustomBinaries/oldJvmAgainstJvmIrWithUnstableAbi/output.txt +++ /dev/null @@ -1,8 +0,0 @@ -error: classes compiled by an unstable version of the Kotlin compiler were found in dependencies. Remove them from the classpath or use '-Xallow-unstable-dependencies' to suppress errors -compiler/testData/compileKotlinAgainstCustomBinaries/oldJvmAgainstJvmIrWithUnstableAbi/source.kt:4:5: error: class 'lib.AKt' is compiled by an unstable version of the Kotlin compiler and cannot be loaded by this compiler - get { Box("OK").value } - ^ -compiler/testData/compileKotlinAgainstCustomBinaries/oldJvmAgainstJvmIrWithUnstableAbi/source.kt:4:11: error: class 'lib.Box' is compiled by an unstable version of the Kotlin compiler and cannot be loaded by this compiler - get { Box("OK").value } - ^ -COMPILATION_ERROR diff --git a/compiler/testData/compileKotlinAgainstCustomBinaries/oldJvmAgainstJvmIrWithUnstableAbi/source.kt b/compiler/testData/compileKotlinAgainstCustomBinaries/oldJvmAgainstJvmIrWithUnstableAbi/source.kt deleted file mode 100644 index ffadd735100..00000000000 --- a/compiler/testData/compileKotlinAgainstCustomBinaries/oldJvmAgainstJvmIrWithUnstableAbi/source.kt +++ /dev/null @@ -1,5 +0,0 @@ -import lib.* - -fun main() { - get { Box("OK").value } -} diff --git a/compiler/tests/org/jetbrains/kotlin/jvm/compiler/CompileKotlinAgainstCustomBinariesTest.kt b/compiler/tests/org/jetbrains/kotlin/jvm/compiler/CompileKotlinAgainstCustomBinariesTest.kt index eb509591902..f74bfc0bebb 100644 --- a/compiler/tests/org/jetbrains/kotlin/jvm/compiler/CompileKotlinAgainstCustomBinariesTest.kt +++ b/compiler/tests/org/jetbrains/kotlin/jvm/compiler/CompileKotlinAgainstCustomBinariesTest.kt @@ -648,11 +648,6 @@ class CompileKotlinAgainstCustomBinariesTest : AbstractKotlinCompilerIntegration compileKotlin("source.kt", tmpdir, listOf(library), additionalOptions = listOf("-language-version", "2.0")) } - fun testFirAgainstOldJvm() { - val library = compileLibrary("library") - compileKotlin("source.kt", tmpdir, listOf(library), additionalOptions = listOf("-language-version", "2.0")) - } - fun testFirIncorrectJavaSignature() { compileKotlin( "source.kt", tmpdir, @@ -671,7 +666,7 @@ class CompileKotlinAgainstCustomBinariesTest : AbstractKotlinCompilerIntegration ) } - fun testOldJvmAgainstJvmIr() { + fun testAgainstStable() { val library = compileLibrary("library") compileKotlin("source.kt", tmpdir, listOf(library)) @@ -679,7 +674,7 @@ class CompileKotlinAgainstCustomBinariesTest : AbstractKotlinCompilerIntegration compileKotlin("source.kt", tmpdir, listOf(library2)) } - fun testOldJvmAgainstFir() { + fun testAgainstFir() { val library = compileLibrary("library", additionalOptions = listOf("-language-version", "2.0")) compileKotlin("source.kt", tmpdir, listOf(library)) @@ -687,22 +682,22 @@ class CompileKotlinAgainstCustomBinariesTest : AbstractKotlinCompilerIntegration compileKotlin("source.kt", tmpdir, listOf(library2)) } - fun testOldJvmAgainstJvmIrWithUnstableAbi() { + fun testAgainstUnstable() { val library = compileLibrary("library", additionalOptions = listOf("-Xabi-stability=unstable")) compileKotlin("source.kt", tmpdir, listOf(library)) } - fun testOldJvmAgainstFirWithStableAbi() { + fun testAgainstFirWithStableAbi() { val library = compileLibrary("library", additionalOptions = listOf("-language-version", "2.0", "-Xabi-stability=stable")) compileKotlin("source.kt", tmpdir, listOf(library)) } - fun testOldJvmAgainstFirWithStableAbiAndNoPrereleaseCheck() { + fun testAgainstFirWithStableAbiAndNoPrereleaseCheck() { val library = compileLibrary("library", additionalOptions = listOf("-language-version", "2.0", "-Xabi-stability=stable")) compileKotlin("source.kt", tmpdir, listOf(library), additionalOptions = listOf("-Xskip-prerelease-check")) } - fun testOldJvmAgainstFirWithAllowUnstableDependencies() { + fun testAgainstFirWithAllowUnstableDependencies() { val library = compileLibrary("library", additionalOptions = listOf("-language-version", "2.0")) compileKotlin("source.kt", tmpdir, listOf(library), additionalOptions = listOf("-Xallow-unstable-dependencies", "-Xskip-metadata-version-check")) }