From 77dba281a34d708127fb40f55745a00b739586fd Mon Sep 17 00:00:00 2001 From: Alexander Udalov Date: Tue, 24 Oct 2023 23:09:18 +0200 Subject: [PATCH] CLI: remove obsolete -Xbuiltins-from-sources Looks like it has no effect anymore after 3f2e996803. --- .../CommonCompilerArgumentsCopyGenerated.kt | 1 - .../arguments/CommonCompilerArguments.kt | 11 ---------- .../jetbrains/kotlin/config/AnalysisFlags.kt | 3 --- compiler/testData/cli/js/jsExtraHelp.out | 1 - compiler/testData/cli/jvm/extraHelp.out | 1 - .../interpreter/AbstractIrInterpreterTest.kt | 20 ++++--------------- 6 files changed, 4 insertions(+), 33 deletions(-) diff --git a/compiler/cli/cli-common/gen/org/jetbrains/kotlin/cli/common/arguments/CommonCompilerArgumentsCopyGenerated.kt b/compiler/cli/cli-common/gen/org/jetbrains/kotlin/cli/common/arguments/CommonCompilerArgumentsCopyGenerated.kt index 5b742c2da65..8bcf85ec583 100644 --- a/compiler/cli/cli-common/gen/org/jetbrains/kotlin/cli/common/arguments/CommonCompilerArgumentsCopyGenerated.kt +++ b/compiler/cli/cli-common/gen/org/jetbrains/kotlin/cli/common/arguments/CommonCompilerArgumentsCopyGenerated.kt @@ -15,7 +15,6 @@ fun copyCommonCompilerArguments(from: CommonCompilerArguments, to: CommonCompile to.apiVersion = from.apiVersion to.autoAdvanceApiVersion = from.autoAdvanceApiVersion to.autoAdvanceLanguageVersion = from.autoAdvanceLanguageVersion - to.builtInsFromSources = from.builtInsFromSources to.checkPhaseConditions = from.checkPhaseConditions to.checkStickyPhaseConditions = from.checkStickyPhaseConditions to.commonSources = from.commonSources?.copyOf() diff --git a/compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/arguments/CommonCompilerArguments.kt b/compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/arguments/CommonCompilerArguments.kt index 4166382445b..dfc4eceebba 100644 --- a/compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/arguments/CommonCompilerArguments.kt +++ b/compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/arguments/CommonCompilerArguments.kt @@ -573,16 +573,6 @@ Warning: This mode is not backward compatible and might cause compilation errors field = value } - @Argument( - value = "-Xbuiltins-from-sources", - description = "Compile built-ins from sources." - ) - var builtInsFromSources = false - set(value) { - checkFrozen() - field = value - } - @Argument( value = "-Xexpect-actual-classes", description = """'expect'/'actual' classes (including interfaces, objects, annotations, enums, and 'actual' typealiases) are in Beta. @@ -756,7 +746,6 @@ The corresponding calls' declarations may not be marked with @BuilderInference." ) put(AnalysisFlags.extendedCompilerChecks, extendedCompilerChecks) put(AnalysisFlags.allowKotlinPackage, allowKotlinPackage) - put(AnalysisFlags.builtInsFromSources, builtInsFromSources) put(AnalysisFlags.muteExpectActualClassesWarning, expectActualClasses) put(AnalysisFlags.allowFullyQualifiedNameInKClass, true) put(AnalysisFlags.dontWarnOnErrorSuppression, dontWarnOnErrorSuppression) diff --git a/compiler/config/src/org/jetbrains/kotlin/config/AnalysisFlags.kt b/compiler/config/src/org/jetbrains/kotlin/config/AnalysisFlags.kt index dda5a50eaa1..d545c3a191c 100644 --- a/compiler/config/src/org/jetbrains/kotlin/config/AnalysisFlags.kt +++ b/compiler/config/src/org/jetbrains/kotlin/config/AnalysisFlags.kt @@ -48,9 +48,6 @@ object AnalysisFlags { @JvmStatic val allowKotlinPackage by AnalysisFlag.Delegates.Boolean - @JvmStatic - val builtInsFromSources by AnalysisFlag.Delegates.Boolean - @JvmStatic val muteExpectActualClassesWarning by AnalysisFlag.Delegates.Boolean diff --git a/compiler/testData/cli/js/jsExtraHelp.out b/compiler/testData/cli/js/jsExtraHelp.out index 53a324901b9..cd4b764662c 100644 --- a/compiler/testData/cli/js/jsExtraHelp.out +++ b/compiler/testData/cli/js/jsExtraHelp.out @@ -68,7 +68,6 @@ where advanced options include: -Xallow-any-scripts-in-source-roots Allow compiling scripts along with regular Kotlin sources. -Xallow-kotlin-package Allow compiling code in the 'kotlin' package, and allow not requiring 'kotlin.stdlib' in 'module-info'. - -Xbuiltins-from-sources Compile built-ins from sources. -Xcheck-phase-conditions Check pre- and postconditions of IR lowering phases. -Xcheck-sticky-phase-conditions Run sticky condition checks on subsequent phases. Implicitly enables '-Xcheck-phase-conditions'. diff --git a/compiler/testData/cli/jvm/extraHelp.out b/compiler/testData/cli/jvm/extraHelp.out index 64b1d2b77e6..54cc6bfb1aa 100644 --- a/compiler/testData/cli/jvm/extraHelp.out +++ b/compiler/testData/cli/jvm/extraHelp.out @@ -155,7 +155,6 @@ where advanced options include: -Xallow-any-scripts-in-source-roots Allow compiling scripts along with regular Kotlin sources. -Xallow-kotlin-package Allow compiling code in the 'kotlin' package, and allow not requiring 'kotlin.stdlib' in 'module-info'. - -Xbuiltins-from-sources Compile built-ins from sources. -Xcheck-phase-conditions Check pre- and postconditions of IR lowering phases. -Xcheck-sticky-phase-conditions Run sticky condition checks on subsequent phases. Implicitly enables '-Xcheck-phase-conditions'. diff --git a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/runners/ir/interpreter/AbstractIrInterpreterTest.kt b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/runners/ir/interpreter/AbstractIrInterpreterTest.kt index 2648c0e3893..bfd917464d4 100644 --- a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/runners/ir/interpreter/AbstractIrInterpreterTest.kt +++ b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/runners/ir/interpreter/AbstractIrInterpreterTest.kt @@ -5,8 +5,6 @@ package org.jetbrains.kotlin.test.runners.ir.interpreter -import org.jetbrains.kotlin.config.* -import org.jetbrains.kotlin.constant.EvaluatedConstTracker import org.jetbrains.kotlin.platform.jvm.JvmPlatforms import org.jetbrains.kotlin.test.FirParser import org.jetbrains.kotlin.test.TargetBackend @@ -16,12 +14,12 @@ import org.jetbrains.kotlin.test.builders.* import org.jetbrains.kotlin.test.directives.JvmEnvironmentConfigurationDirectives import org.jetbrains.kotlin.test.directives.LanguageSettingsDirectives import org.jetbrains.kotlin.test.directives.configureFirParser -import org.jetbrains.kotlin.test.directives.model.RegisteredDirectives -import org.jetbrains.kotlin.test.model.* +import org.jetbrains.kotlin.test.model.BinaryKind +import org.jetbrains.kotlin.test.model.DependencyKind +import org.jetbrains.kotlin.test.model.FrontendKind +import org.jetbrains.kotlin.test.model.FrontendKinds import org.jetbrains.kotlin.test.preprocessors.IrInterpreterImplicitKotlinImports import org.jetbrains.kotlin.test.runners.AbstractKotlinCompilerWithTargetBackendTest -import org.jetbrains.kotlin.test.services.EnvironmentConfigurator -import org.jetbrains.kotlin.test.services.TestServices import org.jetbrains.kotlin.test.services.configuration.CommonEnvironmentConfigurator import org.jetbrains.kotlin.test.services.configuration.JvmEnvironmentConfigurator import org.jetbrains.kotlin.test.services.sourceProviders.IrInterpreterHelpersSourceFilesProvider @@ -38,7 +36,6 @@ open class AbstractIrInterpreterTest( useConfigurators( ::CommonEnvironmentConfigurator, - ::IrInterpreterEnvironmentConfigurator, ) firFrontendStep() @@ -89,12 +86,3 @@ abstract class AbstractJvmIrInterpreterAfterFir2IrTestBase(val parser: FirParser open class AbstractJvmIrInterpreterAfterFirPsi2IrTest : AbstractJvmIrInterpreterAfterFir2IrTestBase(FirParser.Psi) open class AbstractJvmIrInterpreterAfterPsi2IrTest : AbstractJvmIrInterpreterTest(FrontendKinds.ClassicFrontend) - -class IrInterpreterEnvironmentConfigurator(testServices: TestServices) : EnvironmentConfigurator(testServices) { - override fun provideAdditionalAnalysisFlags( - directives: RegisteredDirectives, - languageVersion: LanguageVersion - ): Map, Any?> { - return mapOf(AnalysisFlags.builtInsFromSources to true) - } -}