René's URL Explorer Experiment


Title: Run the Gradle plugin's tasks with the configuration cache by abashev · Pull Request #195 · openjavaformat/open-java-format · GitHub

Open Graph Title: Run the Gradle plugin's tasks with the configuration cache by abashev · Pull Request #195 · openjavaformat/open-java-format

X Title: Run the Gradle plugin's tasks with the configuration cache by abashev · Pull Request #195 · openjavaformat/open-java-format

Description: Closes #193. With the configuration cache on, formatDiff failed on Task.project, and the Spotless step failed on every file with a NullPointerException (this.jarsSupplier is null). Both now run from a stored entry, and the next build reuses it. formatDiff gets the project directory and the formatter classpath as task properties when it is configured, and no longer calls getProject() when it runs. Loading the formatter moves from JavaFormatExtension to FormatterServiceLoader, which keeps one formatter loaded per set of jars; a build that reuses its entry has no extension to keep it in. serviceLoad() is unchanged for callers. The Spotless step uses Spotless' round-trip API, as Spotless' own steps do: the cache keeps the jar files, the up-to-date check compares their signature (name, size and content), and the formatter is loaded from the jars on first use. PalantirJavaFormatStep.create(Configuration, Supplier) stays, deprecated. Generated sources. targetExclude("**/build/generated*/**", ...) makes Spotless match the patterns against a file tree of the whole project directory, which every build changes, so the entry was never reused ("an input to unknown location has changed"). Plain Spotless with the same patterns behaves the same way. The excludes are now the source sets' Java files in a generated directory, by the same patterns. One difference: a Spotless target set by hand to files outside the source sets no longer has those directories left out. Tests ConfigurationCacheTest runs formatDiff, spotlessApply, spotlessCheck and the IntelliJ tasks twice with the cache on, and checks that the first build stores the entry, the second reuses it, and both do the work. GradleTestProject turns the cache on by default, and the TestKit classes run in both modes through @ParameterizedClass, in the same test task, so CI is unchanged. TestKit builds run with --no-watch-fs: a test changes a file faster than file system watching reports it. On JDK 21: 68 tests in :gradle-open-java-format on Gradle 9.3.1 and on 9.8.0, and 83 with -PnativeImage=true (macOS aarch64, GraalVM 21). ./gradlew test passes. Not here The native Spotless step can never run (#194) and is left as it is. Docs: openjavaformat/docs#9, to merge with the release that has this fix.

Open Graph Description: Closes #193. With the configuration cache on, formatDiff failed on Task.project, and the Spotless step failed on every file with a NullPointerException (this.jarsSupplier is null). Both now run fro...

X Description: Closes #193. With the configuration cache on, formatDiff failed on Task.project, and the Spotless step failed on every file with a NullPointerException (this.jarsSupplier is null). Both now run fro...

