Support separate modules in compiler
Unless the compatibility option "-Xsingle-module" is passed, the compiler will create two modules instead of one now (see TopDownAnalyzerFacadeForJVM): the main module contains Kotlin and Java sources and binaries from the previous compilation of the given module chunk, the dependency module contains all other Kotlin and Java binaries. This fixes some issues where the compiler couldn't detect that the used symbol was from another module, and did not forbid some usages which are only possible inside the module (see KT-10001). The ideal way to deal with modules here would be to exactly recreate the project structure, for example as it's done in JvmAnalyzerFacade and usages. This is postponed until later #KT-10001 Fixed #KT-11840 In Progress
This commit is contained in:
+3
@@ -95,6 +95,9 @@ public class K2JVMCompilerArguments extends CommonCompilerArguments {
|
||||
@Argument(value = "Xload-script-configs", description = "Load script configuration files from project directory tree")
|
||||
public boolean loadScriptConfigs;
|
||||
|
||||
@Argument(value = "Xsingle-module", description = "Combine modules for source files and binary dependencies into a single module")
|
||||
public boolean singleModule;
|
||||
|
||||
// Paths to output directories for friend modules.
|
||||
public String[] friendPaths;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user