question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Compilation does not pass during the task of compileTestKotlinLinuxX64

See original GitHub issue

Describe the bug I think that the title error is caused by testing using (inheriting) the Serializable class in Main. This error did not occur with kotlin version 1.3.50 and kotlin-serialization 0.13.0.

To Reproduce https://github.com/inoutch/kotchan-game-manager/tree/bug-report

> Task :compileTestKotlinLinuxX64
e: Compilation failed: org.jetbrains.kotlin.backend.common.descriptors.WrappedPropertyDescriptor@129d65a0 is not bound

 * Source files: <some kt files>
 * Compiler version info: Konan: 1.3.60 / Kotlin: 1.3.60
 * Output kind: LIBRARY

e: java.lang.IllegalStateException: org.jetbrains.kotlin.backend.common.descriptors.WrappedPropertyDescriptor@129d65a0 is not bound
	at org.jetbrains.kotlin.backend.common.descriptors.WrappedDeclarationDescriptor.getOwner(WrappedDescriptors.kt:98)
	at org.jetbrains.kotlin.backend.common.descriptors.WrappedPropertyDescriptor.getReturnType(WrappedDescriptors.kt:816)
	at org.jetbrains.kotlin.backend.common.descriptors.WrappedPropertyDescriptor.getType(WrappedDescriptors.kt:820)
	at org.jetbrains.kotlin.ir.util.DeclarationStubGenerator.generateFieldStub(DeclarationStubGenerator.kt:140)
	at org.jetbrains.kotlin.ir.util.ExternalDependenciesGenerator.generateUnboundSymbolsAsDependencies(ExternalDependenciesGenerator.kt:59)
	at org.jetbrains.kotlin.psi2ir.generators.ModuleGenerator.generateUnboundSymbolsAsDependencies(ModuleGenerator.kt:63)
	at org.jetbrains.kotlin.psi2ir.Psi2IrTranslator.generateModuleFragment(Psi2IrTranslator.kt:82)
	at org.jetbrains.kotlin.backend.konan.ToplevelPhasesKt$psiToIrPhase$1.invoke(ToplevelPhases.kt:175)
	at org.jetbrains.kotlin.backend.konan.ToplevelPhasesKt$psiToIrPhase$1.invoke(ToplevelPhases.kt)
	at org.jetbrains.kotlin.backend.common.phaser.PhaseBuildersKt$namedOpUnitPhase$1.invoke(PhaseBuilders.kt:115)
	at org.jetbrains.kotlin.backend.common.phaser.PhaseBuildersKt$namedOpUnitPhase$1.invoke(PhaseBuilders.kt:113)
	at org.jetbrains.kotlin.backend.common.phaser.AbstractNamedPhaseWrapper$runBody$1.invoke(CompilerPhase.kt:128)
	at org.jetbrains.kotlin.backend.common.phaser.CompilerPhaseKt.downlevel(CompilerPhase.kt:24)
	at org.jetbrains.kotlin.backend.common.phaser.AbstractNamedPhaseWrapper.runBody(CompilerPhase.kt:127)
	at org.jetbrains.kotlin.backend.common.phaser.AbstractNamedPhaseWrapper.invoke(CompilerPhase.kt:105)
	at org.jetbrains.kotlin.backend.common.phaser.CompositePhase.invoke(PhaseBuilders.kt:28)
	at org.jetbrains.kotlin.backend.common.phaser.AbstractNamedPhaseWrapper$runBody$1.invoke(CompilerPhase.kt:128)
	at org.jetbrains.kotlin.backend.common.phaser.CompilerPhaseKt.downlevel(CompilerPhase.kt:24)
	at org.jetbrains.kotlin.backend.common.phaser.AbstractNamedPhaseWrapper.runBody(CompilerPhase.kt:127)
	at org.jetbrains.kotlin.backend.common.phaser.AbstractNamedPhaseWrapper.invoke(CompilerPhase.kt:105)
	at org.jetbrains.kotlin.backend.common.phaser.CompilerPhaseKt.invokeToplevel(CompilerPhase.kt:42)
	at org.jetbrains.kotlin.backend.konan.KonanDriverKt.runTopLevelPhases(KonanDriver.kt:27)
	at org.jetbrains.kotlin.cli.bc.K2Native.doExecute(K2Native.kt:74)
	at org.jetbrains.kotlin.cli.bc.K2Native.doExecute(K2Native.kt:34)
	at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:84)
	at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:42)
	at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:104)
	at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:82)
	at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:50)
	at org.jetbrains.kotlin.cli.common.CLITool$Companion.doMainNoExit(CLITool.kt:215)
	at org.jetbrains.kotlin.cli.common.CLITool$Companion.doMain(CLITool.kt:207)
	at org.jetbrains.kotlin.cli.bc.K2Native$Companion$main$1.invoke(K2Native.kt:225)
	at org.jetbrains.kotlin.cli.bc.K2Native$Companion$main$1.invoke(K2Native.kt:222)
	at org.jetbrains.kotlin.util.UtilKt.profileIf(Util.kt:27)
	at org.jetbrains.kotlin.util.UtilKt.profile(Util.kt:21)
	at org.jetbrains.kotlin.cli.bc.K2Native$Companion.main(K2Native.kt:224)
	at org.jetbrains.kotlin.cli.bc.K2NativeKt.main(K2Native.kt:304)
	at org.jetbrains.kotlin.cli.utilities.MainKt.main(main.kt:16)

Expected behavior Compile successfully

Environment

  • Kotlin version: 1.3.60
  • Library version: 0.14.0
  • Kotlin platforms: Native
  • Gradle version: 5.4.1
  • Other relevant context macOS Catalina 10.15

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
SvyatoslavScherbinacommented, Feb 27, 2020

“klib based mpp” != klib. klibs are generated not only by cinterop, but by compiler itself too, from Kotlin source code.

0reactions
herrjemandcommented, Jul 19, 2020

Any update on this issue or workaround? (Aside from putting all classes in one file, which I am not keen too since it will be 5000 lines long)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Gradle: Couldn't connect to Kotlin daemon on Windows
Task ] i: [daemon] OpenJDK 64-Bit Server VM warning: Ignoring option MaxPermSize; support was removed in 8.0 23:01:48.134 [INFO] [org.gradle.api.
Read more >
QuarkusDev cannot start when tests do not compile #20729
When using Kotlin+Gradle (I haven't checked other configurations) and there is any compile error in the tests, you cannot start quarkusDev ...
Read more >
Chapter 1. Installing and Running Kotlin - O'Reilly
1.1 Running Kotlin Without a Local Compiler. Problem. You want to try out Kotlin without a local installation, or run it on a...
Read more >
Gradle Kotlin Plugin can not compile tests calling source ...
Gradle Kotlin Plugin can not compile tests calling source internal fields/variables if compileJava dumps classes to a different directory and then copied ...
Read more >
Compiler options in the Kotlin Gradle plugin
Use the kotlinOptions property of a Kotlin compilation task for it. ... When targeting the JVM, the tasks are called compileKotlin for ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found