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

Support gradle's configuration cache #83

Open
tnielens opened this issue Jul 1, 2024 · 2 comments
Open

Support gradle's configuration cache #83

tnielens opened this issue Jul 1, 2024 · 2 comments

Comments

@tnielens
Copy link

tnielens commented Jul 1, 2024

When I try to enable the configuration cache, gradle fails on scalafix tasks. I've got several occurrences of these errors:

- Task `:apps:configSemanticDBMain` of type `io.github.cosmicsilence.scalafix.ConfigSemanticDbTask`: cannot deserialize object of type 'org.gradle.api.Project' as these are not supported with the configuration cache.
  See https://docs.gradle.org/8.7/userguide/configuration_cache.html#config_cache:requirements:disallowed_types
- Task `:apps:configSemanticDBMain` of type `io.github.cosmicsilence.scalafix.ConfigSemanticDbTask`: cannot deserialize object of type 'org.gradle.api.Task' as these are not supported with the configuration cache.
  See https://docs.gradle.org/8.7/userguide/configuration_cache.html#config_cache:requirements:task_access
- Task `:apps:configSemanticDBMain` of type `io.github.cosmicsilence.scalafix.ConfigSemanticDbTask`: cannot deserialize object of type 'org.gradle.api.tasks.SourceSet' as these are not supported with the configuration cache.
@marcelocenerine
Copy link
Member

Thanks for reporting this. The issue seems to be caused by the fact that ScalaSourceSet is being passed as input to ConfigSemanticDbTask. I believe that could be avoided if the code is restructured a bit.

@fsanjuan is this something you would be interested in looking into?

@marcelocenerine
Copy link
Member

Well, there's more to that than the serialization issues:

Configuration cache problems found in this build.

13 problems were found storing the configuration cache, 5 of which seem unique.
- Task `:scala-module:configSemanticDBCustomScalafixRule` of type `io.github.cosmicsilence.scalafix.ConfigSemanticDbTask`: invocation of 'Task.project' at execution time is unsupported.
  See https://docs.gradle.org/7.2/userguide/configuration_cache.html#config_cache:requirements:use_project_during_execution
- Task `:scala-module:configSemanticDBMain` of type `io.github.cosmicsilence.scalafix.ConfigSemanticDbTask`: invocation of 'Task.project' at execution time is unsupported.
  See https://docs.gradle.org/7.2/userguide/configuration_cache.html#config_cache:requirements:use_project_during_execution
- Task `:scala-module:configSemanticDBTest` of type `io.github.cosmicsilence.scalafix.ConfigSemanticDbTask`: invocation of 'Task.project' at execution time is unsupported.
  See https://docs.gradle.org/7.2/userguide/configuration_cache.html#config_cache:requirements:use_project_during_execution
- Task `:scala-module:scalafixCustomScalafixRule` of type `io.github.cosmicsilence.scalafix.ScalafixTask`: invocation of 'Task.project' at execution time is unsupported.
  See https://docs.gradle.org/7.2/userguide/configuration_cache.html#config_cache:requirements:use_project_during_execution
- Task `:scala-module:scalafixMain` of type `io.github.cosmicsilence.scalafix.ScalafixTask`: invocation of 'Task.project' at execution time is unsupported.
  See https://docs.gradle.org/7.2/userguide/configuration_cache.html#config_cache:requirements:use_project_during_execution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants