Run K1 configuration on TC with languageVersion="1.9"
KotlinVersion is overrided on TC, so we need to rely on LanguageVersion #KT-60589 Fixed
This commit is contained in:
committed by
Space Team
parent
6089d3efc5
commit
f6963d04e9
+2
-1
@@ -6,12 +6,13 @@
|
||||
package org.jetbrains.kotlin.jps.build
|
||||
|
||||
import org.jetbrains.kotlin.cli.common.arguments.CommonCompilerArguments
|
||||
import org.jetbrains.kotlin.config.LanguageVersion
|
||||
|
||||
abstract class AbstractIncrementalK1JvmJpsTest(
|
||||
allowNoFilesWithSuffixInTestData: Boolean = false
|
||||
) : AbstractIncrementalJvmJpsTest(allowNoFilesWithSuffixInTestData = allowNoFilesWithSuffixInTestData) {
|
||||
override fun updateCommandLineArguments(arguments: CommonCompilerArguments) {
|
||||
if (KotlinVersion.CURRENT.major >= 2) {
|
||||
if (LanguageVersion.LATEST_STABLE.major >= 2) {
|
||||
arguments.languageVersion = "1.9"
|
||||
}
|
||||
super.updateCommandLineArguments(arguments)
|
||||
|
||||
+2
-1
@@ -6,13 +6,14 @@
|
||||
package org.jetbrains.kotlin.jps.build
|
||||
|
||||
import org.jetbrains.kotlin.cli.common.arguments.CommonCompilerArguments
|
||||
import org.jetbrains.kotlin.config.LanguageVersion
|
||||
import org.jetbrains.kotlin.incremental.testingUtils.BuildLogFinder
|
||||
|
||||
abstract class AbstractIncrementalK2FirICLightTreeJvmJpsTest(
|
||||
allowNoFilesWithSuffixInTestData: Boolean = false
|
||||
) : AbstractIncrementalJpsTest(allowNoFilesWithSuffixInTestData = allowNoFilesWithSuffixInTestData) {
|
||||
override fun updateCommandLineArguments(arguments: CommonCompilerArguments) {
|
||||
if (KotlinVersion.CURRENT.major < 2) {
|
||||
if (LanguageVersion.LATEST_STABLE.major < 2) {
|
||||
arguments.languageVersion = "2.0"
|
||||
}
|
||||
additionalCommandLineArguments = additionalCommandLineArguments + listOf("-Xuse-fir-ic", "-Xuse-fir-lt")
|
||||
|
||||
+2
-1
@@ -6,13 +6,14 @@
|
||||
package org.jetbrains.kotlin.jps.build
|
||||
|
||||
import org.jetbrains.kotlin.cli.common.arguments.CommonCompilerArguments
|
||||
import org.jetbrains.kotlin.config.LanguageVersion
|
||||
import org.jetbrains.kotlin.incremental.testingUtils.BuildLogFinder
|
||||
|
||||
abstract class AbstractIncrementalK2JvmJpsTest(
|
||||
allowNoFilesWithSuffixInTestData: Boolean = false
|
||||
) : AbstractIncrementalJpsTest(allowNoFilesWithSuffixInTestData = allowNoFilesWithSuffixInTestData) {
|
||||
override fun updateCommandLineArguments(arguments: CommonCompilerArguments) {
|
||||
if (KotlinVersion.CURRENT.major < 2) {
|
||||
if (LanguageVersion.LATEST_STABLE.major < 2) {
|
||||
arguments.languageVersion = "2.0"
|
||||
}
|
||||
additionalCommandLineArguments = additionalCommandLineArguments + listOf("-Xuse-fir-lt=false")
|
||||
|
||||
+2
-1
@@ -6,13 +6,14 @@
|
||||
package org.jetbrains.kotlin.jps.build
|
||||
|
||||
import org.jetbrains.kotlin.cli.common.arguments.CommonCompilerArguments
|
||||
import org.jetbrains.kotlin.config.LanguageVersion
|
||||
import org.jetbrains.kotlin.incremental.testingUtils.BuildLogFinder
|
||||
|
||||
abstract class AbstractIncrementalK2LightTreeJvmJpsTest(
|
||||
allowNoFilesWithSuffixInTestData: Boolean = false
|
||||
) : AbstractIncrementalJpsTest(allowNoFilesWithSuffixInTestData = allowNoFilesWithSuffixInTestData) {
|
||||
override fun updateCommandLineArguments(arguments: CommonCompilerArguments) {
|
||||
if (KotlinVersion.CURRENT.major < 2) {
|
||||
if (LanguageVersion.LATEST_STABLE.major < 2) {
|
||||
arguments.languageVersion = "2.0"
|
||||
}
|
||||
additionalCommandLineArguments = additionalCommandLineArguments + listOf("-Xuse-fir-lt=true")
|
||||
|
||||
+2
-4
@@ -5,6 +5,7 @@
|
||||
|
||||
package org.jetbrains.kotlin.konan.blackboxtest.support.settings
|
||||
|
||||
import org.jetbrains.kotlin.config.LanguageVersion
|
||||
import org.jetbrains.kotlin.konan.blackboxtest.support.MutedOption
|
||||
import org.jetbrains.kotlin.konan.blackboxtest.support.TestKind
|
||||
import org.jetbrains.kotlin.konan.blackboxtest.support.runner.LocalTestRunner
|
||||
@@ -259,9 +260,6 @@ internal sealed class CacheMode {
|
||||
}
|
||||
}
|
||||
|
||||
private fun KotlinVersion.toCanonicalString(): String =
|
||||
"$major.$minor"
|
||||
|
||||
internal enum class PipelineType(val mutedOption: MutedOption, val compilerFlags: List<String>) {
|
||||
K1(
|
||||
MutedOption.K1,
|
||||
@@ -269,7 +267,7 @@ internal enum class PipelineType(val mutedOption: MutedOption, val compilerFlags
|
||||
),
|
||||
K2(
|
||||
MutedOption.K2,
|
||||
listOf("-language-version", if (KotlinVersion.CURRENT.major < 2) "2.0" else KotlinVersion.CURRENT.toCanonicalString())
|
||||
listOf("-language-version", if (LanguageVersion.LATEST_STABLE.major < 2) "2.0" else LanguageVersion.LATEST_STABLE.toString())
|
||||
);
|
||||
|
||||
override fun toString() = if (compilerFlags.isEmpty()) "" else compilerFlags.joinToString(prefix = "(", postfix = ")", separator = " ")
|
||||
|
||||
Reference in New Issue
Block a user