Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using @Composable reified inline functions fails to compile for iOS targets #2900

Closed
xxfast opened this issue Mar 20, 2023 · 10 comments
Closed
Assignees
Labels
bug Something isn't working compiler Compiler plugin related submitted

Comments

@xxfast
Copy link

xxfast commented Mar 20, 2023

Describe the bug
I have a simple @Composable inline function with reified template parameters like this

@Composable
inline fun <reified C : Parcelable> rememberRouter(
  stack: List<C>,
  handleBackButton: Boolean = true
): Router<C> { ..}

compiling this for any ios target fails with

Compilation failed: Symbol for [ io.github.xxfast.decompose.router/rememberRouter|rememberRouter(kotlin.Any;kotlin.Boolean;kotlin.Function0<kotlin.collections.List<0:0>>){0§<kotlin.Any>}[0] <- Local[<TP>,0|TYPE_PARAMETER name:C index:0 variance: superTypes:[kotlin.Any] reified:false] ] is unbound

I think i have all my dependencies set correctly so not sure why this is popping up 🤔

However, this error goes away as soon as you make the same function not inline and not reified

@Composable
fun <C : Parcelable> rememberRouter(
  type: KClass<C>,
  stack: List<C>,
  handleBackButton: Boolean = true
): Router<C>

Affected platforms
Select one of the platforms below:

  • iOS

Versions

  • Kotlin version*: 1.9.20
  • Compose Multiplatform version*: 1.5.10

To Reproduce
Steps and/or the code snippet to reproduce the behavior:

  1. Checkout branch from Migrate to decompose 2.2.0 xxfast/Decompose-Router#80
  2. uncomment signature on line number 42-47
  3. Open xcode project and hit run
  4. Error on xcode build log on linking stage

Expected behavior
@Composable inline function with reified template parameters to build and linked correctly.

@xxfast xxfast added bug Something isn't working submitted labels Mar 20, 2023
@pjBooms
Copy link
Contributor

pjBooms commented Mar 21, 2023

Error on xcode build log on linking stage

Unfortunately, it fails earlier on my side with "unable to open configuration settings file".

Then I tried to copy-paste problematic code into https://github.com/JetBrains/compose-multiplatform-template
The compilation failed for @Composable fun rememberRouter for iOS target because it is declared public. It is known issue (you reported two different issues on this recently) that we are fixing now. Making the function internal fixes the problem even if I declare it as inline with reified generic parameter. Personally, I have no idea why the rememberRouter is compiled now on your side without declaring it internal but can you make it internal and inline with reified generic? We need to know if it is the same problem with internal or not?

@xxfast
Copy link
Author

xxfast commented Mar 21, 2023

Thanks for the quick reply 🙂 unfortunately, I need this to be not internal for another multiplatform multimodule project where this rememberRouter exists in a :core module that each of the :feature modules consume.

Feel free to close #2901 and #2903 if they are all caused by the same underlying issue. I'll watch this issue for future updates 👍

@xxfast
Copy link
Author

xxfast commented Nov 30, 2023

With compose-multiplatform 1.5.10,. The error message is now updated to

Compilation failed: Symbol for [ io.github.xxfast.decompose.router/rememberRouter|rememberRouter(kotlin.Any;kotlin.Boolean;kotlin.Function0<kotlin.collections.List<0:0>>){0§<kotlin.Any>}[0] <- Local[<TP>,0|TYPE_PARAMETER name:C index:0 variance: superTypes:[kotlin.Any] reified:false] ] is unbound

I've updated the original issue description to match the observations from the latest findings

@xxfast xxfast changed the title Using @Composable reified inline functions across modules fails to compile for iOS targets Using @Composable reified inline functions fails to compile for iOS targets Nov 30, 2023
@eymar eymar added the compiler Compiler plugin related label Nov 30, 2023
@eymar eymar self-assigned this Nov 30, 2023
@bidrohi
Copy link

bidrohi commented May 28, 2024

