Is there a channel here to track issues with 1.4.3...
# announcements
d
Is there a channel here to track issues with 1.4.30? I'm upgrading one of my libraries and am encountering a problem compilation (this happens when I make an inline class constructor private). Just want some advice to see if anyone else here is also experiencing this before raising an issue:
Copy code
> Task :values4k:compileTestKotlin FAILED
e: org.jetbrains.kotlin.codegen.CompilationException: Back-end (JVM) Internal error: wrong bytecode generated
   L0
    LINENUMBER 17 L0
    ALOAD 0
    ILOAD 0
    INVOKESTATIC Money.constructor-impl (I)I
    IRETURN
   L1
    LOCALVARIABLE this LMoney; L0 L1 0
    LOCALVARIABLE value I L0 L1 1
    LOCALVARIABLE $constructor_marker Lkotlin/jvm/internal/DefaultConstructorMarker; L0 L1 2
    MAXSTACK = 2
    MAXLOCALS = 3
File is unknown
j
have you enabled new IR?
d
This is without that. I'll try with it on.
Ok - so that compiles ok πŸ‘ πŸ˜ƒ - thank you! Next question - should it compile with the old backend - presumably yes? And I'm not sure about the ramifications of what that means practically from a library maintainer point of view WRT to people consuming the library,.
v
The "old backend" as the "stable backend", opposed to the "new backend" as the "experimental backend"? I hope so. πŸ˜‰
d
well it's certainly stable in that it always fails to compile the code in question πŸ˜‰
j
@dave it shouldnt
d
that was my next question. πŸ™‚
j
Copy code
This feature requires Kotlin compiler 1.4.30-RC and enabling new IR compilers for JS and JVM.
d
aha - thanks @Javier πŸ™‚ . WRT to my question - is there any (known) reason why it wouldn't be safe to release a library into the wild that was compiled with the IR backend? (Assuming not, but good to check! πŸ™‚ )
j
I think the lib can't be used in another project without the new IR, but I am not sure. I saw a similar error with that when I was playing with Compose but I am not sure
I think you can try publishing your library to mavenlocal, use it in another old project and check if
gradlew build
works
d
glad I asked then! Thank you so much for your help. πŸ™‚
πŸ™‚ 1