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

[gradle-plugin] Support for configuration cache #2811

Closed
ouchadam opened this issue Jun 18, 2020 · 1 comment
Closed

[gradle-plugin] Support for configuration cache #2811

ouchadam opened this issue Jun 18, 2020 · 1 comment

Comments

@ouchadam
Copy link

Expected Behavior

When enabling the gradle configuration cache then detekt works

org.gradle.unsafe.configuration-cache=ON
org.gradle.unsafe.configuration-cache-problems=warn

Current Behavior (using 1.10.0-RC1)

gradle fails to configure project

field 'project' from type 'io.gitlab.arturbosch.detekt.extensions.DetektReport': cannot deserialize object of type 'org.gradle.api.Project' as these are not supported with the configuration cache.
  See https://docs.gradle.org/6.5/userguide/configuration_cache.html#disallowed_types

field 'project' from type 'io.gitlab.arturbosch.detekt.extensions.DetektReports': cannot deserialize object of type 'org.gradle.api.Project' as these are not supported with the configuration cache.
  See https://docs.gradle.org/6.5/userguide/configuration_cache.html#disallowed_types

Context

Trying out the experimental configuration caching and seeing what breaks!

@CristianGM
Copy link

That's still not working properly, we have some tests on our projects for configuration-cache compatibility and I see:
task :detekt of type io.gitlab.arturbosch.detekt.Detekt: invocation of 'Task.project' at execution time is unsupported.

I'm using 1.10.0 but I see in master branch the code is still the same.

The culprit: https://github.com/detekt/detekt/blob/master/detekt-gradle-plugin/src/main/kotlin/io/gitlab/arturbosch/detekt/Detekt.kt#L192
It get's called in line 220 which is execution time.

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

No branches or pull requests

4 participants