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:
Aleksei.Cherepanov
2023-07-25 17:59:47 +02:00
committed by Space Team
parent 6089d3efc5
commit f6963d04e9
5 changed files with 10 additions and 8 deletions
@@ -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)
@@ -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")
@@ -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")
@@ -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")