slackhq / circuit

⚡️ A Compose-driven architecture for Kotlin and Android applications.
https://slackhq.github.io/circuit/
Apache License 2.0
1.49k stars 72 forks source link

Failed to build cache: Symbol for [ com.slack.circuit.foundation/rememberAnsweringNavigator|rememberAnsweringNavigator #1208

Closed joeldenke closed 7 months ago

joeldenke commented 8 months ago

When I do clean builds of a Compose multiplatform project, starting of Circuit version 0.19.0 getting odd warnings, see attached stacktrace. I however can build all targets, including iOS successfully.

Versions in use: Circuit: 0.19.0 Kotlin: 1.9.22 Compose multiplatform: 1.6.0-rc01

Stacktrace:

Failed to build cache: Symbol for [ com.slack.circuit.foundation/rememberAnsweringNavigator|rememberAnsweringNavigator(com.slack.circuit.runtime.Navigator;kotlin.coroutines.SuspendFunction2<kotlinx.coroutines.CoroutineScope,0:0,kotlin.Unit>){0§<com.slack.circuit.runtime.screen.PopResult>}[0] <- Local[<TP>,0|TYPE_PARAMETER name:T index:0 variance: superTypes:[com.slack.circuit.runtime.screen.PopResult] reified:true] ] is unbound
java.lang.IllegalStateException: Symbol for [ com.slack.circuit.foundation/rememberAnsweringNavigator|rememberAnsweringNavigator(com.slack.circuit.runtime.Navigator;kotlin.coroutines.SuspendFunction2<kotlinx.coroutines.CoroutineScope,0:0,kotlin.Unit>){0§<com.slack.circuit.runtime.screen.PopResult>}[0] <- Local[<TP>,0|TYPE_PARAMETER name:T index:0 variance: superTypes:[com.slack.circuit.runtime.screen.PopResult] reified:true] ] is unbound
    at org.jetbrains.kotlin.ir.symbols.impl.IrBindablePublicSymbolBase.getOwner(IrPublicSymbolBase.kt:63)
    at org.jetbrains.kotlin.backend.common.linkage.partial.PartiallyLinkedIrTreePatcher$ExpressionTransformer.checkReferencedDeclaration(PartiallyLinkedIrTreePatcher.kt:585)
    at org.jetbrains.kotlin.backend.common.linkage.partial.PartiallyLinkedIrTreePatcher$ExpressionTransformer.checkReferencedDeclaration$default(PartiallyLinkedIrTreePatcher.kt:574)
    at org.jetbrains.kotlin.backend.common.linkage.partial.PartiallyLinkedIrTreePatcher$ExpressionTransformer.visitClassReference(PartiallyLinkedIrTreePatcher.kt:492)
    at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitClassReference(IrElementTransformerVoid.kt:254)
    at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitClassReference(IrElementTransformerVoid.kt:24)
    at org.jetbrains.kotlin.ir.expressions.IrClassReference.accept(IrClassReference.kt:26)
    at org.jetbrains.kotlin.ir.expressions.IrExpression.transform(IrExpression.kt:31)
    at org.jetbrains.kotlin.ir.expressions.IrExpression.transform(IrExpression.kt:22)
    at org.jetbrains.kotlin.ir.util.TransformKt.transformInPlace(transform.kt:45)
    at org.jetbrains.kotlin.ir.expressions.IrMemberAccessExpression.transformChildren(IrMemberAccessExpression.kt:50)
    at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoidKt.transformChildrenVoid(IrElementTransformerVoid.kt:346)
    at org.jetbrains.kotlin.backend.common.linkage.partial.PartiallyLinkedIrTreePatcher$ExpressionTransformer.visitCall(PartiallyLinkedIrTreePatcher.kt:1322)
    at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitCall(IrElementTransformerVoid.kt:215)
    at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitCall(IrElementTransformerVoid.kt:24)
    at org.jetbrains.kotlin.ir.expressions.IrCall.accept(IrCall.kt:26)
    at org.jetbrains.kotlin.ir.expressions.IrExpression.transform(IrExpression.kt:31)
    at org.jetbrains.kotlin.ir.declarations.IrVariable.transformChildren(IrVariable.kt:45)
    at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitDeclaration(IrElementTransformerVoid.kt:57)
    at org.jetbrains.kotlin.backend.common.linkage.partial.PartiallyLinkedIrTreePatcher$ExpressionTransformer.visitDeclaration(PartiallyLinkedIrTreePatcher.kt:462)
    at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitVariable(IrElementTransformerVoid.kt:101)
    at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitVariable(IrElementTransformerVoid.kt:102)
    at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitVariable(IrElementTransformerVoid.kt:24)
    at org.jetbrains.kotlin.ir.declarations.IrVariable.accept(IrVariable.kt:38)
    at org.jetbrains.kotlin.ir.IrElementBase.transform(IrElementBase.kt:24)
    at org.jetbrains.kotlin.ir.util.TransformKt.transformInPlace(transform.kt:35)
    at org.jetbrains.kotlin.ir.expressions.IrBlockBody.transformChildren(IrBlockBody.kt:32)
    at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitBody(IrElementTransformerVoid.kt:108)
    at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitBlockBody(IrElementTransformerVoid.kt:117)
    at org.jetbrains.kotlin.backend.common.linkage.partial.PartiallyLinkedIrTreePatcher$ExpressionTransformer.visitBlockBody(PartiallyLinkedIrTreePatcher.kt:467)
    at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitBlockBody(IrElementTransformerVoid.kt:118)
    at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitBlockBody(IrElementTransformerVoid.kt:24)
    at org.jetbrains.kotlin.ir.expressions.IrBlockBody.accept(IrBlockBody.kt:25)
    at org.jetbrains.kotlin.ir.expressions.IrBody.transform(IrBody.kt:22)
    at org.jetbrains.kotlin.ir.declarations.IrFunction.transformChildren(IrFunction.kt:62)
    at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitDeclaration(IrElementTransformerVoid.kt:57)
    at org.jetbrains.kotlin.backend.common.linkage.partial.PartiallyLinkedIrTreePatcher$ExpressionTransformer.visitDeclaration(PartiallyLinkedIrTreePatcher.kt:462)
    at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitFunction(IrElementTransformerVoid.kt:69)
    at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitSimpleFunction(IrElementTransformerVoid.kt:72)
    at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitSimpleFunction(IrElementTransformerVoid.kt:73)
    at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitSimpleFunction(IrElementTransformerVoid.kt:24)
    at org.jetbrains.kotlin.ir.declarations.IrSimpleFunction.accept(IrSimpleFunction.kt:37)
    at org.jetbrains.kotlin.ir.IrElementBase.transform(IrElementBase.kt:24)
    at org.jetbrains.kotlin.ir.util.TransformKt.transformInPlace(transform.kt:35)
    at org.jetbrains.kotlin.ir.declarations.IrFile.transformChildren(IrFile.kt:41)
    at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitPackageFragment(IrElementTransformerVoid.kt:41)
    at org.jetbrains.kotlin.backend.common.linkage.partial.PartiallyLinkedIrTreePatcher$ExpressionTransformer.visitPackageFragment(PartiallyLinkedIrTreePatcher.kt:453)
    at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitFile(IrElementTransformerVoid.kt:47)
    at org.jetbrains.kotlin.backend.common.linkage.partial.FileAwareIrElementTransformerVoid.access$visitFile$s-1784493990(PartialLinkageUtils.kt:82)
    at org.jetbrains.kotlin.backend.common.linkage.partial.FileAwareIrElementTransformerVoid$visitFile$1.invoke(PartialLinkageUtils.kt:97)
    at org.jetbrains.kotlin.backend.common.linkage.partial.FileAwareIrElementTransformerVoid$visitFile$1.invoke(PartialLinkageUtils.kt:96)
    at org.jetbrains.kotlin.backend.common.linkage.partial.FileAwareIrElementTransformerVoid.runInFile(PartialLinkageUtils.kt:90)
    at org.jetbrains.kotlin.backend.common.linkage.partial.FileAwareIrElementTransformerVoid.visitFile(PartialLinkageUtils.kt:96)
    at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitFile(IrElementTransformerVoid.kt:48)
    at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitFile(IrElementTransformerVoid.kt:24)
    at org.jetbrains.kotlin.ir.declarations.IrFile.accept(IrFile.kt:31)
    at org.jetbrains.kotlin.ir.declarations.IrFile.transform(IrFile.kt:34)
    at org.jetbrains.kotlin.backend.konan.serialization.KonanIrModuleFragmentImpl.transformChildren(KonanIrlinker.kt:1184)
    at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitModuleFragment(IrElementTransformerVoid.kt:33)
    at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitModuleFragment(IrElementTransformerVoid.kt:38)
    at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitModuleFragment(IrElementTransformerVoid.kt:24)
    at org.jetbrains.kotlin.backend.konan.serialization.KonanIrModuleFragmentImpl.accept(KonanIrlinker.kt:1176)
    at org.jetbrains.kotlin.ir.declarations.IrModuleFragment.transform(IrModuleFragment.kt:45)
    at org.jetbrains.kotlin.ir.declarations.IrModuleFragment.transform(IrModuleFragment.kt:26)
    at org.jetbrains.kotlin.backend.common.linkage.partial.PartiallyLinkedIrTreePatcher.transformVoid(PartiallyLinkedIrTreePatcher.kt:87)
    at org.jetbrains.kotlin.backend.common.linkage.partial.PartiallyLinkedIrTreePatcher.patchModuleFragments(PartiallyLinkedIrTreePatcher.kt:68)
    at org.jetbrains.kotlin.backend.common.linkage.partial.PartialLinkageSupportForLinkerImpl$generateStubsAndPatchUsages$1.invoke(PartialLinkageSupportForLinkerImpl.kt:62)
    at org.jetbrains.kotlin.backend.common.linkage.partial.PartialLinkageSupportForLinkerImpl$generateStubsAndPatchUsages$1.invoke(PartialLinkageSupportForLinkerImpl.kt:62)
    at org.jetbrains.kotlin.backend.common.linkage.partial.PartialLinkageSupportForLinkerImpl.generateStubsAndPatchUsagesInternal(PartialLinkageSupportForLinkerImpl.kt:80)
    at org.jetbrains.kotlin.backend.common.linkage.partial.PartialLinkageSupportForLinkerImpl.generateStubsAndPatchUsages(PartialLinkageSupportForLinkerImpl.kt:62)
    at org.jetbrains.kotlin.backend.common.serialization.KotlinIrLinker.postProcess(KotlinIrLinker.kt:231)
    at org.jetbrains.kotlin.backend.konan.serialization.KonanIrLinker.postProcess(KonanIrlinker.kt:533)
    at org.jetbrains.kotlin.psi2ir.Psi2IrTranslator.generateModuleFragment(Psi2IrTranslator.kt:104)
    at org.jetbrains.kotlin.psi2ir.Psi2IrTranslator.generateModuleFragment$default(Psi2IrTranslator.kt:84)
    at org.jetbrains.kotlin.backend.konan.PsiToIrKt.psiToIr(PsiToIr.kt:217)
    at org.jetbrains.kotlin.backend.konan.driver.phases.PsiToIrKt$PsiToIrPhase$2.invoke(PsiToIr.kt:102)
    at org.jetbrains.kotlin.backend.konan.driver.phases.PsiToIrKt$PsiToIrPhase$2.invoke(PsiToIr.kt:97)
    at org.jetbrains.kotlin.backend.konan.driver.phases.PhaseBuildersKt$createSimpleNamedCompilerPhase$1.phaseBody(PhaseBuilders.kt:32)
    at org.jetbrains.kotlin.backend.common.phaser.SimpleNamedCompilerPhase.phaseBody(CompilerPhase.kt:207)
    at org.jetbrains.kotlin.backend.common.phaser.AbstractNamedCompilerPhase.invoke(CompilerPhase.kt:94)
    at org.jetbrains.kotlin.backend.konan.driver.PhaseEngine.runPhase(Machinery.kt:139)
    at org.jetbrains.kotlin.backend.konan.driver.PhaseEngine.runPhase$default(Machinery.kt:130)
    at org.jetbrains.kotlin.backend.konan.driver.phases.TopLevelPhasesKt.runPsiToIr(TopLevelPhases.kt:52)
    at org.jetbrains.kotlin.backend.konan.driver.phases.TopLevelPhasesKt.runPsiToIr(TopLevelPhases.kt:40)
    at org.jetbrains.kotlin.backend.konan.driver.DynamicCompilerDriver.produceBinary(DynamicCompilerDriver.kt:135)
    at org.jetbrains.kotlin.backend.konan.driver.DynamicCompilerDriver.access$produceBinary(DynamicCompilerDriver.kt:31)
    at org.jetbrains.kotlin.backend.konan.driver.DynamicCompilerDriver$run$1$1$1.invoke(DynamicCompilerDriver.kt:46)
    at org.jetbrains.kotlin.backend.konan.driver.DynamicCompilerDriver$run$1$1$1.invoke(DynamicCompilerDriver.kt:36)
    at org.jetbrains.kotlin.backend.konan.driver.PhaseEngine$Companion$startTopLevel$topLevelPhase$1.phaseBody(Machinery.kt:98)
    at org.jetbrains.kotlin.backend.konan.driver.PhaseEngine$Companion$startTopLevel$topLevelPhase$1.phaseBody(Machinery.kt:92)
    at org.jetbrains.kotlin.backend.common.phaser.SimpleNamedCompilerPhase.phaseBody(CompilerPhase.kt:207)
    at org.jetbrains.kotlin.backend.common.phaser.AbstractNamedCompilerPhase.invoke(CompilerPhase.kt:94)
    at org.jetbrains.kotlin.backend.konan.driver.PhaseEngine$Companion.startTopLevel(Machinery.kt:105)
    at org.jetbrains.kotlin.backend.konan.driver.DynamicCompilerDriver.run(DynamicCompilerDriver.kt:36)
    at org.jetbrains.kotlin.backend.konan.KonanDriver.run(KonanDriver.kt:118)
    at org.jetbrains.kotlin.cli.bc.K2Native.runKonanDriver(K2Native.kt:151)
    at org.jetbrains.kotlin.cli.bc.K2Native.access$runKonanDriver(K2Native.kt:36)
    at org.jetbrains.kotlin.cli.bc.K2Native$runKonanDriver$konanDriver$1.spawn(K2Native.kt:148)
    at org.jetbrains.kotlin.backend.konan.CacheBuilder.buildLibraryCache(CacheBuilder.kt:254)
    at org.jetbrains.kotlin.backend.konan.CacheBuilder.build(CacheBuilder.kt:104)
    at org.jetbrains.kotlin.backend.konan.KonanDriver.run(KonanDriver.kt:112)
    at org.jetbrains.kotlin.cli.bc.K2Native.runKonanDriver(K2Native.kt:151)
    at org.jetbrains.kotlin.cli.bc.K2Native.doExecute(K2Native.kt:69)
    at org.jetbrains.kotlin.cli.bc.K2Native.doExecute(K2Native.kt:36)
    at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:104)
    at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:48)
    at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:101)
    at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:79)
    at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:43)
    at org.jetbrains.kotlin.cli.common.CLITool$Companion.doMainNoExit(CLITool.kt:180)
    at org.jetbrains.kotlin.cli.bc.K2Native$Companion$mainNoExitWithRenderer$1.invoke(K2Native.kt:188)
    at org.jetbrains.kotlin.cli.bc.K2Native$Companion$mainNoExitWithRenderer$1.invoke(K2Native.kt:187)
    at org.jetbrains.kotlin.util.UtilKt.profileIf(Util.kt:22)
    at org.jetbrains.kotlin.util.UtilKt.profile(Util.kt:16)
    at org.jetbrains.kotlin.cli.bc.K2Native$Companion.mainNoExitWithRenderer(K2Native.kt:187)
    at org.jetbrains.kotlin.cli.bc.K2NativeKt.mainNoExitWithGradleRenderer(K2Native.kt:205)
    at org.jetbrains.kotlin.cli.utilities.MainKt$daemonMain$1.invoke(main.kt:51)
    at org.jetbrains.kotlin.cli.utilities.MainKt$daemonMain$1.invoke(main.kt:51)
    at org.jetbrains.kotlin.cli.utilities.MainKt.mainImpl(main.kt:20)
    at org.jetbrains.kotlin.cli.utilities.MainKt.inProcessMain(main.kt:58)
    at org.jetbrains.kotlin.cli.utilities.MainKt.daemonMain(main.kt:51)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.base/java.lang.reflect.Method.invoke(Unknown Source)
    at org.jetbrains.kotlin.compilerRunner.KotlinToolRunner.runInProcess(KotlinToolRunner.kt:198)
    at org.jetbrains.kotlin.compilerRunner.KotlinToolRunner.run(KotlinToolRunner.kt:135)
    at org.jetbrains.kotlin.compilerRunner.KotlinNativeToolRunner.run(nativeToolRunners.kt:146)
    at org.jetbrains.kotlin.gradle.tasks.KotlinNativeLink$compile$1.invoke(KotlinNativeLink.kt:416)
    at org.jetbrains.kotlin.gradle.tasks.KotlinNativeLink$compile$1.invoke(KotlinNativeLink.kt:364)
    at org.jetbrains.kotlin.compilerRunner.ReportUtilsKt.addBuildMetricsForTaskAction(reportUtils.kt:276)
    at org.jetbrains.kotlin.gradle.tasks.KotlinNativeLink.compile(KotlinNativeLink.kt:364)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.base/java.lang.reflect.Method.invoke(Unknown Source)
    at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:125)
    at org.gradle.api.internal.project.taskfactory.StandardTaskAction.doExecute(StandardTaskAction.java:58)
    at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:51)
    at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:29)
    at org.gradle.api.internal.tasks.execution.TaskExecution$3.run(TaskExecution.java:248)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:29)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:26)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)
    at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157)
    at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
    at org.gradle.internal.operations.DefaultBuildOperationRunner.run(DefaultBuildOperationRunner.java:47)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:68)
    at org.gradle.api.internal.tasks.execution.TaskExecution.executeAction(TaskExecution.java:233)
    at org.gradle.api.internal.tasks.execution.TaskExecution.executeActions(TaskExecution.java:216)
    at org.gradle.api.internal.tasks.execution.TaskExecution.executeWithPreviousOutputFiles(TaskExecution.java:199)
    at org.gradle.api.internal.tasks.execution.TaskExecution.execute(TaskExecution.java:166)
    at org.gradle.internal.execution.steps.ExecuteStep.executeInternal(ExecuteStep.java:105)
    at org.gradle.internal.execution.steps.ExecuteStep.access$000(ExecuteStep.java:44)
    at org.gradle.internal.execution.steps.ExecuteStep$1.call(ExecuteStep.java:59)
    at org.gradle.internal.execution.steps.ExecuteStep$1.call(ExecuteStep.java:56)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:204)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:199)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)
    at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157)
    at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
    at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:53)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:73)
    at org.gradle.internal.execution.steps.ExecuteStep.execute(ExecuteStep.java:56)
    at org.gradle.internal.execution.steps.ExecuteStep.execute(ExecuteStep.java:44)
    at org.gradle.internal.execution.steps.RemovePreviousOutputsStep.execute(RemovePreviousOutputsStep.java:67)
    at org.gradle.internal.execution.steps.RemovePreviousOutputsStep.execute(RemovePreviousOutputsStep.java:37)
    at org.gradle.internal.execution.steps.CancelExecutionStep.execute(CancelExecutionStep.java:41)
    at org.gradle.internal.execution.steps.TimeoutStep.executeWithoutTimeout(TimeoutStep.java:74)
    at org.gradle.internal.execution.steps.TimeoutStep.execute(TimeoutStep.java:55)
    at org.gradle.internal.execution.steps.CreateOutputsStep.execute(CreateOutputsStep.java:50)
    at org.gradle.internal.execution.steps.CreateOutputsStep.execute(CreateOutputsStep.java:28)
    at org.gradle.internal.execution.steps.CaptureStateAfterExecutionStep.executeDelegateBroadcastingChanges(CaptureStateAfterExecutionStep.java:100)
    at org.gradle.internal.execution.steps.CaptureStateAfterExecutionStep.execute(CaptureStateAfterExecutionStep.java:72)
    at org.gradle.internal.execution.steps.CaptureStateAfterExecutionStep.execute(CaptureStateAfterExecutionStep.java:50)
    at org.gradle.internal.execution.steps.ResolveInputChangesStep.execute(ResolveInputChangesStep.java:40)
    at org.gradle.internal.execution.steps.ResolveInputChangesStep.execute(ResolveInputChangesStep.java:29)
    at org.gradle.internal.execution.steps.BuildCacheStep.executeWithoutCache(BuildCacheStep.java:179)
    at org.gradle.internal.execution.steps.BuildCacheStep.lambda$execute$1(BuildCacheStep.java:70)
    at org.gradle.internal.Either$Right.fold(Either.java:175)
    at org.gradle.internal.execution.caching.CachingState.fold(CachingState.java:59)
    at org.gradle.internal.execution.steps.BuildCacheStep.execute(BuildCacheStep.java:68)
    at org.gradle.internal.execution.steps.BuildCacheStep.execute(BuildCacheStep.java:46)
    at org.gradle.internal.execution.steps.StoreExecutionStateStep.execute(StoreExecutionStateStep.java:36)
    at org.gradle.internal.execution.steps.StoreExecutionStateStep.execute(StoreExecutionStateStep.java:25)
    at org.gradle.internal.execution.steps.RecordOutputsStep.execute(RecordOutputsStep.java:36)
    at org.gradle.internal.execution.steps.RecordOutputsStep.execute(RecordOutputsStep.java:22)
    at org.gradle.internal.execution.steps.SkipUpToDateStep.executeBecause(SkipUpToDateStep.java:91)
    at org.gradle.internal.execution.steps.SkipUpToDateStep.lambda$execute$2(SkipUpToDateStep.java:55)
    at java.base/java.util.Optional.orElseGet(Unknown Source)
    at org.gradle.internal.execution.steps.SkipUpToDateStep.execute(SkipUpToDateStep.java:55)
    at org.gradle.internal.execution.steps.SkipUpToDateStep.execute(SkipUpToDateStep.java:37)
    at org.gradle.internal.execution.steps.ResolveChangesStep.execute(ResolveChangesStep.java:65)
    at org.gradle.internal.execution.steps.ResolveChangesStep.execute(ResolveChangesStep.java:36)
    at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsFinishedStep.execute(MarkSnapshottingInputsFinishedStep.java:37)
    at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsFinishedStep.execute(MarkSnapshottingInputsFinishedStep.java:27)
    at org.gradle.internal.execution.steps.ResolveCachingStateStep.execute(ResolveCachingStateStep.java:76)
    at org.gradle.internal.execution.steps.ResolveCachingStateStep.execute(ResolveCachingStateStep.java:37)
    at org.gradle.internal.execution.steps.ValidateStep.execute(ValidateStep.java:108)
    at org.gradle.internal.execution.steps.ValidateStep.execute(ValidateStep.java:55)
    at org.gradle.internal.execution.steps.CaptureStateBeforeExecutionStep.execute(CaptureStateBeforeExecutionStep.java:71)
    at org.gradle.internal.execution.steps.CaptureStateBeforeExecutionStep.execute(CaptureStateBeforeExecutionStep.java:45)
    at org.gradle.internal.execution.steps.SkipEmptyWorkStep.executeWithNonEmptySources(SkipEmptyWorkStep.java:177)
    at org.gradle.internal.execution.steps.SkipEmptyWorkStep.execute(SkipEmptyWorkStep.java:86)
    at org.gradle.internal.execution.steps.SkipEmptyWorkStep.execute(SkipEmptyWorkStep.java:53)
    at org.gradle.internal.execution.steps.RemoveUntrackedExecutionStateStep.execute(RemoveUntrackedExecutionStateStep.java:32)
    at org.gradle.internal.execution.steps.RemoveUntrackedExecutionStateStep.execute(RemoveUntrackedExecutionStateStep.java:21)
    at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsStartedStep.execute(MarkSnapshottingInputsStartedStep.java:38)
    at org.gradle.internal.execution.steps.LoadPreviousExecutionStateStep.execute(LoadPreviousExecutionStateStep.java:36)
    at org.gradle.internal.execution.steps.LoadPreviousExecutionStateStep.execute(LoadPreviousExecutionStateStep.java:23)
    at org.gradle.internal.execution.steps.CleanupStaleOutputsStep.execute(CleanupStaleOutputsStep.java:75)
    at org.gradle.internal.execution.steps.CleanupStaleOutputsStep.execute(CleanupStaleOutputsStep.java:41)
    at org.gradle.internal.execution.steps.ExecuteWorkBuildOperationFiringStep.lambda$execute$2(ExecuteWorkBuildOperationFiringStep.java:66)
    at java.base/java.util.Optional.orElseGet(Unknown Source)
    at org.gradle.internal.execution.steps.ExecuteWorkBuildOperationFiringStep.execute(ExecuteWorkBuildOperationFiringStep.java:66)
    at org.gradle.internal.execution.steps.ExecuteWorkBuildOperationFiringStep.execute(ExecuteWorkBuildOperationFiringStep.java:38)
    at org.gradle.internal.execution.steps.AssignWorkspaceStep.lambda$execute$0(AssignWorkspaceStep.java:32)
    at org.gradle.api.internal.tasks.execution.TaskExecution$4.withWorkspace(TaskExecution.java:293)
    at org.gradle.internal.execution.steps.AssignWorkspaceStep.execute(AssignWorkspaceStep.java:30)
    at org.gradle.internal.execution.steps.AssignWorkspaceStep.execute(AssignWorkspaceStep.java:21)
    at org.gradle.internal.execution.steps.IdentityCacheStep.execute(IdentityCacheStep.java:37)
    at org.gradle.internal.execution.steps.IdentityCacheStep.execute(IdentityCacheStep.java:27)
    at org.gradle.internal.execution.steps.IdentifyStep.execute(IdentifyStep.java:47)
    at org.gradle.internal.execution.steps.IdentifyStep.execute(IdentifyStep.java:34)
    at org.gradle.internal.execution.impl.DefaultExecutionEngine$1.execute(DefaultExecutionEngine.java:64)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeIfValid(ExecuteActionsTaskExecuter.java:145)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:134)
    at org.gradle.api.internal.tasks.execution.FinalizePropertiesTaskExecuter.execute(FinalizePropertiesTaskExecuter.java:46)
    at org.gradle.api.internal.tasks.execution.ResolveTaskExecutionModeExecuter.execute(ResolveTaskExecutionModeExecuter.java:51)
    at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:57)
    at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:74)
    at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:36)
    at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.executeTask(EventFiringTaskExecuter.java:77)
    at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:55)
    at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:52)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:204)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:199)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)
    at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157)
    at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
    at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:53)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:73)
    at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:52)
    at org.gradle.execution.plan.LocalTaskNodeExecutor.execute(LocalTaskNodeExecutor.java:42)
    at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:331)
    at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:318)
    at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.lambda$execute$0(DefaultTaskExecutionGraph.java:314)
    at org.gradle.internal.operations.CurrentBuildOperationRef.with(CurrentBuildOperationRef.java:80)
    at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:314)
    at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:303)
    at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.execute(DefaultPlanExecutor.java:463)
    at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.run(DefaultPlanExecutor.java:380)
