From e4a361a4b46d1494fa40580c1af6a14eb575ce53 Mon Sep 17 00:00:00 2001 From: Ilya Chernikov Date: Mon, 28 Nov 2022 11:46:46 +0100 Subject: [PATCH] K2 Scripting: disable scripts in source roots by default fixes ultimate FP test --- .../kotlin/cli/common/arguments/CommonCompilerArguments.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 79c0e60114c..b551ce52bd7 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 @@ -530,7 +530,10 @@ abstract class CommonCompilerArguments : CommonToolArguments() { } } - if (allowAnyScriptsInSourceRoots) { + if (useK2) { + // TODO: remove when K2 compilation will mean LV 2.0 + put(LanguageFeature.SkipStandaloneScriptsInSourceRoots, LanguageFeature.State.ENABLED) + } else if (allowAnyScriptsInSourceRoots) { put(LanguageFeature.SkipStandaloneScriptsInSourceRoots, LanguageFeature.State.DISABLED) }