Skip to content

Gradle plugin 8.3.0 incompatible with configuration cache #2878

@prdoyle

Description

@prdoyle

Versions

  • Gradle spotless plugin: 8.3.0
  • Gradle: 9.4.0
  • Gradle launcher JVM: Temurin 21.0.3

Symptom

$ ./gradlew spotlessApply
Starting a Gradle Daemon, 1 incompatible and 2 stopped Daemons could not be reused, use --status for details
Calculating task graph as no cached configuration is available for tasks: spotlessApply

FAILURE: Build failed with an exception.

* What went wrong:
Error while reading task graph
> Exception while loading configuration for :bosk-junit: Could not load the value of field `equalityStateInternal` of `com.diffplug.spotless.FormatterStepSerializationRoundtrip` bean found in field `cleaned` of `com.diffplug.spotless.FormatterStepSerializationRoundtrip$HackClone` bean found in `com.diffplug.spotless.ConfigurationCacheHackList` bean found in field `stepsInternalEquality` of task `:bosk-junit:spotlessJava` of type `com.diffplug.gradle.spotless.SpotlessTaskImpl`.
> Exception while loading configuration for :bosk-opentelemetry: Could not load the value of field `equalityStateInternal` of `com.diffplug.spotless.FormatterStepSerializationRoundtrip` bean found in field `cleaned` of `com.diffplug.spotless.FormatterStepSerializationRoundtrip$HackClone` bean found in `com.diffplug.spotless.ConfigurationCacheHackList` bean found in field `stepsInternalEquality` of task `:bosk-opentelemetry:spotlessJava` of type `com.diffplug.gradle.spotless.SpotlessTaskImpl`.
...

Observations

  • Works with spotless plugin 8.2.1
  • Works if I add this to my build.gradle: tasks.withType(SpotlessTask).configureEach { notCompatibleWithConfigurationCache("...") }
  • Works if I add --no-configuration-cache to the Gradle command line

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions