Drop all usages of WITH_RUNTIME directive
This commit is contained in:
committed by
TeamCityServer
parent
1874318954
commit
b131c52889
+1
-7
@@ -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")
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// TARGET_BACKEND: JVM
|
||||
// WITH_RUNTUME
|
||||
// WITH_STDLIB
|
||||
|
||||
// See also: KT-42083
|
||||
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
// TARGET_BACKEND: JVM_IR
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
// IGNORE_BACKEND: JVM
|
||||
// WITH_RUNTIME
|
||||
// WITH_STDLIB
|
||||
|
||||
interface Semigroup<T> {
|
||||
infix fun T.combine(other: T): T
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// WITH_RUNTIME
|
||||
// WITH_STDLIB
|
||||
|
||||
fun <E> SmartList(x: E) {}
|
||||
fun <E> SmartList(x: Collection<E>) {}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// WITH_RUNTIME
|
||||
// WITH_STDLIB
|
||||
|
||||
fun <E> SmartList(x: E) {}
|
||||
fun <E> SmartList(x: Collection<E>) {}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// FIR_IDENTICAL
|
||||
// !LANGUAGE: +DisableCheckingChangedProgressionsResolve
|
||||
// WITH_RUNTIME
|
||||
// WITH_STDLIB
|
||||
|
||||
fun <E> SmartList(x: E) {}
|
||||
fun <E> SmartList(x: Collection<E>) {}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// WITH_RUNTIME
|
||||
// WITH_STDLIB
|
||||
// !LANGUAGE: +ProgressionsChangingResolve
|
||||
|
||||
fun <E> SmartList(x: E) {}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// WITH_RUNTIME
|
||||
// WITH_STDLIB
|
||||
// !LANGUAGE: +ProgressionsChangingResolve
|
||||
|
||||
fun <E> SmartList(x: E) {}
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// !LANGUAGE: +ContextReceivers
|
||||
// WITH_RUNTIME
|
||||
// WITH_STDLIB
|
||||
|
||||
fun List<Int>.decimateEveryEvenThird() = <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>sequence<!> {
|
||||
var counter = 1
|
||||
|
||||
Vendored
+1
-1
@@ -1,5 +1,5 @@
|
||||
// !LANGUAGE: +ContextReceivers
|
||||
// WITH_RUNTIME
|
||||
// WITH_STDLIB
|
||||
|
||||
fun List<Int>.decimateEveryEvenThird() = sequence {
|
||||
var counter = 1
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// WITH_RUNTIME
|
||||
// WITH_STDLIB
|
||||
|
||||
import kotlin.collections.forEach as forEach1
|
||||
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// WITH_RUNTIME
|
||||
// WITH_STDLIB
|
||||
|
||||
import kotlin.collections.forEach as forEach1
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// WITH_RUNTIME
|
||||
// WITH_STDLIB
|
||||
|
||||
class AllCollection2<T> {
|
||||
fun <K, T> addAll(vararg values: T, values2: Array<K>) = "OK" // 1
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// WITH_RUNTIME
|
||||
// WITH_STDLIB
|
||||
|
||||
class AllCollection2<T> {
|
||||
fun <K, T> addAll(vararg values: T, values2: Array<K>) = "OK" // 1
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// !LANGUAGE: +EliminateAmbiguitiesWithExternalTypeParameters
|
||||
// WITH_RUNTIME
|
||||
// WITH_STDLIB
|
||||
|
||||
class AllCollection<T> {
|
||||
fun <K, T> addAll(vararg values: T, values2: Array<K>) = "OK" // 1
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// !LANGUAGE: +EliminateAmbiguitiesWithExternalTypeParameters
|
||||
// WITH_RUNTIME
|
||||
// WITH_STDLIB
|
||||
|
||||
class AllCollection<T> {
|
||||
fun <K, T> addAll(vararg values: T, values2: Array<K>) = "OK" // 1
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// !LANGUAGE: +ContextReceivers
|
||||
// TARGET_BACKEND: JVM_IR
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
// WITH_RUNTIME
|
||||
// WITH_STDLIB
|
||||
|
||||
class View {
|
||||
val coefficient = 42
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
// !LANGUAGE: +ContextReceivers
|
||||
// TARGET_BACKEND: JVM_IR
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
// WITH_RUNTIME
|
||||
// WITH_STDLIB
|
||||
|
||||
interface Semigroup<T> {
|
||||
infix fun T.combine(other: T): T
|
||||
|
||||
+1
-2
@@ -140,8 +140,7 @@ class JsEnvironmentConfigurator(testServices: TestServices) : EnvironmentConfigu
|
||||
fun getRuntimePathsForModule(module: TestModule, testServices: TestServices): List<String> {
|
||||
val result = mutableListOf<String>()
|
||||
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") }
|
||||
|
||||
+5
-6
@@ -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
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -194,9 +194,6 @@ abstract class KotlinBaseTest<F : KotlinBaseTest.TestFile> : 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
|
||||
}
|
||||
|
||||
+2
-3
@@ -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 }
|
||||
|
||||
Vendored
+1
-1
@@ -1,7 +1,7 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
// TARGET_BACKEND: JVM_IR
|
||||
|
||||
// WITH_RUNTIME
|
||||
// WITH_STDLIB
|
||||
|
||||
package a
|
||||
|
||||
|
||||
Reference in New Issue
Block a user