[K/JS] Reexport exported declarations in a proxy module file with per-file compilation

This commit is contained in:
Artem Kobzar
2023-08-01 09:42:33 +00:00
committed by Space Team
parent 5ccc302e01
commit 12715c062d
107 changed files with 341 additions and 169 deletions
@@ -261,20 +261,16 @@ abstract class AbstractInvalidationTest(
}
private fun verifyJsCode(stepId: Int, mainModuleName: String, jsFiles: List<String>) {
val testModuleName = "./$mainModuleName${projectInfo.moduleKind.extension}"
try {
V8IrJsTestChecker.checkWithTestFunctionArgs(
files = jsFiles,
testModuleName = testModuleName,
testModuleName = "./$mainModuleName${projectInfo.moduleKind.extension}",
testPackageName = null,
testFunctionName = BOX_FUNCTION_NAME,
testFunctionArgs = "$stepId",
expectedResult = "OK",
withModuleSystem = projectInfo.moduleKind in setOf(ModuleKind.COMMON_JS, ModuleKind.UMD, ModuleKind.AMD),
entryModulePath = when (granularity) {
JsGenerationGranularity.PER_FILE -> jsFiles.find { it.endsWith("m.export.mjs") }
else -> jsFiles.last()
}
entryModulePath = jsFiles.last()
)
} catch (e: ComparisonFailure) {
throw ComparisonFailure("Mismatched box out at step $stepId", e.expected, e.actual)
@@ -47,7 +47,7 @@ abstract class AbstractJsIrES6InvalidationPerModuleTest : IrAbstractInvalidation
abstract class AbstractJsIrInvalidationPerFileWithPLTest : AbstractJsIrInvalidationWithPLTest(
granularity = JsGenerationGranularity.PER_FILE,
workingDirPath = "incrementalOut/invalidationWithPL/perModule"
workingDirPath = "incrementalOut/invalidationWithPL/perFile"
)
abstract class AbstractJsIrInvalidationPerModuleWithPLTest : AbstractJsIrInvalidationWithPLTest(