ZacSweers commented 8 months ago

Do you have a reproducer? I'm not really sure what we can do about this, it's a fairly standard function 🤔

joeldenke commented 8 months ago

Worth mention is this only happening when doing clean builds, for android + iOS. Like rebuild in IDE. And it appears as warnings. It still compiles. It started happening when I upgraded from 0.18.1 to 0.19.0 release, so something changed in that release impacting this.

The task in Gradle is: > Task :shared:linkDebugFrameworkIosSimulatorArm64 which having gradle setup:

plugins {
    alias(libs.plugins.app.android.library)
    alias(libs.plugins.app.compose.multiplatform)
    alias(libs.plugins.app.kotlin.multiplatform)
    alias(libs.plugins.app.compose.android)
    alias(libs.plugins.kspGradle)
}

composeFeatures {
    runtime()
    foundation()
    ui()
    material3()
    material3WindowSizeClasses()
    componentResources()
}

kotlin {
    targets.withType<KotlinNativeTarget>().configureEach {
        binaries.framework {
            isStatic = true
            baseName = "AppKt"
        }
    }

    sourceSets {
        commonMain {
            dependencies {
                implementation(projects.core.common)
                api(projects.ui.base)
                implementation(projects.core.data)
                implementation(libs.ktor.core)
                implementation(libs.koin)
                api(libs.slack.circuit.foundation)
                api(libs.slack.circuit.backstack)
                api(libs.slack.circuit.circuitx.gesture.navigation)
                implementation(projects.feature.login)
                implementation(projects.feature.user)
                implementation(projects.feature.search)
                implementation(projects.feature.todo)
                implementation(projects.feature.home)
                implementation(projects.feature.survey)
                implementation(projects.feature.register)
            }
        }
        androidMain {
            dependencies {
                api(libs.androidx.core.core.ktx)
                api(libs.androidx.compat)
                implementation(libs.koin.android)
                api(libs.androidx.activity.compose)
                implementation(libs.androidx.navigation.compose)
                api(libs.androidx.lifecycle.runtime.compose)
                api(libs.androidx.lifecycle.viewmodel.compose)
                api(libs.androidx.lifecycle.viewmodel)
                api(libs.androidx.lifecycle.viewmodel.ktx)
                implementation(compose.preview)
                implementation(compose.uiTooling)
            }
        }
    }
}

