Thread
#multiplatform
    natpryce

    natpryce

    3 years ago
    How does one diagnose the cause of an “Invalid module” build error? When compiling tests for the macosX64 target, my build fails with an enormous error message that includes what looks like LLVM bitcode of the compiled module, and eventually ends with:
    * Compiler version info: Konan: 1.1.1 / Kotlin: 1.3.20
     * Output kind: PROGRAM
    
    exception: java.lang.Error: Invalid module
            at org.jetbrains.kotlin.backend.konan.llvm.IrToBitcodeKt.verifyModule(IrToBitcode.kt:179)
            at org.jetbrains.kotlin.backend.konan.llvm.IrToBitcodeKt.verifyModule$default(IrToBitcode.kt:170)
    What can I do to resolve the error?
    s

    svyatoslav.scherbina

    3 years ago
    This is internal compiler error, probably caused by a compiler bug.
    Could you provide code to reproduce the issue?
    natpryce

    natpryce

    3 years ago
    I’ll push the current state of the project to a branch, and create a youtrack issue
    I’ve raised two issues from that branch. I also may have found a bug with the kotlin-test-junit5 library but I’m not sure if it’s not actually my mistake. When I change the dependency of my tests from kotlin-test-junit to kotlin-test-junit5, Gradle finds none of the tests, although they all run in IntelliJ.
    I’m not sure if I need to add more config to Gradle to make kotlin-test-junit5 work
    s

    svyatoslav.scherbina

    3 years ago
    Thank you. We have successfully reproduced KT-29542 and are investigating it.
    natpryce

    natpryce

    3 years ago
    Thank you.