Skip to content

Make palantir-java-format configuration cacheable #1314

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

Closed
wants to merge 29 commits into from
Closed

Conversation

kelvinou01
Copy link
Contributor

@kelvinou01 kelvinou01 commented Jun 5, 2025

Before this PR

Current working state: trying to get every test in pjf to work with --configuration-cache. PalantirJavaFormatPluginTest is failing...

- [error] cannot serialize object of type `org.gradle.api.internal.artifacts.configurations.DefaultLegacyConfiguration`, a subtype of `org.gradle.api.artifacts.Configuration`, as these are not supported with the configuration cache.
    - field `configuration` of `com.palantir.javaformat.gradle.JavaFormatExtension_Decorated`
        - bean of type `com.palantir.javaformat.gradle.JavaFormatExtension_Decorated`
            - field `__extension__` of `com.palantir.javaformat.gradle.FormatterServiceService$Params_Decorated`
                - bean of type `com.palantir.javaformat.gradle.FormatterServiceService$Params_Decorated`
                    - Gradle runtime

...which is weird. Using a build service in a task should be configuration-cache safe.

After this PR

==COMMIT_MSG==
==COMMIT_MSG==

Possible downsides?

@changelog-app
Copy link

changelog-app bot commented Jun 5, 2025

Generate changelog in changelog/@unreleased

Type (Select exactly one)

  • Feature (Adding new functionality)
  • Improvement (Improving existing functionality)
  • Fix (Fixing an issue with existing functionality)
  • Break (Creating a new major version by breaking public APIs)
  • Deprecation (Removing functionality in a non-breaking way)
  • Migration (Automatically moving data/functionality to a new system)

Description

Make palantir-java-format configuration cacheable

Check the box to generate changelog(s)

  • Generate changelog entry

@kelvinou01 kelvinou01 closed this Aug 4, 2025
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