Title: Remove the native Spotless step: it only runs on a JVM the plugin cannot load on · Issue #194 · openjavaformat/open-java-format · GitHub
Open Graph Title: Remove the native Spotless step: it only runs on a JVM the plugin cannot load on · Issue #194 · openjavaformat/open-java-format
X Title: Remove the native Spotless step: it only runs on a JVM the plugin cannot load on · Issue #194 · openjavaformat/open-java-format
Description: What happens SpotlessInterop picks NativePalantirJavaFormatStep when openjavaformat.native.formatter=true and the Gradle JVM is older than 21: if (getNativeImageSupport().isNativeImageConfigured() && JavaVersion.current().compareTo(JavaV...
Open Graph Description: What happens SpotlessInterop picks NativePalantirJavaFormatStep when openjavaformat.native.formatter=true and the Gradle JVM is older than 21: if (getNativeImageSupport().isNativeImageConfigured() ...
X Description: What happens SpotlessInterop picks NativePalantirJavaFormatStep when openjavaformat.native.formatter=true and the Gradle JVM is older than 21: if (getNativeImageSupport().isNativeImageConfigured() ...
Opengraph URL: https://github.com/openjavaformat/open-java-format/issues/194
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Remove the native Spotless step: it only runs on a JVM the plugin cannot load on","articleBody":"### What happens\n\n`SpotlessInterop` picks `NativePalantirJavaFormatStep` when `openjavaformat.native.formatter=true` and the Gradle JVM is older than 21:\n\n```java\nif (getNativeImageSupport().isNativeImageConfigured()\n && JavaVersion.current().compareTo(JavaVersion.VERSION_21) \u003c 0) {\n```\n\nThe plugin's classes are compiled for Java 21, so on an older Gradle JVM the plugin does not load at all. With Gradle 9.3.1 on Temurin 17:\n\n```\njava.lang.UnsupportedClassVersionError: com/palantir/javaformat/gradle/PalantirJavaFormatPlugin has been compiled by a more recent version of the Java Runtime (class file version 65.0), this version of the Java Runtime only recognizes class file versions up to 61.0\n```\n\nThe native branch therefore never runs, and the Spotless step always formats on the Gradle JVM. The docs already say so: \"the Spotless step runs on the Gradle JVM even when the native binary is switched on\".\n\nThe step also keeps the binary in a `transient` field, the problem #193 fixes in the Java step, so it would fail with the configuration cache if it ever ran.\n\n### Proposal\n\nRemove `NativePalantirJavaFormatStep` and its branch in `SpotlessInterop`. If the native binary should format for Spotless after all, the condition must not depend on the JVM version, and the step has to survive the configuration cache.\n","author":{"url":"https://github.com/abashev","@type":"Person","name":"abashev"},"datePublished":"2026-11-06T20:03:08Z","url":"https://github.com/openjavaformat/open-java-format/issues/194"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:6970396a-d0fb-d39b-8ad3-915034160fa2 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9FCA:14CDE1:3510FF:46CED6:6AFBBB5C |
| html-safe-nonce | 682a517e0353472bda19b9484826681e61ee1fccefbdae92b814140a1e27dd82 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RkNBOjE0Q0RFMTozNTEwRkY6NDZDRUQ2OjZBRkJCQjVDIiwidmlzaXRvcl9pZCI6IjUxMDQ4ODEzNjY4Mzk1NzMzNDAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 144d1b706c0c7576686db46dc7aa0f8f998c497fbf25841589f7e2683baa3b8c |
| hovercard-subject-tag | issue:6249739635 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/openjavaformat/open-java-format/194/issue_layout |
| twitter:image | https://opengraph.githubassets.com/b9b248e6626220acdab147a17cc53781e4a5de41c86d4d7a25979fe569bbd4f4/openjavaformat/open-java-format/issues/194 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/b9b248e6626220acdab147a17cc53781e4a5de41c86d4d7a25979fe569bbd4f4/openjavaformat/open-java-format/issues/194 |
| og:image:alt | What happens SpotlessInterop picks NativePalantirJavaFormatStep when openjavaformat.native.formatter=true and the Gradle JVM is older than 21: if (getNativeImageSupport().isNativeImageConfigured() ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | abashev |
| hostname | github.com |
| expected-hostname | github.com |
| None | 2b2ef9c1578c18d8ed27027940544c958743213cf4461659f14d3ccdf51e162c |
| turbo-cache-control | no-preview |
| go-import | github.com/openjavaformat/open-java-format git https://github.com/openjavaformat/open-java-format.git |
| octolytics-dimension-user_id | 325177626 |
| octolytics-dimension-user_login | openjavaformat |
| octolytics-dimension-repository_id | 1288055459 |
| octolytics-dimension-repository_nwo | openjavaformat/open-java-format |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | true |
| octolytics-dimension-repository_parent_id | 214273098 |
| octolytics-dimension-repository_parent_nwo | palantir/palantir-java-format |
| octolytics-dimension-repository_network_root_id | 214273098 |
| octolytics-dimension-repository_network_root_nwo | palantir/palantir-java-format |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | e4cce0e99cf61481a318ff12c2e8580153a6c7c6 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width