Merge kotlin-experimental into kotlin standard library (KT-23055 fixed)

* kotlin-experimental.js has been already merged into kotlin.js
* change library name to kotlin in kotlin-experimental.meta.js in order to produce correct require calls
* concatenate kotlin-experimental.meta.js with kotlin.meta.js
* suppress multiple module declaration warning for such use case
This commit is contained in:
Anton Bannykh
2018-03-21 14:11:08 +03:00
committed by Anton Bannykh
parent d0e71acaa5
commit 7b860eab36
8 changed files with 20 additions and 18 deletions
@@ -202,6 +202,8 @@ public class JsConfig {
continue;
}
Set<String> moduleNames = new LinkedHashSet<>();
for (KotlinJavascriptMetadata metadata : metadataList) {
if (!metadata.getVersion().isCompatible() && !skipMetadataVersionCheck) {
report.error("File '" + path + "' was compiled with an incompatible version of Kotlin. " +
@@ -209,8 +211,13 @@ public class JsConfig {
", expected version is " + JsMetadataVersion.INSTANCE);
return true;
}
if (!modules.add(metadata.getModuleName())) {
report.warning("Module \"" + metadata.getModuleName() + "\" is defined in more than one file");
moduleNames.add(metadata.getModuleName());
}
for (String moduleName : moduleNames) {
if (!modules.add(moduleName)) {
report.warning("Module \"" + moduleName + "\" is defined in more than one file");
}
}