android {
    namespace = "se.app.shared"
}

Using this config for the target platforms in my KMP convention plugin applied, if that impacts:

        targets.withType<KotlinNativeTarget>().configureEach {
            binaries.configureEach {
                linkerOpts("-lsqlite3")
                freeCompilerArgs += "-Xdisable-phases=RemoveRedundantCallsToStaticInitializersPhase"
            }

            configureFreeCompilerArgsArguments(
                "-Xallocator=custom",
                "-Xadd-light-debug=enable"
            )
            compilations.configureEach {
                compilerOptions.configure {
                    optIn.addAll("kotlinx.cinterop.ExperimentalForeignApi", "kotlinx.cinterop.BetaInteropApi")
                }
            }
        }

        targets.configureEach {
            sourceSets.all {
                languageSettings.optIn("kotlin.ExperimentalUnsignedTypes")
            }
            configureFreeCompilerArgsArguments(
                "-Xexpect-actual-classes"
            )
        }
ZacSweers commented 8 months ago

Without a reproducer project I'm not sure there's much we can do. We'd need to send this to JB probably too and they'll want that too

joeldenke commented 8 months ago

Hmm Yeah I will see what I can do. Hopefully enough using default CMP template and use Circuit. Will try create small repro.

prasannajeet commented 8 months ago

