Does this exception ring a bell? Otherwise I'll tr...
# javascript
e
Does this exception ring a bell? Otherwise I'll try to create a minimized reproducer.
Copy code
e: java.lang.IllegalStateException: Internal error: cannot find external signature 'ic#72:ic#23:com.hcl.mainframe.proto/ZSocket.serialize|-6271668050466004971[0]-8-0' for name 'ZSocket$serialize$virtualSuspendBridge' in module kotlin_com_hcl_mainframe_proto_faproto.
It is likely that the declaration with this signature has been removed by DCE while there still were usages, which often indicates that the DCE logic is too aggressive and needs adjustment.
	at org.jetbrains.kotlin.ir.backend.js.transformers.irToJs.CrossModuleDependenciesResolver.resolveCrossModuleDependencies(JsIrProgramFragment.kt:153)
	at org.jetbrains.kotlin.ir.backend.js.ic.JsExecutableProducer.buildMultiArtifactExecutable(JsExecutableProducer.kt:65)
	at org.jetbrains.kotlin.ir.backend.js.ic.JsExecutableProducer.buildExecutable(JsExecutableProducer.kt:36)
	at org.jetbrains.kotlin.cli.pipeline.web.js.JsIncrementalBuildingPhase.compileIncrementally(JsIncrementalBuildingPhase.kt:57)
	at org.jetbrains.kotlin.cli.pipeline.web.js.JsIncrementalBuildingPhase.executePhase(JsIncrementalBuildingPhase.kt:40)
	at org.jetbrains.kotlin.cli.pipeline.web.js.JsIncrementalBuildingPhase.executePhase(JsIncrementalBuildingPhase.kt:23)
	at org.jetbrains.kotlin.cli.pipeline.PipelinePhase.phaseBody(PipelinePhase.kt:60)
	at org.jetbrains.kotlin.cli.pipeline.PipelinePhase.phaseBody(PipelinePhase.kt:50)
b
Unfortunately this is one of those exceptions that don't really tell what exactly went wrong and are next to impossible to debug without a reproducer šŸ˜ž
e
No worries. I think I get why it's happening so it shouldn't be hard to reproduce in a sample project.
šŸ™Œ 1
I have managed to reproduce the probable root cause I believe. Would you be ok with me sending a zip here? I'm on my work laptop and won't have access to my YouTrack account for a while.
b
Sure
a
It tells me a bit. It seems like there is a suspend method from an interface that was removed after DCE, but it used by some reason. Is the
serialize
something that created by kotlinx.serialization?
e
No no, it's all our code, there is no kotlinx-serialization. Btw it looks like I haven't exactly reproduced this issue, but I found another bug šŸ‘€ Import the project and search for FIXME, then execute the test case with the
js
target.
In the meantime I'll try to reproduce the original ISE.
No, I cannot seem to be able to reproduce the ISE again. If it's even related to incremental compilation, it might be because I was fiddling with modules before running that build.
@broadway_lamb I’ve got access to YouTrack again and if you haven’t done so yet, I will create an issue for the property stuff above.
b
I haven’t got my hands on it yet, so feel free
gratitude thank you 1
e
Here it is, with a more minimized reproducer attached. youtrack.jetbrains.com/issue/KT-91371
thank you color 1
Seen the fix, luckily it seems ā€œeasierā€ than what I thought!