Compose compiler build failure on iOS simulator compilation: Compilation failed: No such value argument slot in IrCallImpl: 3 (total=3)
Describe the bug When compiling the referenced repro project for iOS simulator, compilation fails.
Affected platforms
- iOS
Versions
- Libraries:
- Compose Multiplatform version: 1.6.11
- Compose compiler (bundled with K2) 2.0.0
- Kotlin version: 2.0.0
- OS version(s) (required for Desktop and iOS issues): iOS 17.5 (21F77) SDK + iOS 17.5 (21F79) Simulator (Installed)
- OS architecture (x86 or arm64):arm64
- Device (model or simulator for iOS issues): iOS 17.2 (21C62) Simulator (Installed)
To Reproduce Steps to reproduce the behavior:
- Checkout this repo at main: https://github.com/ZacSweers/FieldSpottr
- Run
./gradlew :compileKotlinIosSimulatorArm64
Observe the below
> Task :compileKotlinIosSimulatorArm64 FAILED
e: Compilation failed: No such value argument slot in IrCallImpl: 3 (total=3)
* Source files: DbArea.kt, DbPermit.kt, FSDatabase.kt, FsdbQueries.kt, FSDatabaseImpl.kt, DateSelector.kt, FSAppDirs.kt, FieldSpottrApp.kt, GroupSelector.kt, Home.kt, PermitGrid.kt, Area.kt, PermitRepository.kt, db.kt, Parceling.common.kt, Color.kt, Theme.kt, Type.kt, db.native.kt, Parceling.native.kt
* Compiler version: 2.0.0
* Output kind: LIBRARY
e: java.lang.AssertionError: No such value argument slot in IrCallImpl: 3 (total=3)
at org.jetbrains.kotlin.ir.expressions.IrExpressionsKt.checkArgumentSlotAccess(IrExpressions.kt:73)
at org.jetbrains.kotlin.ir.expressions.IrMemberAccessExpression.putValueArgument(IrMemberAccessExpression.kt:50)
at androidx.compose.compiler.plugins.kotlin.lower.ComposerParamTransformer.withComposerParamIfNeeded(ComposerParamTransformer.kt:248)
at androidx.compose.compiler.plugins.kotlin.lower.ComposerParamTransformer$copyWithComposerParam$2$5.visitCall(ComposerParamTransformer.kt:641)
at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitCall(IrElementTransformerVoid.kt:299)
at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitCall(IrElementTransformerVoid.kt:19)
at org.jetbrains.kotlin.ir.expressions.IrCall.accept(IrCall.kt:24)
at org.jetbrains.kotlin.ir.expressions.IrExpression.transform(IrExpression.kt:24)
at org.jetbrains.kotlin.ir.expressions.IrExpression.transform(IrExpression.kt:20)
at org.jetbrains.kotlin.ir.util.TransformKt.transformInPlace(transform.kt:35)
at org.jetbrains.kotlin.ir.expressions.IrBlockBody.transformChildren(IrBlockBody.kt:27)
at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitBody(IrElementTransformerVoid.kt:174)
at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitBlockBody(IrElementTransformerVoid.kt:188)
at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitBlockBody(IrElementTransformerVoid.kt:191)
at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitBlockBody(IrElementTransformerVoid.kt:19)
at org.jetbrains.kotlin.ir.expressions.IrBlockBody.accept(IrBlockBody.kt:20)
at org.jetbrains.kotlin.ir.expressions.IrBody.transform(IrBody.kt:20)
at org.jetbrains.kotlin.ir.declarations.IrFunction.transformChildren(IrFunction.kt:58)
at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoidKt.transformChildrenVoid(IrElementTransformerVoid.kt:565)
at androidx.compose.compiler.plugins.kotlin.lower.ComposerParamTransformer.copyWithComposerParam(ComposerParamTransformer.kt:593)
at androidx.compose.compiler.plugins.kotlin.lower.ComposerParamTransformer.withComposerParamIfNeeded(ComposerParamTransformer.kt:372)
at androidx.compose.compiler.plugins.kotlin.lower.ComposerParamTransformer.visitSimpleFunction(ComposerParamTransformer.kt:158)
at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitSimpleFunction(IrElementTransformerVoid.kt:131)
Expected behavior It should compile successfully or offer a meaningful error message
figured this out after hopping into a debugger during compilation. The actual issue was a missing actual declaration for a compose function. Possibly worth closing this, but also think it's worth an improved error message
Same usually, usually missing actual throws a readable error. A better error would be appreciated
Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.