I am facing the same warning in my project, linking the repo.

And I am also unable to build the project with the below error in :composeApp:linkReleaseFrameworkIosArm64, :composeApp:linkReleaseFrameworkIosX64 and :composeApp:linkReleaseFrameworkIosSimulatorArm64 steps and I am unable to build the app for iOS at all

e: Compilation failed: Index 0 out of bounds for length 0

 * Source files: 
 * Compiler version: 1.9.22
 * Output kind: FRAMEWORK

e: java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0
    at java.base/jdk.internal.util.Preconditions.outOfBounds(Unknown Source)
    at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Unknown Source)
    at java.base/jdk.internal.util.Preconditions.checkIndex(Unknown Source)
    at java.base/java.util.Objects.checkIndex(Unknown Source)
    at java.base/java.util.ArrayList.get(Unknown Source)
ZacSweers commented 8 months ago

Without a repro case there's not much we can do. This seems to be coming from the CM compiler

joeldenke commented 8 months ago

@ZacSweers Sorry for late reply, was some other things in my way had to deal with. Here is sample repo project. Its using version 1.6.0-rc03, but same result as in 1.6.0-rc02.

Repro-circuit.zip

kodebach commented 8 months ago

I ran into this issue as well and the iOS link step always failed with the "Symbol ... is unbound" error (no IndexOutOfBoundsException). As a workaround I used the overload with the explicit class argument:

rememberAnsweringNavigator(navigator, Result::class) {
   // ...
}

It seems only the @Composable inline fun <reified T> overload is broken.

ZacSweers commented 8 months ago

Would you mind filing a bug report on compose-multiplatform? This seems like a bug with the multiplatform compose compiler with reified functions

joeldenke commented 8 months ago

The index out of bounds thing, seems to be this: https://youtrack.jetbrains.com/issue/KT-64508/IndexOutOfBoundsException-in-Konan-StaticInitializersOptimization

Which can be solved with:

kotlin.targets.withType<org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget> {
    binaries.all {
        freeCompilerArgs += "-Xdisable-phases=RemoveRedundantCallsToStaticInitializersPhase"
    }
}

However thats not the same bug I experience, even though I see that as well sometimes. But yes seems to be Konan problems. Will try file a bug to CMP project as well.

ZacSweers commented 7 months ago

Closing as this is not really a circuit bug

bidrohi commented 5 months ago

I'm seeing the same error when I upgrade to Kotlin 2.0 and Compose MP 1.6.10. Looks similar to the ticket open here for Compose: https://github.com/JetBrains/compose-multiplatform/issues/2900