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

Enable stable config cache #1588

Merged
merged 5 commits into from
Feb 27, 2023
Merged

Enable stable config cache #1588

merged 5 commits into from
Feb 27, 2023

Conversation

Goooler
Copy link
Member

@Goooler Goooler commented Feb 26, 2023

@Goooler Goooler force-pushed the config_cache branch 3 times, most recently from 90b9600 to 585a21b Compare February 26, 2023 09:03
@Goooler
Copy link
Member Author

Goooler commented Feb 26, 2023

https://github.com/diffplug/spotless/actions/runs/4274264364/jobs/7440768996

19 problems were found storing the configuration cache.
- Task `:lib-extra:spotbugsMain` of type `com.github.spotbugs.snom.SpotBugsTask`: invocation of 'Task.project' at execution time is unsupported.
  See https://docs.gradle.org/7.6.1/userguide/configuration_cache.html#config_cache:requirements:use_project_during_execution
- Task `:lib:spotbugsCleanthat` of type `com.github.spotbugs.snom.SpotBugsTask`: invocation of 'Task.project' at execution time is unsupported.
  See https://docs.gradle.org/7.6.1/userguide/configuration_cache.html#config_cache:requirements:use_project_during_execution
- Task `:lib:spotbugsCompatKtLint0Dot46Dot0` of type `com.github.spotbugs.snom.SpotBugsTask`: invocation of 'Task.project' at execution time is unsupported.
  See https://docs.gradle.org/7.6.1/userguide/configuration_cache.html#config_cache:requirements:use_project_during_execution
- Task `:lib:spotbugsCompatKtLint0Dot47Dot0` of type `com.github.spotbugs.snom.SpotBugsTask`: invocation of 'Task.project' at execution time is unsupported.
  See https://docs.gradle.org/7.6.1/userguide/configuration_cache.html#config_cache:requirements:use_project_during_execution
- Task `:lib:spotbugsCompatKtLint0Dot48Dot0` of type `com.github.spotbugs.snom.SpotBugsTask`: invocation of 'Task.project' at execution time is unsupported.
  See https://docs.gradle.org/7.6.1/userguide/configuration_cache.html#config_cache:requirements:use_project_during_execution
- Task `:lib:spotbugsDiktat` of type `com.github.spotbugs.snom.SpotBugsTask`: invocation of 'Task.project' at execution time is unsupported.
  See https://docs.gradle.org/7.6.1/userguide/configuration_cache.html#config_cache:requirements:use_project_during_execution
- Task `:lib:spotbugsFlexmark` of type `com.github.spotbugs.snom.SpotBugsTask`: invocation of 'Task.project' at execution time is unsupported.
  See https://docs.gradle.org/7.6.1/userguide/configuration_cache.html#config_cache:requirements:use_project_during_execution
- Task `:lib:spotbugsGson` of type `com.github.spotbugs.snom.SpotBugsTask`: invocation of 'Task.project' at execution time is unsupported.
  See https://docs.gradle.org/7.6.1/userguide/configuration_cache.html#config_cache:requirements:use_project_during_execution
- Task `:lib:spotbugsJackson` of type `com.github.spotbugs.snom.SpotBugsTask`: invocation of 'Task.project' at execution time is unsupported.
  See https://docs.gradle.org/7.6.1/userguide/configuration_cache.html#config_cache:requirements:use_project_during_execution
- Task `:lib:spotbugsKtfmt` of type `com.github.spotbugs.snom.SpotBugsTask`: invocation of 'Task.project' at execution time is unsupported.
  See https://docs.gradle.org/7.6.1/userguide/configuration_cache.html#config_cache:requirements:use_project_during_execution
- Task `:lib:spotbugsKtlint` of type `com.github.spotbugs.snom.SpotBugsTask`: invocation of 'Task.project' at execution time is unsupported.
  See https://docs.gradle.org/7.6.1/userguide/configuration_cache.html#config_cache:requirements:use_project_during_execution
- Task `:lib:spotbugsMain` of type `com.github.spotbugs.snom.SpotBugsTask`: invocation of 'Task.project' at execution time is unsupported.
  See https://docs.gradle.org/7.6.1/userguide/configuration_cache.html#config_cache:requirements:use_project_during_execution
- Task `:lib:spotbugsPalantirJavaFormat` of type `com.github.spotbugs.snom.SpotBugsTask`: invocation of 'Task.project' at execution time is unsupported.
  See https://docs.gradle.org/7.6.1/userguide/configuration_cache.html#config_cache:requirements:use_project_during_execution
- Task `:lib:spotbugsScalafmt` of type `com.github.spotbugs.snom.SpotBugsTask`: invocation of 'Task.project' at execution time is unsupported.
  See https://docs.gradle.org/7.6.1/userguide/configuration_cache.html#config_cache:requirements:use_project_during_execution
- Task `:lib:spotbugsSortPom` of type `com.github.spotbugs.snom.SpotBugsTask`: invocation of 'Task.project' at execution time is unsupported.
  See https://docs.gradle.org/7.6.1/userguide/configuration_cache.html#config_cache:requirements:use_project_during_execution

https://github.com/diffplug/spotless/actions/runs/4274264364/jobs/7440768895

