https://kotlinlang.org logo
#compiler
Title
# compiler
n

Norbi

02/28/2024, 9:42 PM
Sometimes I get internal errors probably related to incremental compilation (stack trace in comment). These errors cannot be reproduced, the next compilation is performed without internal errors. Is it automatically reported to Jetbrains somehow? It is also interesting that I haven't seen any automatic "error reporting" recently (while in the past I have reported lots of errors with this built-in reporting tool). Maybe I should reactivate it somehow?
Copy code
java.lang.IllegalStateException: Cannot serialize error type: [Error type: Type for error type constructor (XYZ)]?
	at org.jetbrains.kotlin.serialization.SerializerExtension.serializeErrorType(SerializerExtension.kt:89)
	at org.jetbrains.kotlin.backend.common.serialization.metadata.KlibMetadataSerializerExtension.serializeErrorType(KlibMetadataSerializerExtension.kt:45)
	at org.jetbrains.kotlin.serialization.DescriptorSerializer.type$serialization(DescriptorSerializer.kt:554)
	at org.jetbrains.kotlin.serialization.DescriptorSerializer.typeId(DescriptorSerializer.kt:548)
	at org.jetbrains.kotlin.serialization.DescriptorSerializer.valueParameter(DescriptorSerializer.kt:498)
	at org.jetbrains.kotlin.serialization.DescriptorSerializer.functionProto(DescriptorSerializer.kt:370)
	at org.jetbrains.kotlin.serialization.DescriptorSerializer.packagePartProto(DescriptorSerializer.kt:676)
	at org.jetbrains.kotlin.backend.common.serialization.metadata.KlibMetadataSerializer.buildPackageProto(KlibMetadataSerializer.kt:125)
	at org.jetbrains.kotlin.backend.common.serialization.metadata.KlibMetadataSerializer.access$buildPackageProto(KlibMetadataSerializer.kt:32)
	at org.jetbrains.kotlin.backend.common.serialization.metadata.KlibMetadataSerializer.serializeDescriptors(KlibMetadataSerializer.kt:148)
	at org.jetbrains.kotlin.backend.common.serialization.metadata.KlibMetadataIncrementalSerializer.serializePackageFragment(KlibMetadataIncrementalSerializer.kt:56)
	at org.jetbrains.kotlin.ir.backend.js.KlibKt.serializeScope(klib.kt:810)
	at org.jetbrains.kotlin.ir.backend.js.KlibKt.compareMetadataAndGoToNextICRoundIfNeeded(klib.kt:834)
	at org.jetbrains.kotlin.ir.backend.js.KlibKt.access$compareMetadataAndGoToNextICRoundIfNeeded(klib.kt:1)
	at org.jetbrains.kotlin.ir.backend.js.ModulesStructure.runAnalysis(klib.kt:551)
	at org.jetbrains.kotlin.ir.backend.js.PrepareAnalyzedSourceModuleKt.prepareAnalyzedSourceModule(prepareAnalyzedSourceModule.kt:30)
	at org.jetbrains.kotlin.ir.backend.js.PrepareAnalyzedSourceModuleKt.prepareAnalyzedSourceModule$default(prepareAnalyzedSourceModule.kt:17)
	at org.jetbrains.kotlin.cli.js.K2JsIrCompiler.processSourceModule(K2JsIrCompiler.kt:427)
	at org.jetbrains.kotlin.cli.js.K2JsIrCompiler.doExecute(K2JsIrCompiler.kt:273)
	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.incremental.IncrementalJsCompilerRunner.runCompiler(IncrementalJsCompilerRunner.kt:218)
	at org.jetbrains.kotlin.incremental.IncrementalJsCompilerRunner.runCompiler(IncrementalJsCompilerRunner.kt:86)
	at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.doCompile(IncrementalCompilerRunner.kt:477)
	at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.compileImpl(IncrementalCompilerRunner.kt:400)
	at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.tryCompileIncrementally$lambda$6$compile(IncrementalCompilerRunner.kt:231)
	at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.tryCompileIncrementally(IncrementalCompilerRunner.kt:247)
	at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.compile(IncrementalCompilerRunner.kt:116)
	at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.compile$default(IncrementalCompilerRunner.kt:109)
	at org.jetbrains.kotlin.daemon.CompileServiceImplBase.execJsIncrementalCompiler(CompileServiceImpl.kt:579)
	at org.jetbrains.kotlin.daemon.CompileServiceImplBase.access$execJsIncrementalCompiler(CompileServiceImpl.kt:105)
	at org.jetbrains.kotlin.daemon.CompileServiceImpl.compile(CompileServiceImpl.kt:1715)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
	at java.base/java.lang.reflect.Method.invoke(Method.java:578)
	at java.rmi/sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:360)
	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(AccessController.java:712)
	at java.rmi/sun.rmi.transport.Transport.serviceCall(Transport.java:196)
	at java.rmi/sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:598)
	at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:844)
	at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:721)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
	at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:720)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
	at java.base/java.lang.Thread.run(Thread.java:1589)
d

dmitriy.novozhilov

02/29/2024, 6:10 AM
Yeah, this error seems to be related to the incremental compilation Please report them to YouTrack
Is it automatically reported to Jetbrains somehow?
It is also interesting that I haven't seen any automatic "error reporting" recently (while in the past I have reported lots of errors with this built-in reporting tool).
Maybe I should reactivate it somehow?
There are errors from build and from the IDE First are not reported anywhere Second can be reported manually via IDEA UI, but few versions ago showing of them was disabled by default. You can turn them on again by enabling internal mode
👍🏻 1
🙏 1
3 Views