JetBrains / compose-multiplatform

Compose Multiplatform, a modern UI framework for Kotlin that makes building performant and beautiful user interfaces easy and enjoyable.
https://jetbrains.com/lp/compose-multiplatform
Apache License 2.0
15.02k stars 1.1k forks source link

Encountered error after upgrading from 1.6.10-beta01 to 1.6.10-rc01 #4815

Open Omico opened 2 weeks ago

Omico commented 2 weeks ago
org.gradle.internal.snapshot.impl.IsolationException: Could not isolate value org.jetbrains.compose.internal.service.ConfigurationProblemReporterService$Parameters_Decorated@6e5b35b7 of type ConfigurationProblemReporterService.Parameters
    at org.gradle.internal.snapshot.impl.DefaultIsolatableFactory.isolate(DefaultIsolatableFactory.java:51)
    at org.gradle.api.services.internal.RegisteredBuildServiceProvider.instantiate(RegisteredBuildServiceProvider.java:128)
    at org.gradle.api.services.internal.RegisteredBuildServiceProvider.getInstance(RegisteredBuildServiceProvider.java:119)
    at org.gradle.api.services.internal.RegisteredBuildServiceProvider.calculateOwnValue(RegisteredBuildServiceProvider.java:112)
    at org.gradle.api.internal.provider.AbstractMinimalProvider.calculateOwnPresentValue(AbstractMinimalProvider.java:80)
    at org.gradle.api.internal.provider.AbstractMinimalProvider.get(AbstractMinimalProvider.java:100)
    at org.gradle.internal.build.event.DefaultBuildEventsListenerRegistry$ForwardingBuildEventConsumer.handle(DefaultBuildEventsListenerRegistry.java:261)
    at org.gradle.internal.build.event.DefaultBuildEventsListenerRegistry$ForwardingBuildEventConsumer.handle(DefaultBuildEventsListenerRegistry.java:238)
    at org.gradle.internal.build.event.DefaultBuildEventsListenerRegistry$AbstractListener.run(DefaultBuildEventsListenerRegistry.java:180)
    at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
    at org.gradle.internal.concurrent.AbstractManagedExecutor$1.run(AbstractManagedExecutor.java:47)
Caused by: java.lang.IllegalStateException: BuildScopeServices has been closed.
    at org.gradle.internal.service.DefaultServiceRegistry.serviceRequested(DefaultServiceRegistry.java:291)
    at org.gradle.internal.service.DefaultServiceRegistry.getService(DefaultServiceRegistry.java:331)
    at org.gradle.internal.service.DefaultServiceRegistry.find(DefaultServiceRegistry.java:325)
    at org.gradle.internal.service.DefaultServiceRegistry.get(DefaultServiceRegistry.java:310)
    at org.gradle.internal.instantiation.generator.ManagedObjectFactory.getObjectFactory(ManagedObjectFactory.java:140)
    at org.gradle.internal.instantiation.generator.ManagedObjectFactory.newInstance(ManagedObjectFactory.java:95)
    at org.jetbrains.compose.internal.service.ConfigurationProblemReporterService$Parameters_Decorated.getUnsupportedPluginWarningProviders(Unknown Source)
    at org.jetbrains.compose.internal.service.ConfigurationProblemReporterService$Parameters_Decorated.unpackState(Unknown Source)
    at org.gradle.internal.snapshot.impl.AbstractValueProcessor.processManaged(AbstractValueProcessor.java:127)
    at org.gradle.internal.snapshot.impl.AbstractValueProcessor.processValue(AbstractValueProcessor.java:98)
    at org.gradle.internal.snapshot.impl.DefaultIsolatableFactory.isolate(DefaultIsolatableFactory.java:49)
    ... 10 more
eymar commented 2 weeks ago

Do you have a reproducer for this issue?


There is a template when you create a new issue. Please follow it. Especially the "Steps to reproduce" part

Omico commented 2 weeks ago

@eymar It cannot be reproduced stably, but it will break my CI from time to time after upgrading. https://scans.gradle.com/s/43zyx7dja22yc

igordmn commented 2 weeks ago

Probably it is https://github.com/JetBrains/compose-multiplatform/issues/4773. The solution is in the comments

Omico commented 2 weeks ago

Probably it is #4773. The solution is in the comments

Not sure what's going on. https://scans.gradle.com/s/mmlzuzbvgolgo https://scans.gradle.com/s/gqynlmhckpdbg It took a long time to debug. Something wrong with 1.6.10-beta03. https://github.com/JetBrains/compose-multiplatform/compare/v1.6.10-beta02...v1.6.10-beta03

amir1376 commented 6 days ago

for me it seems when I add compose plugin using buildSrc this problem shows up it's ok with jb-compose 1.6.2 with kotlin 1.9.23 but have error with jb-compose 1.6.10 with kotlin 2.0.0

it breaks CI .. because for the first time this happenes but after that its ok

steps to reproduce ...

cd projectDir
./gradlew clean
rm -rf .gradle
rm -rf buildSrc/.gradle
rm -rf buildSrc/build
./gradlew --stop 
./gradlew 

the problem happens here

svenjacobs commented 2 days ago

I'm having the same problem since updating to Kotlin 2.0.0. I'm also using the Gradle plugins within convention plugins.

Here's a failed build. This workaround didn't work for me.

Also, this always fails on CI but just occasionally on my local machine.

Omico commented 1 day ago

https://scans.gradle.com/s/hkyvpfi4jbpgs Here is a live demo https://github.com/Omico/picsum/tree/cmp