Skip to content

Commit 714df7b

Browse files
committed
Add temporary compiler option to suppress incompatibility errors
To compile Kotlin against current IDEA libraries until they are migrated to 1.1
1 parent f688b1b commit 714df7b

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@ public class K2JVMCompilerArguments extends CommonCompilerArguments {
7070
@Argument(value = "Xallow-kotlin-package", description = "Allow compiling code in package 'kotlin'")
7171
public boolean allowKotlinPackage;
7272

73+
@Argument(value = "Xskip-metadata-version-check", description = "Try loading binary incompatible classes, may cause crashes")
74+
public boolean skipMetadataVersionCheck;
75+
7376
// Paths to output directories for friend modules.
7477
public String[] friendPaths;
7578

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,10 @@ private static String fieldUsage(@NotNull Field field, boolean extraHelp) {
7272
sb.append(" ");
7373
sb.append(description.value());
7474
}
75-
while (sb.length() < OPTION_NAME_PADDING_WIDTH) {
75+
while (sb.length() < OPTION_NAME_PADDING_WIDTH - 1) {
7676
sb.append(" ");
7777
}
78+
sb.append(" ");
7879
sb.append(argument.description());
7980
return sb.toString();
8081
}

compiler/testData/cli/jvm/extraHelp.out

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ where advanced options include:
66
-Xreport-perf Report detailed performance statistics
77
-Xmultifile-facades-open Compile multifile facade classes as open
88
-Xallow-kotlin-package Allow compiling code in package 'kotlin'
9+
-Xskip-metadata-version-check Try loading binary incompatible classes, may cause crashes
910
-Xno-inline Disable method inlining
1011
-Xrepeat <count> Repeat compilation (for performance analysis)
1112
-Xplugin <path> Load plugins from the given classpath

0 commit comments

Comments
 (0)