67 problems were found storing the configuration cache, 9 of which seem unique.
- Task `:plugin-maven:generateMavenPluginHelpMojoSources` of type `de.benediktritter.maven.plugin.development.task.GenerateHelpMojoSourcesTask`: cannot serialize object of type 'org.gradle.api.internal.project.DefaultProject', a subtype of 'org.gradle.api.Project', as these are not supported with the configuration cache.
  See https://docs.gradle.org/7.6.1/userguide/configuration_cache.html#config_cache:requirements:disallowed_types
- Task `:plugin-maven:generateMavenPluginHelpMojoSources` of type `de.benediktritter.maven.plugin.development.task.GenerateHelpMojoSourcesTask`: cannot serialize object of type 'org.gradle.api.internal.tasks.DefaultSourceSet', a subtype of 'org.gradle.api.tasks.SourceSet', as these are not supported with the configuration cache.
  See https://docs.gradle.org/7.6.1/userguide/configuration_cache.html#config_cache:requirements:disallowed_types
- Task `:plugin-maven:generateMavenPluginHelpMojoSources` of type `de.benediktritter.maven.plugin.development.task.GenerateHelpMojoSourcesTask`: cannot serialize object of type 'org.gradle.internal.io.LinePerThreadBufferingOutputStream', a subtype of 'java.io.OutputStream', as these are not supported with the configuration cache.
  See https://docs.gradle.org/7.6.1/userguide/configuration_cache.html#config_cache:requirements:disallowed_types
- Task `:plugin-maven:generateMavenPluginHelpMojoSources` of type `de.benediktritter.maven.plugin.development.task.GenerateHelpMojoSourcesTask`: error writing value of type 'java.io.InputStreamReader'
- Task `:plugin-maven:generateMavenPluginHelpMojoSources` of type `de.benediktritter.maven.plugin.development.task.GenerateHelpMojoSourcesTask`: value '[[Ljava.lang.Object;@22f86738, [Ljava.lang.Object;@d29a528, [Ljava.lang.Object;@5556b417, [Ljava.lang.Object;@125cb412, [Ljava.lang.Object;@737cd0c6]' failed Java Object Serialization
  See https://docs.gradle.org/7.6.1/userguide/configuration_cache.html#config_cache:not_yet_implemented:java_serialization
- Task `:plugin-maven:generateMavenPluginHelpMojoSources` of type `de.benediktritter.maven.plugin.development.task.GenerateHelpMojoSourcesTask`: value '[classpath, site]' failed Java Object Serialization
  See https://docs.gradle.org/7.6.1/userguide/configuration_cache.html#config_cache:not_yet_implemented:java_serialization
- Task `:plugin-maven:generateMavenPluginHelpMojoSources` of type `de.benediktritter.maven.plugin.development.task.GenerateHelpMojoSourcesTask`: value '[java.lang.Class, java.lang.ClassLoader, java.lang.Compiler, java.lang.InheritableThreadLocal, java.lang.Package, java.lang.Process, java.lang.Runtime, java.lang.RuntimePermission, java.lang.SecurityManager, java.lang.System, java.lang.Thread, java.lang.ThreadGroup, java.lang.ThreadLocal]' failed Java Object Serialization
  See https://docs.gradle.org/7.6.1/userguide/configuration_cache.html#config_cache:not_yet_implemented:java_serialization
- Task `:plugin-maven:generateMavenPluginHelpMojoSources` of type `de.benediktritter.maven.plugin.development.task.GenerateHelpMojoSourcesTask`: value '[org.apache.velocity.runtime.log.AvalonLogChute, org.apache.velocity.runtime.log.Log4JLogChute, org.apache.velocity.runtime.log.CommonsLogLogChute, org.apache.velocity.runtime.log.ServletLogChute, org.apache.velocity.runtime.log.JdkLogChute]' failed Java Object Serialization
  See https://docs.gradle.org/7.6.1/userguide/configuration_cache.html#config_cache:not_yet_implemented:java_serialization
- Task `:plugin-maven:spotbugsMain` of type `com.github.spotbugs.snom.SpotBugsTask`: invocation of 'Task.project' at execution time is unsupported.
  See https://docs.gradle.org/7.6.1/userguide/configuration_cache.html#config_cache:requirements:use_project_during_execution

@nedtwigg
Copy link
Member

Thanks for the PR, if all these warnings go away we can merge this. But I'm quite disappointed that the config cache has become stable. I think the design is fatally flawed (#987), writing a Gradle plugin has become far more difficult for little benefit. It reminds me quite a bit of the Eclipse ecosystem when Eclipse 4 and "p2" were first proposed. P2 and E4 were ambitious systems that fundamentally could not deliver on what was promised, and the good parts of Eclipse eventually rotted to nothing due to the friction of the unmet and unmeetable promises of its "next-gen" components (e.g. gradle/gradle#13510 is not possible to implement, but plugin authors have to jump through onerous hoops anyway).

Gradle doesn't have an imminent competitor the same way that Eclipse did, but the configuration cache serialization requirement is imo a catastrophe for the ecosystem.

@Goooler
Copy link
Member Author

Goooler commented Feb 26, 2023

Suppressed all errors on CI.

@nedtwigg
Copy link
Member

Thanks for this, linking to all the issues tracking the configuration cache issues was very helpful.

@nedtwigg nedtwigg enabled auto-merge February 27, 2023 23:36
@nedtwigg nedtwigg merged commit dcdcc78 into diffplug:main Feb 27, 2023
@Goooler Goooler deleted the config_cache branch February 28, 2023 01:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants