Remove warning for running the compiler under Java 6/7
Now the compiler won't even start, so no need to check this manually.
This commit is contained in:
-3
@@ -79,9 +79,6 @@ public abstract class CommonCompilerArguments implements Serializable {
|
|||||||
@Argument(value = "Xno-check-impl", description = "Do not check presence of 'impl' modifier in multi-platform projects")
|
@Argument(value = "Xno-check-impl", description = "Do not check presence of 'impl' modifier in multi-platform projects")
|
||||||
public boolean noCheckImpl;
|
public boolean noCheckImpl;
|
||||||
|
|
||||||
@Argument(value = "Xskip-java-check", description = "Do not warn when running the compiler under Java 6 or 7")
|
|
||||||
public boolean noJavaVersionWarning;
|
|
||||||
|
|
||||||
@Argument(value = "Xcoroutines=warn")
|
@Argument(value = "Xcoroutines=warn")
|
||||||
public boolean coroutinesWarn;
|
public boolean coroutinesWarn;
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,6 @@ package org.jetbrains.kotlin.cli.common;
|
|||||||
|
|
||||||
import com.intellij.openapi.Disposable;
|
import com.intellij.openapi.Disposable;
|
||||||
import com.intellij.openapi.util.Disposer;
|
import com.intellij.openapi.util.Disposer;
|
||||||
import com.intellij.openapi.util.SystemInfo;
|
|
||||||
import kotlin.collections.ArraysKt;
|
import kotlin.collections.ArraysKt;
|
||||||
import org.fusesource.jansi.AnsiConsole;
|
import org.fusesource.jansi.AnsiConsole;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
@@ -142,7 +141,6 @@ public abstract class CLICompiler<A extends CommonCompilerArguments> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
reportUnknownExtraFlags(messageCollector, arguments);
|
reportUnknownExtraFlags(messageCollector, arguments);
|
||||||
reportUnsupportedJavaVersion(messageCollector, arguments);
|
|
||||||
|
|
||||||
GroupingMessageCollector groupingCollector = new GroupingMessageCollector(messageCollector);
|
GroupingMessageCollector groupingCollector = new GroupingMessageCollector(messageCollector);
|
||||||
|
|
||||||
@@ -337,16 +335,6 @@ public abstract class CLICompiler<A extends CommonCompilerArguments> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void reportUnsupportedJavaVersion(MessageCollector collector, A arguments) {
|
|
||||||
if (!SystemInfo.isJavaVersionAtLeast("1.8") && !arguments.noJavaVersionWarning) {
|
|
||||||
collector.report(
|
|
||||||
CompilerMessageSeverity.STRONG_WARNING,
|
|
||||||
"Running the Kotlin compiler under Java 6 or 7 is unsupported and will no longer be possible in a future update.",
|
|
||||||
CompilerMessageLocation.NO_LOCATION
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
protected abstract ExitCode doExecute(
|
protected abstract ExitCode doExecute(
|
||||||
@NotNull A arguments,
|
@NotNull A arguments,
|
||||||
|
|||||||
-1
@@ -8,7 +8,6 @@ where advanced options include:
|
|||||||
-Xplugin <path> Load plugins from the given classpath
|
-Xplugin <path> Load plugins from the given classpath
|
||||||
-Xmulti-platform Enable experimental language support for multi-platform projects
|
-Xmulti-platform Enable experimental language support for multi-platform projects
|
||||||
-Xno-check-impl Do not check presence of 'impl' modifier in multi-platform projects
|
-Xno-check-impl Do not check presence of 'impl' modifier in multi-platform projects
|
||||||
-Xskip-java-check Do not warn when running the compiler under Java 6 or 7
|
|
||||||
-Xcoroutines={enable|warn|error} Enable coroutines or report warnings or errors on declarations and use sites of 'suspend' modifier
|
-Xcoroutines={enable|warn|error} Enable coroutines or report warnings or errors on declarations and use sites of 'suspend' modifier
|
||||||
|
|
||||||
Advanced options are non-standard and may be changed or removed without any notice.
|
Advanced options are non-standard and may be changed or removed without any notice.
|
||||||
|
|||||||
-1
@@ -20,7 +20,6 @@ where advanced options include:
|
|||||||
-Xplugin <path> Load plugins from the given classpath
|
-Xplugin <path> Load plugins from the given classpath
|
||||||
-Xmulti-platform Enable experimental language support for multi-platform projects
|
-Xmulti-platform Enable experimental language support for multi-platform projects
|
||||||
-Xno-check-impl Do not check presence of 'impl' modifier in multi-platform projects
|
-Xno-check-impl Do not check presence of 'impl' modifier in multi-platform projects
|
||||||
-Xskip-java-check Do not warn when running the compiler under Java 6 or 7
|
|
||||||
-Xcoroutines={enable|warn|error} Enable coroutines or report warnings or errors on declarations and use sites of 'suspend' modifier
|
-Xcoroutines={enable|warn|error} Enable coroutines or report warnings or errors on declarations and use sites of 'suspend' modifier
|
||||||
|
|
||||||
Advanced options are non-standard and may be changed or removed without any notice.
|
Advanced options are non-standard and may be changed or removed without any notice.
|
||||||
|
|||||||
@@ -82,9 +82,6 @@ public abstract class KotlinIntegrationTestBase extends TestCaseWithTmpdir {
|
|||||||
content = normalizePath(content, getKotlinProjectHome(), "[KotlinProjectHome]");
|
content = normalizePath(content, getKotlinProjectHome(), "[KotlinProjectHome]");
|
||||||
content = content.replaceAll(Pattern.quote(KotlinCompilerVersion.VERSION), "[KotlinVersion]");
|
content = content.replaceAll(Pattern.quote(KotlinCompilerVersion.VERSION), "[KotlinVersion]");
|
||||||
content = StringUtil.convertLineSeparators(content);
|
content = StringUtil.convertLineSeparators(content);
|
||||||
content = Pattern.compile("^.+running the Kotlin compiler under Java 6 or 7 is unsupported and will no longer be possible in a future update\\.\n", Pattern.MULTILINE)
|
|
||||||
.matcher(content)
|
|
||||||
.replaceAll("");
|
|
||||||
return content;
|
return content;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -74,7 +74,6 @@ public abstract class AbstractCliTest extends TestCaseWithTmpdir {
|
|||||||
.replace("expected version is " + JvmMetadataVersion.INSTANCE, "expected version is $ABI_VERSION$")
|
.replace("expected version is " + JvmMetadataVersion.INSTANCE, "expected version is $ABI_VERSION$")
|
||||||
.replace("expected version is " + JsMetadataVersion.INSTANCE, "expected version is $ABI_VERSION$")
|
.replace("expected version is " + JsMetadataVersion.INSTANCE, "expected version is $ABI_VERSION$")
|
||||||
.replace("\\", "/")
|
.replace("\\", "/")
|
||||||
.replaceAll("^.+running the Kotlin compiler under Java 6 or 7 is unsupported and will no longer be possible in a future update\\.\n", "")
|
|
||||||
.replace(KotlinCompilerVersion.VERSION, "$VERSION$");
|
.replace(KotlinCompilerVersion.VERSION, "$VERSION$");
|
||||||
|
|
||||||
return normalizedOutputWithoutExitCode + exitCode;
|
return normalizedOutputWithoutExitCode + exitCode;
|
||||||
|
|||||||
@@ -43,7 +43,6 @@ public abstract class CompilerSmokeTestBase extends KotlinIntegrationTestBase {
|
|||||||
javaArgs.add("org.jetbrains.kotlin.cli.jvm.K2JVMCompiler");
|
javaArgs.add("org.jetbrains.kotlin.cli.jvm.K2JVMCompiler");
|
||||||
|
|
||||||
Collections.addAll(javaArgs, arguments);
|
Collections.addAll(javaArgs, arguments);
|
||||||
javaArgs.add("-Xskip-java-check");
|
|
||||||
|
|
||||||
return run(logName, ArrayUtil.toStringArray(javaArgs));
|
return run(logName, ArrayUtil.toStringArray(javaArgs));
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -84,7 +84,7 @@ abstract class AbstractMultiPlatformIntegrationTest : KtUsefulTestCase() {
|
|||||||
private fun CLICompiler<*>.compile(sources: List<File>, vararg additionalArguments: String): String = buildString {
|
private fun CLICompiler<*>.compile(sources: List<File>, vararg additionalArguments: String): String = buildString {
|
||||||
val (output, exitCode) = AbstractCliTest.executeCompilerGrabOutput(
|
val (output, exitCode) = AbstractCliTest.executeCompilerGrabOutput(
|
||||||
this@compile,
|
this@compile,
|
||||||
sources.map(File::getAbsolutePath) + listOf("-Xmulti-platform", "-Xskip-java-check") + additionalArguments
|
sources.map(File::getAbsolutePath) + listOf("-Xmulti-platform") + additionalArguments
|
||||||
)
|
)
|
||||||
appendln("Exit code: $exitCode")
|
appendln("Exit code: $exitCode")
|
||||||
appendln("Output:")
|
appendln("Output:")
|
||||||
|
|||||||
@@ -34,8 +34,6 @@ State state = new File(basedir, "build.log").readLines().collect { it.replaceAll
|
|||||||
replace("\\", "/").
|
replace("\\", "/").
|
||||||
replaceAll(/[0-9]+\s*ms/, "LLL ms").
|
replaceAll(/[0-9]+\s*ms/, "LLL ms").
|
||||||
trim().
|
trim().
|
||||||
// TODO: Remove after build is launched only under java 8
|
|
||||||
replaceAll(/\[WARNING] Running the Kotlin compiler under Java 6 or 7 is unsupported and will no longer be possible in a future update./, "").
|
|
||||||
replaceAll(/^\[[A-Z]+\]$/, "").
|
replaceAll(/^\[[A-Z]+\]$/, "").
|
||||||
replaceAll(/version [0-9a-z-+\.]+/, "version @snapshot@")
|
replaceAll(/version [0-9a-z-+\.]+/, "version @snapshot@")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user