From 8852ef9e75e998d8bcc861eec87dae2bfd7b9148 Mon Sep 17 00:00:00 2001 From: Anton Bannykh Date: Tue, 18 Sep 2018 21:49:48 +0300 Subject: [PATCH] [JS IR BE] fix multimodule --- .../test/org/jetbrains/kotlin/js/test/BasicIrBoxTest.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/js/js.tests/test/org/jetbrains/kotlin/js/test/BasicIrBoxTest.kt b/js/js.tests/test/org/jetbrains/kotlin/js/test/BasicIrBoxTest.kt index 501d64efe18..463d52ea7e0 100644 --- a/js/js.tests/test/org/jetbrains/kotlin/js/test/BasicIrBoxTest.kt +++ b/js/js.tests/test/org/jetbrains/kotlin/js/test/BasicIrBoxTest.kt @@ -163,8 +163,8 @@ abstract class BasicIrBoxTest( runtimeFile.write(runtimeResult!!.generatedCode) } - val dependencyPaths = config.configuration[JSConfigurationKeys.LIBRARIES]!! - val dependencies = listOf(runtimeResult!!.moduleDescriptor) + dependencyPaths.mapNotNull { compilationCache[it]?.moduleDescriptor } + val dependencyNames = config.configuration[JSConfigurationKeys.LIBRARIES]!!.map { File(it).name } + val dependencies = listOf(runtimeResult!!.moduleDescriptor) + dependencyNames.mapNotNull { compilationCache[it]?.moduleDescriptor } val irDependencies = listOf(runtimeResult!!.moduleFragment) + compilationCache.values.map { it.moduleFragment } val result = compile( @@ -175,7 +175,7 @@ abstract class BasicIrBoxTest( dependencies, irDependencies) - compilationCache[outputFile.absolutePath.let { it.substring(0, it.length - 2)} + "meta.js"] = result + compilationCache[outputFile.name.replace(".js", ".meta.js")] = result outputFile.write(result.generatedCode) }