Skip to content

Commit 2e8bfde

Browse files
committed
Move -Xskip-metadata-version-check from JVM to common arguments
To be used in JS
1 parent a1a71a0 commit 2e8bfde

File tree

6 files changed

+7
-5
lines changed

6 files changed

+7
-5
lines changed

compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/arguments/CommonCompilerArguments.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ public abstract class CommonCompilerArguments implements Serializable {
6363
@ValueDescription("<count>")
6464
public String repeat;
6565

66+
@Argument(value = "Xskip-metadata-version-check", description = "Load classes with bad metadata version anyway (incl. pre-release classes)")
67+
public boolean skipMetadataVersionCheck;
68+
6669
@Argument(value = "Xallow-kotlin-package", description = "Allow compiling code in package 'kotlin'")
6770
public boolean allowKotlinPackage;
6871

compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/arguments/K2JVMCompilerArguments.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,6 @@ public class K2JVMCompilerArguments extends CommonCompilerArguments {
9494
@Argument(value = "Xmultifile-parts-inherit", description = "Compile multifile classes as a hierarchy of parts and facade")
9595
public boolean inheritMultifileParts;
9696

97-
@Argument(value = "Xskip-metadata-version-check", description = "Load classes with bad metadata version anyway (incl. pre-release classes)")
98-
public boolean skipMetadataVersionCheck;
99-
10097
@Argument(value = "Xskip-runtime-version-check", description = "Allow Kotlin runtime libraries of incompatible versions in the classpath")
10198
public boolean skipRuntimeVersionCheck;
10299

compiler/cli/src/org/jetbrains/kotlin/cli/common/CLICompiler.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,8 @@ private static void setupCommonArgumentsAndServices(
235235
configuration.put(CLIConfigurationKeys.COMPILER_JAR_LOCATOR, locator);
236236
}
237237

238+
configuration.put(CommonConfigurationKeys.SKIP_METADATA_VERSION_CHECK, arguments.skipMetadataVersionCheck);
239+
238240
setupLanguageVersionSettings(configuration, arguments);
239241
}
240242

compiler/cli/src/org/jetbrains/kotlin/cli/jvm/K2JVMCompiler.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,6 @@ class K2JVMCompiler : CLICompiler<K2JVMCompilerArguments>() {
312312
configuration.put(JVMConfigurationKeys.DISABLE_OPTIMIZATION, arguments.noOptimize)
313313
configuration.put(JVMConfigurationKeys.INHERIT_MULTIFILE_PARTS, arguments.inheritMultifileParts)
314314
configuration.put(JVMConfigurationKeys.SKIP_RUNTIME_VERSION_CHECK, arguments.skipRuntimeVersionCheck)
315-
configuration.put(CommonConfigurationKeys.SKIP_METADATA_VERSION_CHECK, arguments.skipMetadataVersionCheck)
316315
configuration.put(CLIConfigurationKeys.ALLOW_KOTLIN_PACKAGE, arguments.allowKotlinPackage)
317316
configuration.put(CLIConfigurationKeys.REPORT_PERF, arguments.reportPerf)
318317
configuration.put(JVMConfigurationKeys.USE_SINGLE_MODULE, arguments.singleModule)

compiler/testData/cli/js/jsExtraHelp.out

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ Usage: kotlinc-js <options> <source files>
22
where advanced options include:
33
-Xno-inline Disable method inlining
44
-Xrepeat <count> Repeat compilation (for performance analysis)
5+
-Xskip-metadata-version-check Load classes with bad metadata version anyway (incl. pre-release classes)
56
-Xallow-kotlin-package Allow compiling code in package 'kotlin'
67
-Xplugin <path> Load plugins from the given classpath
78
-Xmulti-platform Enable experimental language support for multi-platform projects

compiler/testData/cli/jvm/extraHelp.out

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ where advanced options include:
55
-Xno-optimize Disable optimizations
66
-Xreport-perf Report detailed performance statistics
77
-Xmultifile-parts-inherit Compile multifile classes as a hierarchy of parts and facade
8-
-Xskip-metadata-version-check Load classes with bad metadata version anyway (incl. pre-release classes)
98
-Xskip-runtime-version-check Allow Kotlin runtime libraries of incompatible versions in the classpath
109
-Xdump-declarations-to <path> Path to JSON file to dump Java to Kotlin declaration mappings
1110
-Xsingle-module Combine modules for source files and binary dependencies into a single module
@@ -14,6 +13,7 @@ where advanced options include:
1413
Load definitions of built-in declarations from module dependencies, instead of from the compiler
1514
-Xno-inline Disable method inlining
1615
-Xrepeat <count> Repeat compilation (for performance analysis)
16+
-Xskip-metadata-version-check Load classes with bad metadata version anyway (incl. pre-release classes)
1717
-Xallow-kotlin-package Allow compiling code in package 'kotlin'
1818
-Xplugin <path> Load plugins from the given classpath
1919
-Xmulti-platform Enable experimental language support for multi-platform projects

0 commit comments

Comments
 (0)