diff --git a/compiler/test-infrastructure/tests/org/jetbrains/kotlin/test/directives/ConfigurationDirectives.kt b/compiler/test-infrastructure/tests/org/jetbrains/kotlin/test/directives/ConfigurationDirectives.kt index 4e011853f10..1fabe55222a 100644 --- a/compiler/test-infrastructure/tests/org/jetbrains/kotlin/test/directives/ConfigurationDirectives.kt +++ b/compiler/test-infrastructure/tests/org/jetbrains/kotlin/test/directives/ConfigurationDirectives.kt @@ -12,11 +12,5 @@ object ConfigurationDirectives : SimpleDirectivesContainer() { "List of kotlin configuration flags" ) - val WITH_RUNTIME by directive( - description = """ - Add Kotlin stdlib to classpath - This directive is deprecated, use WITH_STDLIB instead - """.trimIndent() - ) - val WITH_STDLIB by directive("Add Kotlin runtime to classpath") + val WITH_STDLIB by directive("Add Kotlin stdlib to classpath") } diff --git a/compiler/testData/codegen/box/collections/removeClashWithGenerics.kt b/compiler/testData/codegen/box/collections/removeClashWithGenerics.kt index bb1b728c1bc..95957cebc26 100644 --- a/compiler/testData/codegen/box/collections/removeClashWithGenerics.kt +++ b/compiler/testData/codegen/box/collections/removeClashWithGenerics.kt @@ -1,5 +1,5 @@ // TARGET_BACKEND: JVM -// WITH_RUNTUME +// WITH_STDLIB // See also: KT-42083 diff --git a/compiler/testData/codegen/bytecodeListing/contextReceivers/fromKEEP/monoidSum.kt b/compiler/testData/codegen/bytecodeListing/contextReceivers/fromKEEP/monoidSum.kt index 381fcf52a87..9301d7706d1 100644 --- a/compiler/testData/codegen/bytecodeListing/contextReceivers/fromKEEP/monoidSum.kt +++ b/compiler/testData/codegen/bytecodeListing/contextReceivers/fromKEEP/monoidSum.kt @@ -2,7 +2,7 @@ // TARGET_BACKEND: JVM_IR // IGNORE_BACKEND_FIR: JVM_IR // IGNORE_BACKEND: JVM -// WITH_RUNTIME +// WITH_STDLIB interface Semigroup { infix fun T.combine(other: T): T diff --git a/compiler/testData/diagnostics/tests/checkArguments/kt49276.fir.kt b/compiler/testData/diagnostics/tests/checkArguments/kt49276.fir.kt index 0d561021b9f..0f64837b43c 100644 --- a/compiler/testData/diagnostics/tests/checkArguments/kt49276.fir.kt +++ b/compiler/testData/diagnostics/tests/checkArguments/kt49276.fir.kt @@ -1,4 +1,4 @@ -// WITH_RUNTIME +// WITH_STDLIB fun SmartList(x: E) {} fun SmartList(x: Collection) {} diff --git a/compiler/testData/diagnostics/tests/checkArguments/kt49276.kt b/compiler/testData/diagnostics/tests/checkArguments/kt49276.kt index 3317f6d6fad..7df678d70bf 100644 --- a/compiler/testData/diagnostics/tests/checkArguments/kt49276.kt +++ b/compiler/testData/diagnostics/tests/checkArguments/kt49276.kt @@ -1,4 +1,4 @@ -// WITH_RUNTIME +// WITH_STDLIB fun SmartList(x: E) {} fun SmartList(x: Collection) {} diff --git a/compiler/testData/diagnostics/tests/checkArguments/kt49276Disabled.kt b/compiler/testData/diagnostics/tests/checkArguments/kt49276Disabled.kt index ac748b51f36..75a962db9ef 100644 --- a/compiler/testData/diagnostics/tests/checkArguments/kt49276Disabled.kt +++ b/compiler/testData/diagnostics/tests/checkArguments/kt49276Disabled.kt @@ -1,6 +1,6 @@ // FIR_IDENTICAL // !LANGUAGE: +DisableCheckingChangedProgressionsResolve -// WITH_RUNTIME +// WITH_STDLIB fun SmartList(x: E) {} fun SmartList(x: Collection) {} diff --git a/compiler/testData/diagnostics/tests/checkArguments/kt49276Error.fir.kt b/compiler/testData/diagnostics/tests/checkArguments/kt49276Error.fir.kt index 3f6e5bda5e6..dfa365cf9ba 100644 --- a/compiler/testData/diagnostics/tests/checkArguments/kt49276Error.fir.kt +++ b/compiler/testData/diagnostics/tests/checkArguments/kt49276Error.fir.kt @@ -1,4 +1,4 @@ -// WITH_RUNTIME +// WITH_STDLIB // !LANGUAGE: +ProgressionsChangingResolve fun SmartList(x: E) {} diff --git a/compiler/testData/diagnostics/tests/checkArguments/kt49276Error.kt b/compiler/testData/diagnostics/tests/checkArguments/kt49276Error.kt index f4083aa3c90..5f9e35d1217 100644 --- a/compiler/testData/diagnostics/tests/checkArguments/kt49276Error.kt +++ b/compiler/testData/diagnostics/tests/checkArguments/kt49276Error.kt @@ -1,4 +1,4 @@ -// WITH_RUNTIME +// WITH_STDLIB // !LANGUAGE: +ProgressionsChangingResolve fun SmartList(x: E) {} diff --git a/compiler/testData/diagnostics/tests/extensions/contextReceivers/fromKEEP/decimateEveryEvenThird.fir.kt b/compiler/testData/diagnostics/tests/extensions/contextReceivers/fromKEEP/decimateEveryEvenThird.fir.kt index 09de60e9dd8..e09d5221ac1 100644 --- a/compiler/testData/diagnostics/tests/extensions/contextReceivers/fromKEEP/decimateEveryEvenThird.fir.kt +++ b/compiler/testData/diagnostics/tests/extensions/contextReceivers/fromKEEP/decimateEveryEvenThird.fir.kt @@ -1,5 +1,5 @@ // !LANGUAGE: +ContextReceivers -// WITH_RUNTIME +// WITH_STDLIB fun List.decimateEveryEvenThird() = sequence { var counter = 1 diff --git a/compiler/testData/diagnostics/tests/extensions/contextReceivers/fromKEEP/decimateEveryEvenThird.kt b/compiler/testData/diagnostics/tests/extensions/contextReceivers/fromKEEP/decimateEveryEvenThird.kt index 60357f53e48..a0878c3deb3 100644 --- a/compiler/testData/diagnostics/tests/extensions/contextReceivers/fromKEEP/decimateEveryEvenThird.kt +++ b/compiler/testData/diagnostics/tests/extensions/contextReceivers/fromKEEP/decimateEveryEvenThird.kt @@ -1,5 +1,5 @@ // !LANGUAGE: +ContextReceivers -// WITH_RUNTIME +// WITH_STDLIB fun List.decimateEveryEvenThird() = sequence { var counter = 1 diff --git a/compiler/testData/diagnostics/tests/resolve/kt49736.fir.kt b/compiler/testData/diagnostics/tests/resolve/kt49736.fir.kt index 4e6a6681103..813e861049d 100644 --- a/compiler/testData/diagnostics/tests/resolve/kt49736.fir.kt +++ b/compiler/testData/diagnostics/tests/resolve/kt49736.fir.kt @@ -1,4 +1,4 @@ -// WITH_RUNTIME +// WITH_STDLIB import kotlin.collections.forEach as forEach1 diff --git a/compiler/testData/diagnostics/tests/resolve/kt49736.kt b/compiler/testData/diagnostics/tests/resolve/kt49736.kt index d27c465a288..f4d19328d60 100644 --- a/compiler/testData/diagnostics/tests/resolve/kt49736.kt +++ b/compiler/testData/diagnostics/tests/resolve/kt49736.kt @@ -1,4 +1,4 @@ -// WITH_RUNTIME +// WITH_STDLIB import kotlin.collections.forEach as forEach1 diff --git a/compiler/testData/diagnostics/tests/varargs/kt10926.fir.kt b/compiler/testData/diagnostics/tests/varargs/kt10926.fir.kt index aa73063a880..17c960ac6c5 100644 --- a/compiler/testData/diagnostics/tests/varargs/kt10926.fir.kt +++ b/compiler/testData/diagnostics/tests/varargs/kt10926.fir.kt @@ -1,4 +1,4 @@ -// WITH_RUNTIME +// WITH_STDLIB class AllCollection2 { fun addAll(vararg values: T, values2: Array) = "OK" // 1 diff --git a/compiler/testData/diagnostics/tests/varargs/kt10926.kt b/compiler/testData/diagnostics/tests/varargs/kt10926.kt index 598f2c44362..4f1a7f741af 100644 --- a/compiler/testData/diagnostics/tests/varargs/kt10926.kt +++ b/compiler/testData/diagnostics/tests/varargs/kt10926.kt @@ -1,4 +1,4 @@ -// WITH_RUNTIME +// WITH_STDLIB class AllCollection2 { fun addAll(vararg values: T, values2: Array) = "OK" // 1 diff --git a/compiler/testData/diagnostics/tests/varargs/kt10926EnabledFeature.fir.kt b/compiler/testData/diagnostics/tests/varargs/kt10926EnabledFeature.fir.kt index 5bedc331a8d..992617cb0e4 100644 --- a/compiler/testData/diagnostics/tests/varargs/kt10926EnabledFeature.fir.kt +++ b/compiler/testData/diagnostics/tests/varargs/kt10926EnabledFeature.fir.kt @@ -1,5 +1,5 @@ // !LANGUAGE: +EliminateAmbiguitiesWithExternalTypeParameters -// WITH_RUNTIME +// WITH_STDLIB class AllCollection { fun addAll(vararg values: T, values2: Array) = "OK" // 1 diff --git a/compiler/testData/diagnostics/tests/varargs/kt10926EnabledFeature.kt b/compiler/testData/diagnostics/tests/varargs/kt10926EnabledFeature.kt index db072016a0c..f5f493b0a76 100644 --- a/compiler/testData/diagnostics/tests/varargs/kt10926EnabledFeature.kt +++ b/compiler/testData/diagnostics/tests/varargs/kt10926EnabledFeature.kt @@ -1,5 +1,5 @@ // !LANGUAGE: +EliminateAmbiguitiesWithExternalTypeParameters -// WITH_RUNTIME +// WITH_STDLIB class AllCollection { fun addAll(vararg values: T, values2: Array) = "OK" // 1 diff --git a/compiler/testData/ir/irText/declarations/contextReceivers/fromKEEP/dp.kt b/compiler/testData/ir/irText/declarations/contextReceivers/fromKEEP/dp.kt index 9973c7a317a..253b7993149 100644 --- a/compiler/testData/ir/irText/declarations/contextReceivers/fromKEEP/dp.kt +++ b/compiler/testData/ir/irText/declarations/contextReceivers/fromKEEP/dp.kt @@ -1,7 +1,7 @@ // !LANGUAGE: +ContextReceivers // TARGET_BACKEND: JVM_IR // IGNORE_BACKEND_FIR: JVM_IR -// WITH_RUNTIME +// WITH_STDLIB class View { val coefficient = 42 diff --git a/compiler/testData/ir/irText/declarations/contextReceivers/fromKEEP/monoidSum.kt b/compiler/testData/ir/irText/declarations/contextReceivers/fromKEEP/monoidSum.kt index 6c3c3d3cd00..2c9460bd69b 100644 --- a/compiler/testData/ir/irText/declarations/contextReceivers/fromKEEP/monoidSum.kt +++ b/compiler/testData/ir/irText/declarations/contextReceivers/fromKEEP/monoidSum.kt @@ -1,7 +1,7 @@ // !LANGUAGE: +ContextReceivers // TARGET_BACKEND: JVM_IR // IGNORE_BACKEND_FIR: JVM_IR -// WITH_RUNTIME +// WITH_STDLIB interface Semigroup { infix fun T.combine(other: T): T diff --git a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/services/configuration/JsEnvironmentConfigurator.kt b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/services/configuration/JsEnvironmentConfigurator.kt index f042cf48385..2f9bfe70489 100644 --- a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/services/configuration/JsEnvironmentConfigurator.kt +++ b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/services/configuration/JsEnvironmentConfigurator.kt @@ -140,8 +140,7 @@ class JsEnvironmentConfigurator(testServices: TestServices) : EnvironmentConfigu fun getRuntimePathsForModule(module: TestModule, testServices: TestServices): List { val result = mutableListOf() val needsFullIrRuntime = JsEnvironmentConfigurationDirectives.KJS_WITH_FULL_RUNTIME in module.directives || - ConfigurationDirectives.WITH_STDLIB in module.directives || - ConfigurationDirectives.WITH_RUNTIME in module.directives + ConfigurationDirectives.WITH_STDLIB in module.directives val names = if (needsFullIrRuntime) listOf("full.stdlib", "kotlin.test") else listOf("reduced.stdlib") names.mapTo(result) { System.getProperty("kotlin.js.$it.path") } diff --git a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/services/configuration/JvmEnvironmentConfigurator.kt b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/services/configuration/JvmEnvironmentConfigurator.kt index 4c6b6b107a3..ade61041fcd 100644 --- a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/services/configuration/JvmEnvironmentConfigurator.kt +++ b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/services/configuration/JvmEnvironmentConfigurator.kt @@ -71,16 +71,15 @@ class JvmEnvironmentConfigurator(testServices: TestServices) : EnvironmentConfig private const val JAVA_BINARIES_JAR_NAME = "java-binaries" fun extractConfigurationKind(registeredDirectives: RegisteredDirectives): ConfigurationKind { - val withRuntime = ConfigurationDirectives.WITH_RUNTIME in registeredDirectives || - ConfigurationDirectives.WITH_STDLIB in registeredDirectives + val withStdlib = ConfigurationDirectives.WITH_STDLIB in registeredDirectives val withReflect = JvmEnvironmentConfigurationDirectives.WITH_REFLECT in registeredDirectives val noRuntime = JvmEnvironmentConfigurationDirectives.NO_RUNTIME in registeredDirectives - if (noRuntime && withRuntime) { - error("NO_RUNTIME and WITH_RUNTIME can not be used together") + if (noRuntime && withStdlib) { + error("NO_RUNTIME and WITH_STDLIB can not be used together") } return when { - withRuntime && !withReflect -> ConfigurationKind.NO_KOTLIN_REFLECT - withRuntime || withReflect -> ConfigurationKind.ALL + withStdlib && !withReflect -> ConfigurationKind.NO_KOTLIN_REFLECT + withStdlib || withReflect -> ConfigurationKind.ALL noRuntime -> ConfigurationKind.JDK_NO_RUNTIME else -> ConfigurationKind.JDK_ONLY } diff --git a/compiler/tests-common/tests/org/jetbrains/kotlin/ir/AbstractIrGeneratorTestCase.kt b/compiler/tests-common/tests/org/jetbrains/kotlin/ir/AbstractIrGeneratorTestCase.kt index a1db5099699..8beda3504e4 100644 --- a/compiler/tests-common/tests/org/jetbrains/kotlin/ir/AbstractIrGeneratorTestCase.kt +++ b/compiler/tests-common/tests/org/jetbrains/kotlin/ir/AbstractIrGeneratorTestCase.kt @@ -64,9 +64,6 @@ abstract class AbstractIrGeneratorTestCase : CodegenTestCase() { var addRuntime = false var addReflect = false for (file in files) { - if (InTextDirectivesUtils.isDirectiveDefined(file.content, "WITH_RUNTIME")) { - addRuntime = true - } if (InTextDirectivesUtils.isDirectiveDefined(file.content, "WITH_STDLIB")) { addRuntime = true } diff --git a/compiler/tests-common/tests/org/jetbrains/kotlin/test/KotlinBaseTest.kt b/compiler/tests-common/tests/org/jetbrains/kotlin/test/KotlinBaseTest.kt index 0c02178edcd..64afc1a55c7 100644 --- a/compiler/tests-common/tests/org/jetbrains/kotlin/test/KotlinBaseTest.kt +++ b/compiler/tests-common/tests/org/jetbrains/kotlin/test/KotlinBaseTest.kt @@ -194,9 +194,6 @@ abstract class KotlinBaseTest : KtUsefulTestCase() var addRuntime = false var addReflect = false for (file in files) { - if (InTextDirectivesUtils.isDirectiveDefined(file.content, "WITH_RUNTIME")) { - addRuntime = true - } if (InTextDirectivesUtils.isDirectiveDefined(file.content, "WITH_STDLIB")) { addRuntime = true } diff --git a/compiler/tests/org/jetbrains/kotlin/multiplatform/AbstractMultiPlatformIntegrationTest.kt b/compiler/tests/org/jetbrains/kotlin/multiplatform/AbstractMultiPlatformIntegrationTest.kt index b72963f020c..566cca7ffcf 100644 --- a/compiler/tests/org/jetbrains/kotlin/multiplatform/AbstractMultiPlatformIntegrationTest.kt +++ b/compiler/tests/org/jetbrains/kotlin/multiplatform/AbstractMultiPlatformIntegrationTest.kt @@ -43,9 +43,8 @@ abstract class AbstractMultiPlatformIntegrationTest : KtUsefulTestCase() { val tmpdir = KtTestUtil.tmpDir(getTestName(true)) - val withRuntime = InTextDirectivesUtils.isDirectiveDefined(commonSrc.readText(), "WITH_RUNTIME") || - InTextDirectivesUtils.isDirectiveDefined(commonSrc.readText(), "WITH_STDLIB") - val optionalStdlibCommon = if (withRuntime) arrayOf("-cp", findStdlibCommon().absolutePath) else emptyArray() + val withStdlib = InTextDirectivesUtils.isDirectiveDefined(commonSrc.readText(), "WITH_STDLIB") + val optionalStdlibCommon = if (withStdlib) arrayOf("-cp", findStdlibCommon().absolutePath) else emptyArray() val commonDest = File(tmpdir, "common").absolutePath val jvmDest = File(tmpdir, "jvm").absolutePath.takeIf { jvmSrc != null } diff --git a/plugins/kotlin-serialization/kotlin-serialization-compiler/testData/boxIr/sealedInterfaces.kt b/plugins/kotlin-serialization/kotlin-serialization-compiler/testData/boxIr/sealedInterfaces.kt index 56be40164dd..55692594a93 100644 --- a/plugins/kotlin-serialization/kotlin-serialization-compiler/testData/boxIr/sealedInterfaces.kt +++ b/plugins/kotlin-serialization/kotlin-serialization-compiler/testData/boxIr/sealedInterfaces.kt @@ -1,7 +1,7 @@ // IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM_IR -// WITH_RUNTIME +// WITH_STDLIB package a