I’m getting the error in the :thread: when compili...
# decompose
l
I’m getting the error in the 🧵 when compiling for iOS with compose 1.4.0 and Kotlin 1.8.20. Looks like something to do with the compose extensions.
Copy code
error: Compilation failed: Backend Internal error: Exception during IR lowering
File being compiled: /Users/runner/work/Decompose/Decompose/decompose/src/commonMain/kotlin/com/arkivanov/decompose/router/children/ChildrenFactory.kt
The root cause java.util.NoSuchElementException was thrown at: org.jetbrains.kotlin.backend.konan.lower.ObjectClassLowering.processObjectClass(ObjectClassLowering.kt:198)

 * Source files:
 * Compiler version info: Konan: 1.8.20 / Kotlin: 1.8.20
 * Output kind: FRAMEWORK

error: org.jetbrains.kotlin.backend.common.BackendException: Backend Internal error: Exception during IR lowering
File being compiled: /Users/runner/work/Decompose/Decompose/decompose/src/commonMain/kotlin/com/arkivanov/decompose/router/children/ChildrenFactory.kt
The root cause java.util.NoSuchElementException was thrown at: org.jetbrains.kotlin.backend.konan.lower.ObjectClassLowering.processObjectClass(ObjectClassLowering.kt:198)
	at org.jetbrains.kotlin.backend.common.CodegenUtil.reportBackendException(CodegenUtil.kt:253)
	at org.jetbrains.kotlin.backend.common.CodegenUtil.reportBackendException$default(CodegenUtil.kt:237)
It’s odd that it’s trying to compile a decompose class, since it’s a gradle dependency. Not sure what’s going on here.
Re compiling Decompose classes. This behaviour was also surprising to me. Got some clarification here - https://youtrack.jetbrains.com/issue/KT-58265/Unexpected-behaviour-of-a-project-that-uses-a-compiler-plugin-on-Kotlin-version-update
l
It's interesting that klibs hold post-FE IR. I remember them saying it holds IR, but I expected post-BE IR. Wonder if the reasoning is so that they can make changes to lowering without breaking compatibility?
a
That's actually an interesting question! We could ask it here in K/N channel.