I am getting: ```java.lang.IllegalStateException: ...
# compiler
t
I am getting:
Copy code
java.lang.IllegalStateException: Not found Idx for public house.boardgames.model.cursor/CursorQuery|null[0]
Obviously a bug in compiler, but as project is not open source I am trying to figure out the issue and create mve. So far unsuccessful, If you have any hint what may be causing it, I would be grateful. Details in the thread. Affected version: 1.5.30, 1.5.31 Works in: 1.5.21 (Unable to test 1.6.00-M1)
CursorQuery class:
Copy code
package house.boardgames.model.cursor

import kotlinx.serialization.Serializable

@Serializable
class CursorQuery<out Anchor, out Filter>(
    val anchor: Anchor,
    val filter: Filter,
    val start: Long,
    val end: Long
)
Error stacktrace:
Copy code
java.lang.IllegalStateException: Not found Idx for public house.boardgames.model.cursor/CursorQuery|null[0]
	at org.jetbrains.kotlin.backend.common.serialization.IrFileDeserializer.loadTopLevelDeclarationProto(IrFileDeserializer.kt:48)
	at org.jetbrains.kotlin.backend.common.serialization.IrFileDeserializer.deserializeDeclaration(IrFileDeserializer.kt:39)
	at org.jetbrains.kotlin.backend.common.serialization.FileDeserializationState.deserializeAllFileReachableTopLevel(IrFileDeserializer.kt:139)
	at org.jetbrains.kotlin.backend.common.serialization.ModuleDeserializationState.deserializeReachableDeclarations(BasicIrModuleDeserializer.kt:172)
	at org.jetbrains.kotlin.backend.common.serialization.BasicIrModuleDeserializer.deserializeReachableDeclarations(BasicIrModuleDeserializer.kt:148)
	at org.jetbrains.kotlin.backend.common.serialization.KotlinIrLinker.deserializeAllReachableTopLevels(KotlinIrLinker.kt:102)
	at org.jetbrains.kotlin.backend.common.serialization.KotlinIrLinker.findDeserializedDeclarationForSymbol(KotlinIrLinker.kt:121)
	at org.jetbrains.kotlin.backend.common.serialization.KotlinIrLinker.getDeclaration(KotlinIrLinker.kt:159)
	at org.jetbrains.kotlin.ir.util.ExternalDependenciesGeneratorKt.getDeclaration(ExternalDependenciesGenerator.kt:60)
	at org.jetbrains.kotlin.ir.util.ExternalDependenciesGenerator.generateUnboundSymbolsAsDependencies(ExternalDependenciesGenerator.kt:47)
	at org.jetbrains.kotlin.ir.backend.js.KlibKt.loadIr(klib.kt:350)
	at org.jetbrains.kotlin.ir.backend.js.KlibKt.loadIr$default(klib.kt:232)
	at org.jetbrains.kotlin.ir.backend.js.CompilerKt.compile(compiler.kt:97)
	at org.jetbrains.kotlin.ir.backend.js.CompilerKt.compile$default(compiler.kt:42)
	at org.jetbrains.kotlin.cli.js.K2JsIrCompiler.doExecute(K2JsIrCompiler.kt:306)
	at org.jetbrains.kotlin.cli.js.K2JSCompiler.doExecute(K2JSCompiler.java:182)
	at org.jetbrains.kotlin.cli.js.K2JSCompiler.doExecute(K2JSCompiler.java:75)
	at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:92)
	at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:44)
	at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:98)
	at org.jetbrains.kotlin.daemon.CompileServiceImpl.compile(CompileServiceImpl.kt:1574)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at java.rmi/sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:359)
	at java.rmi/sun.rmi.transport.Transport$1.run(Transport.java:200)
	at java.rmi/sun.rmi.transport.Transport$1.run(Transport.java:197)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.rmi/sun.rmi.transport.Transport.serviceCall(Transport.java:196)
	at java.rmi/sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:562)
	at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:796)
	at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:677)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:676)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:829)
I am getting this error during
:standalone-hub:compileProductionExecutableKotlinJs
.
CursorQuery
is declared in model module. It is used in hub module, that has dependency on model. standalone-hub does not have direct dependency on
CursorQuery
class, but on hub module. All modules are multiplatform. IR browser target is being used for JS.
So far no luck reproducing the issue in sterile environment
a
t
@Alexey Belkov [JB] Quite similar, but no. I managed to produce mve, but I haven't published it yet. Also, I can tell now 1.6.0-M1 is not affected.
a
Great. Please open a YouTrack issue anyway so we can add a regression test, if you already have a minimal sample.
t
🙏 1