Nick
01/10/2024, 3:34 PMjava.util.NoSuchElementException: Key CLASS CLASS name:Window modality:ABSTRACT visibility:internal [external] superTypes:[kotlin.Any] is missing in the map.
at kotlin.collections.MapsKt__MapWithDefaultKt.getOrImplicitDefaultNullable(MapWithDefault.kt:24)
at kotlin.collections.MapsKt__MapsKt.getValue(Maps.kt:360)
at org.jetbrains.kotlin.backend.wasm.ir2wasm.WasmCompiledModuleFragment.linkWasmCompiledFragments(WasmCompiledModuleFragment.kt:132)
at org.jetbrains.kotlin.backend.wasm.CompilerKt.compileWasm(compiler.kt:108)
at org.jetbrains.kotlin.cli.js.K2JsIrCompiler.doExecute(K2JsIrCompiler.kt:361)
at org.jetbrains.kotlin.cli.js.K2JSCompiler.doExecute(K2JSCompiler.java:181)
at org.jetbrains.kotlin.cli.js.K2JSCompiler.doExecute(K2JSCompiler.java:72)
at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:104)
at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:48)
at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:101)
at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:79)
at org.jetbrains.kotlin.cli.common.CLICompiler.execAndOutputXml(CLICompiler.kt:64)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.jetbrains.kotlin.compilerRunner.GradleKotlinCompilerWork.compileInProcessImpl(GradleKotlinCompilerWork.kt:396)
at org.jetbrains.kotlin.compilerRunner.GradleKotlinCompilerWork.access$compileInProcessImpl(GradleKotlinCompilerWork.kt:80)
at org.jetbrains.kotlin.compilerRunner.GradleKotlinCompilerWork$compileInProcess$future$1.call(GradleKotlinCompilerWork.kt:369)
at org.jetbrains.kotlin.compilerRunner.GradleKotlinCompilerWork$compileInProcess$future$1.call(GradleKotlinCompilerWork.kt:368)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:833)
The class in question is defined in commonMain
as:
internal expect abstract external class Window {
// ...
}
And it has the following actual
in a shared source-set inherited by jsMain
and wasmJsMain
internal actual abstract external class Window {
// ...
}
This works builds and runs fine when targeting JS. But compilation fails as I mentioned when including the wasmJs
target in the app.
I stepped through the compilation a bit and can see that this class is listed in WasmCompiledModuleFragment.typeIds.unbound
along w/ many other types. But the failure occurs because it is not located in the WasmCompiledModuleFragment.typeInfo.defined
map.
I'd appreciate any help getting past this. 🙏Svyatoslav Kuzmich [JB]
01/10/2024, 3:44 PMNick
01/10/2024, 3:51 PMNick
01/11/2024, 7:23 AMSvyatoslav Kuzmich [JB]
01/11/2024, 9:19 AMSvyatoslav Kuzmich [JB]
01/11/2024, 9:57 AMtypeOf
(used internally by Kodein) with external class
. The best workaround I see is to avoid using external classes with Kodein for now.bashor
01/13/2024, 4:07 PMNick
01/13/2024, 4:21 PMLuca
02/12/2024, 9:30 PMbashor
02/12/2024, 9:45 PMLuca
02/12/2024, 9:46 PM