Opengraph URL: https://github.com/openjavaformat/open-java-format/pull/195

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:ea191456-1e9e-062f-d9fa-d2548f62c589
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idAF70:2A1648:5C9150:7A9DDA:6AFBC6F2
html-safe-nonce231d94b00b4aab1a88120e857fda233eb7dc4258d20c671f7eb3a9c9cc1dc8e5
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBRjcwOjJBMTY0ODo1QzkxNTA6N0E5RERBOjZBRkJDNkYyIiwidmlzaXRvcl9pZCI6IjMxNjY3MDUwOTQ1MTQ5NTE5MjIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacccce45dc0f026eeeb47279b479e99b391194e5426462103def9dbcb35349efd8
hovercard-subject-tagpull_request:5199821902
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/openjavaformat/open-java-format/pull/195/files
twitter:imagehttps://avatars.githubusercontent.com/u/214171?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/214171?s=400&v=4
og:image:altCloses #193. With the configuration cache on, formatDiff failed on Task.project, and the Spotless step failed on every file with a NullPointerException (this.jarsSupplier is null). Both now run fro...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Noned440bda0d812801778b27bfe9f7c1ce9ff22420c73f6f95150c4fcbca311c50b
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/openjavaformat/open-java-format git https://github.com/openjavaformat/open-java-format.git
octolytics-dimension-user_id325177626
octolytics-dimension-user_loginopenjavaformat
octolytics-dimension-repository_id1288055459
octolytics-dimension-repository_nwoopenjavaformat/open-java-format
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forktrue
octolytics-dimension-repository_parent_id214273098
octolytics-dimension-repository_parent_nwopalantir/palantir-java-format
octolytics-dimension-repository_network_root_id214273098
octolytics-dimension-repository_network_root_nwopalantir/palantir-java-format
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release2c43021aed8695990c86c0eaaedc600bfeffec36
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/openjavaformat/open-java-format/pull/195/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fopenjavaformat%2Fopen-java-format%2Fpull%2F195%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fopenjavaformat%2Fopen-java-format%2Fpull%2F195%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=openjavaformat%2Fopen-java-format
Reloadhttps://github.com/openjavaformat/open-java-format/pull/195/files
Reloadhttps://github.com/openjavaformat/open-java-format/pull/195/files
Reloadhttps://github.com/openjavaformat/open-java-format/pull/195/files
openjavaformathttps://github.com/openjavaformat
open-java-formathttps://github.com/openjavaformat/open-java-format
Codehttps://github.com/openjavaformat/open-java-format
Issues30 (30)https://github.com/openjavaformat/open-java-format/issues
Pull requests5 (5)https://github.com/openjavaformat/open-java-format/pulls
Discussionshttps://github.com/openjavaformat/open-java-format/discussions
Actionshttps://github.com/openjavaformat/open-java-format/actions
Security and qualityhttps://github.com/openjavaformat/open-java-format/security
Insightshttps://github.com/openjavaformat/open-java-format/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fopenjavaformat%2Fopen-java-format%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fopenjavaformat%2Fopen-java-format%2Fissues%2Fnew%2Fchoose
abashevhttps://github.com/abashev
21.X.Xhttps://github.com/openjavaformat/open-java-format/tree/21.X.X
abashev/Add-support-for-configuration-cache-to-gradle-pluginhttps://github.com/openjavaformat/open-java-format/tree/abashev/Add-support-for-configuration-cache-to-gradle-plugin
Conversation 0 https://github.com/openjavaformat/open-java-format/pull/195
Commits 6 https://github.com/openjavaformat/open-java-format/pull/195/commits
Checks 17 https://github.com/openjavaformat/open-java-format/pull/195/checks
Files changed https://github.com/openjavaformat/open-java-format/pull/195/files
Please reload this pagehttps://github.com/openjavaformat/open-java-format/pull/195/files
Run the Gradle plugin's tasks with the configuration cache https://github.com/openjavaformat/open-java-format/pull/195/files#top
Show all changes 6 commits https://github.com/openjavaformat/open-java-format/pull/195/files
c73329c Run formatDiff without the project when it executes abashev Nov 7, 2026 https://github.com/openjavaformat/open-java-format/pull/195/commits/c73329c35fffa44bdb4eee771ed9a916eae6cf4d
47da253 Keep the Spotless step's jars through the configuration cache abashev Nov 7, 2026 https://github.com/openjavaformat/open-java-format/pull/195/commits/47da25323eb7e4ce3b263f689c2ec7b07ee1d479
3b720d5 Test the plugin with and without the configuration cache abashev Nov 7, 2026 https://github.com/openjavaformat/open-java-format/pull/195/commits/3b720d5552e45e628abbf1ade9d256731b08250a
d289fcd Keep the file's line endings in the up-to-date Spotless test abashev Nov 7, 2026 https://github.com/openjavaformat/open-java-format/pull/195/commits/d289fcdb990dc54d7f3f6440d341d26cb2ca2027
7f3f970 Change the formatter classpath with a jar outside the test project abashev Nov 7, 2026 https://github.com/openjavaformat/open-java-format/pull/195/commits/7f3f970963868d78dfe69e05e7d6094b196f7e3c
6c78c75 Merge branch '21.X.X' into abashev/Add-support-for-configuration-cach… abashev Nov 7, 2026 https://github.com/openjavaformat/open-java-format/pull/195/commits/6c78c7566a7aa48a8e04e6d620d042d3ba9dc01d
Clear filters https://github.com/openjavaformat/open-java-format/pull/195/files
Please reload this pagehttps://github.com/openjavaformat/open-java-format/pull/195/files
Please reload this pagehttps://github.com/openjavaformat/open-java-format/pull/195/files
PalantirJavaFormatPlugin.java https://github.com/openjavaformat/open-java-format/pull/195/files#diff-5dd4d220320e3aaecb21e1d8cc2c80c3ce008f75b73226d7bd67718bf9b7d8eb
FormatterServiceLoader.java https://github.com/openjavaformat/open-java-format/pull/195/files#diff-6739ea0d3e07d8be50b438f08463be1c7c8e1c6bb90025ae21d6325fb149dabd
JavaFormatExtension.java https://github.com/openjavaformat/open-java-format/pull/195/files#diff-e462d01ff1a9cad24cf0d06770a9a8d424fd8efed798f8548ede82dc659c7412
PalantirJavaFormatSpotlessPlugin.java https://github.com/openjavaformat/open-java-format/pull/195/files#diff-8f4f33649e12a25a98bbbad71ab01b165def4e80e3f25dce309b34d02e428a5c
SpotlessInterop.java https://github.com/openjavaformat/open-java-format/pull/195/files#diff-635c334fa5b63f94fbda0fbfc5b031a4e833663aa6d71d633442346b8b1aa2aa
PalantirJavaFormatStep.java https://github.com/openjavaformat/open-java-format/pull/195/files#diff-4d7a2338f98753815f4662840234cb6c85456fe3440c4aec6b5c9d795d947f74
AppliesWithoutSpotlessTest.java https://github.com/openjavaformat/open-java-format/pull/195/files#diff-42f0ec13d23678b45c12398cc10c92472318f194785bae6df565fb40d3240d35
ConfigurationCacheTest.java https://github.com/openjavaformat/open-java-format/pull/195/files#diff-15f7e5955c17f868167a194885336fd22976b4e8795e17426f1d97a26e232737
FormatDiffWithoutJavacExportsTest.java https://github.com/openjavaformat/open-java-format/pull/195/files#diff-a600277f9e321a7068e4efc6414c1dcad345b49ff9dd04733aa24afdd5d16db9
PalantirJavaFormatIdeaPluginTest.java https://github.com/openjavaformat/open-java-format/pull/195/files#diff-d1596640c5c4e6873fc6c3c22bab1d814fda23638e4aadb3675e1c85334e35a6
PalantirJavaFormatPluginTest.java https://github.com/openjavaformat/open-java-format/pull/195/files#diff-39529334f5e3871fdd995e17b38145ec9f6aa1f918e52440f258e58c14facaff
PalantirJavaFormatSpotlessPluginTest.java https://github.com/openjavaformat/open-java-format/pull/195/files#diff-edbf12a35899f8187c2e94075b3d2d054d84ab88029015266e32af72fc4bc745
RequiredIdeaPluginTest.java https://github.com/openjavaformat/open-java-format/pull/195/files#diff-bf1c2f1ed8c699c717ef538bb23c788fcc9efc87d189b60038027b3817c8bc52
SpotlessExcludesTest.java https://github.com/openjavaformat/open-java-format/pull/195/files#diff-4686e8a5e18288e79e1a46dd3d7abbc15e382e3acaf1a61868700fbcae89f0d7
SupportsCurrentSpotlessTest.java https://github.com/openjavaformat/open-java-format/pull/195/files#diff-bc9380b6a347317d9a4a2ea9d10097fbfa76d7e0ea96ffda1801cfa19c59d533
GradleTestProject.java https://github.com/openjavaformat/open-java-format/pull/195/files#diff-1cd74b2399791f38cbd5fca5e702dc45cf0445d86e21e9e6f1b917f06e0436a3
...-java-format/src/main/groovy/com/palantir/javaformat/gradle/PalantirJavaFormatPlugin.javahttps://github.com/openjavaformat/open-java-format/pull/195/files#diff-5dd4d220320e3aaecb21e1d8cc2c80c3ce008f75b73226d7bd67718bf9b7d8eb
View file https://github.com/openjavaformat/open-java-format/blob/6c78c7566a7aa48a8e04e6d620d042d3ba9dc01d/gradle-open-java-format/src/main/groovy/com/palantir/javaformat/gradle/PalantirJavaFormatPlugin.java
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/openjavaformat/open-java-format/pull/195/{{ revealButtonHref }}
https://github.com/openjavaformat/open-java-format/pull/195/files#diff-5dd4d220320e3aaecb21e1d8cc2c80c3ce008f75b73226d7bd67718bf9b7d8eb
https://github.com/openjavaformat/open-java-format/pull/195/files#diff-5dd4d220320e3aaecb21e1d8cc2c80c3ce008f75b73226d7bd67718bf9b7d8eb
https://github.com/openjavaformat/open-java-format/pull/195/files#diff-5dd4d220320e3aaecb21e1d8cc2c80c3ce008f75b73226d7bd67718bf9b7d8eb
https://github.com/openjavaformat/open-java-format/pull/195/files#diff-5dd4d220320e3aaecb21e1d8cc2c80c3ce008f75b73226d7bd67718bf9b7d8eb
...open-java-format/src/main/java/com/palantir/javaformat/gradle/FormatterServiceLoader.javahttps://github.com/openjavaformat/open-java-format/pull/195/files#diff-6739ea0d3e07d8be50b438f08463be1c7c8e1c6bb90025ae21d6325fb149dabd
View file https://github.com/openjavaformat/open-java-format/blob/6c78c7566a7aa48a8e04e6d620d042d3ba9dc01d/gradle-open-java-format/src/main/java/com/palantir/javaformat/gradle/FormatterServiceLoader.java
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/openjavaformat/open-java-format/pull/195/{{ revealButtonHref }}
...le-open-java-format/src/main/java/com/palantir/javaformat/gradle/JavaFormatExtension.javahttps://github.com/openjavaformat/open-java-format/pull/195/files#diff-e462d01ff1a9cad24cf0d06770a9a8d424fd8efed798f8548ede82dc659c7412
View file https://github.com/openjavaformat/open-java-format/blob/6c78c7566a7aa48a8e04e6d620d042d3ba9dc01d/gradle-open-java-format/src/main/java/com/palantir/javaformat/gradle/JavaFormatExtension.java
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/openjavaformat/open-java-format/pull/195/{{ revealButtonHref }}
https://github.com/openjavaformat/open-java-format/pull/195/files#diff-e462d01ff1a9cad24cf0d06770a9a8d424fd8efed798f8548ede82dc659c7412
...format/src/main/java/com/palantir/javaformat/gradle/PalantirJavaFormatSpotlessPlugin.javahttps://github.com/openjavaformat/open-java-format/pull/195/files#diff-8f4f33649e12a25a98bbbad71ab01b165def4e80e3f25dce309b34d02e428a5c
View file https://github.com/openjavaformat/open-java-format/blob/6c78c7566a7aa48a8e04e6d620d042d3ba9dc01d/gradle-open-java-format/src/main/java/com/palantir/javaformat/gradle/PalantirJavaFormatSpotlessPlugin.java
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/openjavaformat/open-java-format/pull/195/{{ revealButtonHref }}
https://github.com/openjavaformat/open-java-format/pull/195/files#diff-8f4f33649e12a25a98bbbad71ab01b165def4e80e3f25dce309b34d02e428a5c
https://github.com/openjavaformat/open-java-format/pull/195/files#diff-8f4f33649e12a25a98bbbad71ab01b165def4e80e3f25dce309b34d02e428a5c
https://github.com/openjavaformat/open-java-format/pull/195/files#diff-8f4f33649e12a25a98bbbad71ab01b165def4e80e3f25dce309b34d02e428a5c
Please reload this pagehttps://github.com/openjavaformat/open-java-format/pull/195/files
Please reload this pagehttps://github.com/openjavaformat/open-java-format/pull/195/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.