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

ExperimentalUnpackSkikoWasmRuntimeTask Gradle Configuration cache compatibility #2587

Closed
aSemy opened this issue Jan 1, 2023 · 0 comments
Closed
Assignees
Labels
enhancement New feature or request gradle Gradle plugin problems web

Comments

@aSemy
Copy link
Contributor

aSemy commented Jan 1, 2023

When I run ./gradlew jsBrowserDevelopmentWebpack I get errors relating to Gradle Configuration cache in my console output

7 problems were found storing the configuration cache, 2 of which seem unique.
- Task `:site2:unpackSkikoWasmRuntimeJs` of type `org.jetbrains.compose.experimental.web.tasks.ExperimentalUnpackSkikoWasmRuntimeTask`: invocation of 'Task.project' at execution time is unsupported.
  See https://docs.gradle.org/7.6/userguide/configuration_cache.html#config_cache:requirements:use_project_during_execution
- Task `:unpackSkikoWasmRuntimeJs` of type `org.jetbrains.compose.experimental.web.tasks.ExperimentalUnpackSkikoWasmRuntimeTask`: cannot serialize object of type 'org.gradle.api.internal.artifacts.configurations.DefaultConfiguration', a subtype of 'org.gradle.api.artifacts.Configuration', as these are not supported with the configuration cache.
  See https://docs.gradle.org/7.6/userguide/configuration_cache.html#config_cache:requirements:disallowed_types

https://docs.gradle.org/current/userguide/configuration_cache.html#config_cache:requirements:use_project_during_execution

A task must not use any Project objects at execution time. This includes calling Task.getProject() while the task is running.

However, ExperimentalUnpackSkikoWasmRuntimeTask does use Task.getProject() during the execution phase:

https://github.com/JetBrains/compose-jb/blob/d6ff80c062e43395923d6da8c59b395c17c8478b/gradle-plugins/compose/src/main/kotlin/org/jetbrains/compose/experimental/web/tasks/ExperimentalUnpackSkikoWasmRuntimeTask.kt#L26-L27

https://github.com/JetBrains/compose-jb/blob/d6ff80c062e43395923d6da8c59b395c17c8478b/gradle-plugins/compose/src/main/kotlin/org/jetbrains/compose/experimental/web/tasks/ExperimentalUnpackSkikoWasmRuntimeTask.kt#L40-L41

https://github.com/JetBrains/compose-jb/blob/d6ff80c062e43395923d6da8c59b395c17c8478b/gradle-plugins/compose/src/main/kotlin/org/jetbrains/compose/experimental/web/tasks/ExperimentalUnpackSkikoWasmRuntimeTask.kt#L46

https://github.com/JetBrains/compose-jb/blob/d6ff80c062e43395923d6da8c59b395c17c8478b/gradle-plugins/compose/src/main/kotlin/org/jetbrains/compose/experimental/web/tasks/ExperimentalUnpackSkikoWasmRuntimeTask.kt#L47

Some of these usages have drop-in replacements

image

Fixing the use of project.configurations is slightly more tricky. The Gradle docs give examples:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request gradle Gradle plugin problems web
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants