Open simschla opened 1 month ago
IIUC, the way Gradle will snapshot that is dependent on the classloaders. Could there be a difference between the machines that could influence that?
Anyway, I'm not sure there's something I can do …until someone (from Gradle ideally) tells me what to do :man_shrugging:
I'd suggest debugging the Gradle daemon process if you can to better understand how the cache key is computed (I'd look at DefaultValueSnapshotter
, IIUC it should use ImplementationSnapshot
) and/or reporting that to Gradle so they can investigate. They're using this plugin as part of smoke tests so might want to see whether this is a bug in Gradle or not; but first make sure environments are equivalent/comparable.
Using the latest 4.0.1 version, we see the following issue regarding our build: On compileJava tasks where errorProne plugin is applied, the calculated cache key for this input differs between developer machines and the CI, leading to cache misses and therefore (unnecessary) task execution.
While investigating these cache misses, the discovered issue seems to be
options.compilerArgumentProviders.errorprone$0.errorproneOptions
.Running the gradle command with
-Dorg.gradle.caching.debug=true
we see the following output (on the exact same code version):CI
Local developer machine:
The difference being in these lines:
This must be a regression introduced in 4.0 or 4.0.1 since the issue was not there with 3.1.0Sorry, no regression, is already present in 2.0.2Is there an easy way this can be fixed?