I'm seeming a similar error with Circuit, no changes in code from 1.6.2 only upgrading to Kotlin 2.0 (from 1.9.23) and Compose 1.6.10. Here's the call stack:

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:587)
	at org.jetbrains.kotlin.backend.common.linkage.partial.PartiallyLinkedIrTreePatcher$ExpressionTransformer.checkReferencedDeclaration$default(PartiallyLinkedIrTreePatcher.kt:576)
	at org.jetbrains.kotlin.backend.common.linkage.partial.PartiallyLinkedIrTreePatcher$ExpressionTransformer.visitClassReference(PartiallyLinkedIrTreePatcher.kt:494)
	at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitClassReference(IrElementTransformerVoid.kt:329)
	at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitClassReference(IrElementTransformerVoid.kt:19)
	at org.jetbrains.kotlin.ir.expressions.IrClassReference.accept(IrClassReference.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:45)
	at org.jetbrains.kotlin.ir.expressions.IrMemberAccessExpression.transformChildren(IrMemberAccessExpression.kt:68)
	at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoidKt.transformChildrenVoid(IrElementTransformerVoid.kt:565)
	at org.jetbrains.kotlin.backend.common.linkage.partial.PartiallyLinkedIrTreePatcher$ExpressionTransformer.visitCall(PartiallyLinkedIrTreePatcher.kt:1324)
	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.declarations.IrVariable.transformChildren(IrVariable.kt:43)
	at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitDeclaration(IrElementTransformerVoid.kt:40)
	at org.jetbrains.kotlin.backend.common.linkage.partial.PartiallyLinkedIrTreePatcher$ExpressionTransformer.visitDeclaration(PartiallyLinkedIrTreePatcher.kt:464)
	at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitVariable(IrElementTransformerVoid.kt:140)
	at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitVariable(IrElementTransformerVoid.kt:143)
	at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitVariable(IrElementTransformerVoid.kt:19)
	at org.jetbrains.kotlin.ir.declarations.IrVariable.accept(IrVariable.kt:36)
	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: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.backend.common.linkage.partial.PartiallyLinkedIrTreePatcher$ExpressionTransformer.visitBlockBody(PartiallyLinkedIrTreePatcher.kt:469)
	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.IrElementTransformerVoid.visitDeclaration(IrElementTransformerVoid.kt:40)
	at org.jetbrains.kotlin.backend.common.linkage.partial.PartiallyLinkedIrTreePatcher$ExpressionTransformer.visitDeclaration(PartiallyLinkedIrTreePatcher.kt:464)
	at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitFunction(IrElementTransformerVoid.kt:72)
	at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitSimpleFunction(IrElementTransformerVoid.kt:128)
	at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitSimpleFunction(IrElementTransformerVoid.kt:131)
	at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitSimpleFunction(IrElementTransformerVoid.kt:19)
	at org.jetbrains.kotlin.ir.declarations.IrSimpleFunction.accept(IrSimpleFunction.kt:36)
	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:38)
	at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitPackageFragment(IrElementTransformerVoid.kt:146)
	at org.jetbrains.kotlin.backend.common.linkage.partial.PartiallyLinkedIrTreePatcher$ExpressionTransformer.visitPackageFragment(PartiallyLinkedIrTreePatcher.kt:455)
	at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitFile(IrElementTransformerVoid.kt:160)
	at org.jetbrains.kotlin.backend.common.linkage.partial.FileAwareIrElementTransformerVoid.visitFile$lambda$0(PartialLinkageUtils.kt:97)
	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:163)
	at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitFile(IrElementTransformerVoid.kt:19)
	at org.jetbrains.kotlin.ir.declarations.IrFile.accept(IrFile.kt:28)
	at org.jetbrains.kotlin.ir.declarations.IrFile.transform(IrFile.kt:31)
	at org.jetbrains.kotlin.ir.declarations.IrFile.transform(IrFile.kt:20)
	at org.jetbrains.kotlin.ir.util.TransformKt.transformInPlace(transform.kt:35)
	at org.jetbrains.kotlin.ir.declarations.IrModuleFragment.transformChildren(IrModuleFragment.kt:43)
	at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitModuleFragment(IrElementTransformerVoid.kt:108)
	at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitModuleFragment(IrElementTransformerVoid.kt:113)
	at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitModuleFragment(IrElementTransformerVoid.kt:19)
	at org.jetbrains.kotlin.ir.declarations.IrModuleFragment.accept(IrModuleFragment.kt:33)
	at org.jetbrains.kotlin.ir.declarations.IrModuleFragment.transform(IrModuleFragment.kt:36)
	at org.jetbrains.kotlin.ir.declarations.IrModuleFragment.transform(IrModuleFragment.kt:23)
	at org.jetbrains.kotlin.backend.common.linkage.partial.PartiallyLinkedIrTreePatcher.transformVoid(PartiallyLinkedIrTreePatcher.kt:89)
	at org.jetbrains.kotlin.backend.common.linkage.partial.PartiallyLinkedIrTreePatcher.patchModuleFragments(PartiallyLinkedIrTreePatcher.kt:70)
	at org.jetbrains.kotlin.backend.common.linkage.partial.PartialLinkageSupportForLinkerImpl.generateStubsAndPatchUsages$lambda$1(PartialLinkageSupportForLinkerImpl.kt:64)
	at org.jetbrains.kotlin.backend.common.linkage.partial.PartialLinkageSupportForLinkerImpl.generateStubsAndPatchUsagesInternal(PartialLinkageSupportForLinkerImpl.kt:82)
	at org.jetbrains.kotlin.backend.common.linkage.partial.PartialLinkageSupportForLinkerImpl.generateStubsAndPatchUsages(PartialLinkageSupportForLinkerImpl.kt:64)
	at org.jetbrains.kotlin.backend.common.serialization.KotlinIrLinker.postProcess(KotlinIrLinker.kt:231)
	at org.jetbrains.kotlin.backend.konan.serialization.KonanIrLinker.postProcess(KonanIrLinker.kt:348)
	at org.jetbrains.kotlin.psi2ir.Psi2IrTranslator.generateModuleFragment(Psi2IrTranslator.kt:101)
	at org.jetbrains.kotlin.psi2ir.Psi2IrTranslator.generateModuleFragment$default(Psi2IrTranslator.kt:82)
	at org.jetbrains.kotlin.backend.konan.PsiToIrKt.psiToIr(PsiToIr.kt:222)
	at org.jetbrains.kotlin.backend.konan.driver.phases.PsiToIrKt.PsiToIrPhase$lambda$1(PsiToIr.kt:100)
	at org.jetbrains.kotlin.backend.common.phaser.PhaseBuildersKt$createSimpleNamedCompilerPhase$1.phaseBody(PhaseBuilders.kt:71)
	at org.jetbrains.kotlin.backend.common.phaser.SimpleNamedCompilerPhase.phaseBody(CompilerPhase.kt:226)
	at org.jetbrains.kotlin.backend.common.phaser.AbstractNamedCompilerPhase.invoke(CompilerPhase.kt:113)
	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:160)
	at org.jetbrains.kotlin.backend.konan.driver.DynamicCompilerDriver.run$lambda$2$lambda$1$lambda$0(DynamicCompilerDriver.kt:46)
	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:226)
	at org.jetbrains.kotlin.backend.common.phaser.AbstractNamedCompilerPhase.invoke(CompilerPhase.kt:113)
	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:129)
	at org.jetbrains.kotlin.cli.bc.K2Native.runKonanDriver(K2Native.kt:152)
	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:149)
	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:121)
	at org.jetbrains.kotlin.cli.bc.K2Native.runKonanDriver(K2Native.kt:152)
	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$lambda$2(K2Native.kt:189)
	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:188)
	at org.jetbrains.kotlin.cli.bc.K2NativeKt.mainNoExitWithXcodeRenderer(K2Native.kt:207)
	at org.jetbrains.kotlin.cli.utilities.MainKt$daemonMainWithXcodeRenderer$1.invoke(main.kt:52)
	at org.jetbrains.kotlin.cli.utilities.MainKt$daemonMainWithXcodeRenderer$1.invoke(main.kt:52)
	at org.jetbrains.kotlin.cli.utilities.MainKt.mainImpl(main.kt:20)
	at org.jetbrains.kotlin.cli.utilities.MainKt.inProcessMain(main.kt:57)
	at org.jetbrains.kotlin.cli.utilities.MainKt.daemonMainWithXcodeRenderer(main.kt:52)
	at jdk.internal.reflect.GeneratedMethodAccessor2221.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at org.jetbrains.kotlin.compilerRunner.KotlinToolRunner.runInProcess(KotlinToolRunner.kt:208)
	at org.jetbrains.kotlin.compilerRunner.KotlinToolRunner.run(KotlinToolRunner.kt:142)
	at org.jetbrains.kotlin.compilerRunner.KotlinNativeToolRunner.run(nativeToolRunners.kt:153)
	at org.jetbrains.kotlin.gradle.tasks.KotlinNativeLink$compile$1.invoke(KotlinNativeLink.kt:452)
	at org.jetbrains.kotlin.gradle.tasks.KotlinNativeLink$compile$1.invoke(KotlinNativeLink.kt:400)
	at org.jetbrains.kotlin.compilerRunner.ReportUtilsKt.addBuildMetricsForTaskAction(reportUtils.kt:261)
	at org.jetbrains.kotlin.gradle.tasks.KotlinNativeLink.compile(KotlinNativeLink.kt:400)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	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:244)
	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:229)
	at org.gradle.api.internal.tasks.execution.TaskExecution.executeActions(TaskExecution.java:212)
	at org.gradle.api.internal.tasks.execution.TaskExecution.executeWithPreviousOutputFiles(TaskExecution.java:195)
	at org.gradle.api.internal.tasks.execution.TaskExecution.execute(TaskExecution.java:162)
	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:200)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:195)
	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.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.PreCreateOutputParentsStep.execute(PreCreateOutputParentsStep.java:50)
	at org.gradle.internal.execution.steps.PreCreateOutputParentsStep.execute(PreCreateOutputParentsStep.java:28)
	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.BroadcastChangingOutputsStep.execute(BroadcastChangingOutputsStep.java:61)
	at org.gradle.internal.execution.steps.BroadcastChangingOutputsStep.execute(BroadcastChangingOutputsStep.java:26)
	at org.gradle.internal.execution.steps.CaptureOutputsAfterExecutionStep.execute(CaptureOutputsAfterExecutionStep.java:67)
	at org.gradle.internal.execution.steps.CaptureOutputsAfterExecutionStep.execute(CaptureOutputsAfterExecutionStep.java:45)
	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:189)
	at org.gradle.internal.execution.steps.BuildCacheStep.lambda$execute$1(BuildCacheStep.java:75)
	at org.gradle.internal.Either$Right.fold(Either.java:175)
	at org.gradle.internal.execution.caching.CachingState.fold(CachingState.java:62)
	at org.gradle.internal.execution.steps.BuildCacheStep.execute(BuildCacheStep.java:73)
	at org.gradle.internal.execution.steps.BuildCacheStep.execute(BuildCacheStep.java:48)
	at org.gradle.internal.execution.steps.StoreExecutionStateStep.execute(StoreExecutionStateStep.java:46)
	at org.gradle.internal.execution.steps.StoreExecutionStateStep.execute(StoreExecutionStateStep.java:35)
	at org.gradle.internal.execution.steps.SkipUpToDateStep.executeBecause(SkipUpToDateStep.java:76)
	at org.gradle.internal.execution.steps.SkipUpToDateStep.lambda$execute$2(SkipUpToDateStep.java:54)
	at java.base/java.util.Optional.orElseGet(Optional.java:364)
	at org.gradle.internal.execution.steps.SkipUpToDateStep.execute(SkipUpToDateStep.java:54)
	at org.gradle.internal.execution.steps.SkipUpToDateStep.execute(SkipUpToDateStep.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.ResolveIncrementalCachingStateStep.executeDelegate(ResolveIncrementalCachingStateStep.java:49)
	at org.gradle.internal.execution.steps.ResolveIncrementalCachingStateStep.executeDelegate(ResolveIncrementalCachingStateStep.java:27)
	at org.gradle.internal.execution.steps.AbstractResolveCachingStateStep.execute(AbstractResolveCachingStateStep.java:71)
	at org.gradle.internal.execution.steps.AbstractResolveCachingStateStep.execute(AbstractResolveCachingStateStep.java:39)
	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.ValidateStep.execute(ValidateStep.java:106)
	at org.gradle.internal.execution.steps.ValidateStep.execute(ValidateStep.java:55)
	at org.gradle.internal.execution.steps.AbstractCaptureStateBeforeExecutionStep.execute(AbstractCaptureStateBeforeExecutionStep.java:64)
	at org.gradle.internal.execution.steps.AbstractCaptureStateBeforeExecutionStep.execute(AbstractCaptureStateBeforeExecutionStep.java:43)
	at org.gradle.internal.execution.steps.AbstractSkipEmptyWorkStep.executeWithNonEmptySources(AbstractSkipEmptyWorkStep.java:125)
	at org.gradle.internal.execution.steps.AbstractSkipEmptyWorkStep.execute(AbstractSkipEmptyWorkStep.java:61)
	at org.gradle.internal.execution.steps.AbstractSkipEmptyWorkStep.execute(AbstractSkipEmptyWorkStep.java:36)
	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.HandleStaleOutputsStep.execute(HandleStaleOutputsStep.java:75)
	at org.gradle.internal.execution.steps.HandleStaleOutputsStep.execute(HandleStaleOutputsStep.java:41)
	at org.gradle.internal.execution.steps.AssignMutableWorkspaceStep.lambda$execute$0(AssignMutableWorkspaceStep.java:35)
	at org.gradle.api.internal.tasks.execution.TaskExecution$4.withWorkspace(TaskExecution.java:289)
	at org.gradle.internal.execution.steps.AssignMutableWorkspaceStep.execute(AssignMutableWorkspaceStep.java:31)
	at org.gradle.internal.execution.steps.AssignMutableWorkspaceStep.execute(AssignMutableWorkspaceStep.java:22)
	at org.gradle.internal.execution.steps.ChoosePipelineStep.execute(ChoosePipelineStep.java:40)
	at org.gradle.internal.execution.steps.ChoosePipelineStep.execute(ChoosePipelineStep.java:23)
	at org.gradle.internal.execution.steps.ExecuteWorkBuildOperationFiringStep.lambda$execute$2(ExecuteWorkBuildOperationFiringStep.java:67)
	at java.base/java.util.Optional.orElseGet(Optional.java:364)
	at org.gradle.internal.execution.steps.ExecuteWorkBuildOperationFiringStep.execute(ExecuteWorkBuildOperationFiringStep.java:67)
	at org.gradle.internal.execution.steps.ExecuteWorkBuildOperationFiringStep.execute(ExecuteWorkBuildOperationFiringStep.java:39)
	at org.gradle.internal.execution.steps.IdentityCacheStep.execute(IdentityCacheStep.java:46)
	at org.gradle.internal.execution.steps.IdentityCacheStep.execute(IdentityCacheStep.java:34)
	at org.gradle.internal.execution.steps.IdentifyStep.execute(IdentifyStep.java:48)
	at org.gradle.internal.execution.steps.IdentifyStep.execute(IdentifyStep.java:35)
	at org.gradle.internal.execution.impl.DefaultExecutionEngine$1.execute(DefaultExecutionEngine.java:61)
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeIfValid(ExecuteActionsTaskExecuter.java:127)
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:116)
	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:200)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:195)
	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)
	at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
	at org.gradle.internal.concurrent.AbstractManagedExecutor$1.run(AbstractManagedExecutor.java:47)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.lang.Thread.run(Thread.java:840)

@MatkovIvan
Copy link
Member

It sounds very similar to #3147 (fixed in 1.6.10)
cc @eymar @shishkin-pavel

@shishkin-pavel
Copy link
Collaborator

Hi, @bidrohi! could you please provide some reproducer?

@bidrohi
Copy link

bidrohi commented Jun 2, 2024

Hi, @bidrohi! could you please provide some reproducer?

I'm working to narrow down the issue to see if I can get to a small reproducable package.

@bidrohi
Copy link

bidrohi commented Jun 7, 2024

I'm unable to reproduce this at all now, even on the large project.. may be some configuration cache issue? 🤷🏽‍♂️

@MatkovIvan
Copy link
Member

Closing as solved in 1.6.10

@okushnikov
Copy link
Collaborator

Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.

@JetBrains JetBrains locked and limited conversation to collaborators Dec 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working compiler Compiler plugin related submitted
Projects
None yet
Development

No branches or pull requests

7 participants