You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Automatically clear gradle configuration cache and retry on stale-cache failure #1209
"To make this workaround obsolete, please upvote https://github.com/diffplug/spotless/issues/987");
}
We could instead just do the rm -rf ourselves and then use project.gradle.startParameter to reconstruct and execute the gradle invocation. (javadoc)
I think the tricky part is that you might have to launch a new JVM so that the .gradle/configuration-cache files aren't locked. It might also be tricky to reconstitute the exact command, but just an approximation with the same task names would be plenty.
This would definitely need to be gated behind something like:
spotless {
autoRetry_issue_987 = true
}
No plan to implement this, but happy to merge a PR for it.
Reacted by Peter Mandeljc and Roman Sosnovshchenko
changed the title [-]Automatically clear gradle cache[/-][+]Automatically clear gradle configuration cache and retry on stale-cache failure[/+]on May 13, 2022
within-jvm configuration cache to allow fastest possible developer feedback loop
within-jvm configuration cache that uses the custom-fancy-serialization as a default way to prove task isolation for parallel execution, and users can workaround this with something like JvmLocalCache
allow tasks that don't support across-jvm serialization to mark themselves, and when those tasks are eligible for execution, then run the configuration phase without troubling users
(last choice) the proposal in this issue, which is really (3) above implemented manually
Activity
[-]Automatically clear gradle cache[/-][+]Automatically clear gradle configuration cache and retry on stale-cache failure[/+]melix commentedon Mar 10, 2023
Deleting the configuration cache looks like a terrible idea to me.
nedtwigg commentedon Mar 10, 2023
Agreed! My ranked preferences:
JvmLocalCachenedtwigg commentedon Jan 6, 2025
No longer necessary in the 7.x series