palantir-java-format
palantir-java-format copied to clipboard
Intellij uses the native image from `.gradle/palantir-java-formatter-caches`
Before this PR
Unused artifact transforms are cleaned up by Gradle every 7 days. This could lead to situation - if people do not refresh the Gradle project in Intellij - where the formatter would fail to run because:
Caused by: java.io.IOException: Cannot run program "~/.gradle/caches/8.12.1/transforms/8b5bfec0f342b9bc0fee275f271594d7/transformed/palantir-java-format-native-2.63.0-nativeImage-macos_aarch64.bin.executable" (in directory "/~/.gradle/caches/8.12.1/transforms/8b5bfec0f342b9bc0fee275f271594d7/transformed"): error=2, No such file or directory
internal slack thread here
After this PR
- When we are writing the Intellij configuration files, we would firstly copy + move the nativeImage to our own cache (in
~/.gradle/palantir-java-formatter-caches). - the Intellij configuration files are updated using Gradle tasks that also get added as startParameters (similar logic to https://github.com/palantir/gradle-idea-configuration/blob/develop/gradle-idea-configuration/src/main/groovy/com/palantir/gradle/ideaconfiguration/IdeaConfigurationPlugin.java#L48)
==COMMIT_MSG==
Intellij uses the native image from .gradle/palantir-java-formatter-caches
==COMMIT_MSG==
Possible downsides?
Generate changelog in changelog/@unreleased
changelog/@unreleasedWhat do the change types mean?
-
feature: A new feature of the service. -
improvement: An incremental improvement in the functionality or operation of the service. -
fix: Remedies the incorrect behaviour of a component of the service in a backwards-compatible way. -
break: Has the potential to break consumers of this service's API, inclusive of both Palantir services and external consumers of the service's API (e.g. customer-written software or integrations). -
deprecation: Advertises the intention to remove service functionality without any change to the operation of the service itself. -
manualTask: Requires the possibility of manual intervention (running a script, eyeballing configuration, performing database surgery, ...) at the time of upgrade for it to succeed. -
migration: A fully automatic upgrade migration task with no engineer input required.
Note: only one type should be chosen.
How are new versions calculated?
- ❗The
breakandmanual taskchangelog types will result in a major release! - 🐛 The
fixchangelog type will result in a minor release in most cases, and a patch release version for patch branches. This behaviour is configurable in autorelease. - ✨ All others will result in a minor version release.
Type
- [ ] Feature
- [ ] Improvement
- [x] Fix
- [ ] Break
- [ ] Deprecation
- [ ] Manual task
- [ ] Migration
Description
.gradle/palantir-java-formatter-caches
Check the box to generate changelog(s)
- [x] Generate changelog entry
adding do not merge until I finish testing the last commit
Released 2.72.0