-
Notifications
You must be signed in to change notification settings - Fork 466
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Support Parallel Gradle Configuration Cache #2391
Comments
Happy to take PRs to improve this. I do not think configuration cache is a good design, and parallel configuration cache is especially bad. The most valuable PR would be a test that reliably reproduces one of these bugs, which I expect to be nearly impossible, but I hope to be wrong! I wish Gradle would look at Redis a little bit - it's a far more performance-sensitive application than Gradle, and Redis won its space by going in the opposite direction that Gradle is currently pointing itself. |
Can you elaborate what's wrong with the configuration cache design? Especially with taking this further and allow parallel configuration as well as isolated project support I have high hopes this will tackle the major bottle of bigger builds which usually is configuration time that does not scale in usual gradle projects. |
This ship has sailed, but I think it should store the cache in RAM for reuse within a single JVM, not on disk for reuse across multiple JVMs on a single machine. Relative to serializing on disk, storing in RAM would be faster to execute and faster to configure, and it reduces the implementation constraints on plugin authors. I went into more detail here: #644 (comment) Last time I checked, The long tail of subtle bugs in Java serialization and Gradle's idiosyncratic implementation of it make me fear that the Gradle ecosystem will continue to feel half broken forever.
I hope it works, and I'm happy to merge any PRs that improve Spotless' compliance with Gradle's new features! But realistically, I believe that Gradle is papercutting its ecosystem to death for relatively little benefit. |
The Gradle plugin currently doesn’t support Parallel Configuration Caching, but it would be useful it it did.
When enabling
org.gradle.configuration-cache.parallel
, spotless tasks randomly fail with exceptions like this one:Stack Trace
The error shows that the
spotlessJava
task tries to load the files ofspotlessKotlinGradle
. So, it looks like some state is shared across different tasks and that that state is not protected against parallel writes from the configuration cache.Gradle version: 8.12
Spotless version: 7.0.1
The text was updated successfully, but these errors were encountered: