8000
JVM tool for the Java loadout (#899): upstream release artifact run on our jdk through a /usr/bin wrapper, with Standalone tests that run the tool on a small real input. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Clean. The sha256 matches, the manifest carries the Add-Exports entries so plain java -jar works, and the tests check exact formatted output and --set-exit-if-changed.
build.sh:8: cp leaves the jar's mode to however it was fetched. install -m 0644, as in #922 and #923, makes it deterministic and consistent.Holding approval only on the shared policy question: whether JVM tools may ship the upstream jar (with binary_from) instead of building from source, as AGENTS.md otherwise requires. This is being decided once for the whole batch.
Generated by Claude Code
|
Thanks @norrietaylor.
🤖 Generated with Claude Code |
There was a problem hiding this comment.
Approving under #970. The install -m 0644 nit is fixed and the branch is past #897. Please merge after #970.
Generated by Claude Code
What
Adds
google-java-format1.37.0, the de-facto Java formatter. This is the first Tier 1 item in the #899 Java loadout checklist.google-java-format-1.37.0-all-deps.jarfrom GitHub releases. It is installed atusr/share/google-java-format/google-java-format.jarand run on ourjdkthrough a/usr/bin/google-java-formatwrapper (exec java -jar …).linux-x86-64andlinux-arm64. The jar is one architecture-independent artifact, so there is one sha256 and nomatch targetdispatch, and it runs on the same JDK as the rest of the Java tooling. The jar's manifest already carries theAdd-Exports: jdk.compiler/com.sun.tools.javac.*entries, so plainjava -jarworks without the--add-exportsflags the README lists for other launch modes. It needs a full JDK (thejdk.compilermodule) at version 21 or later (class file version 65); ourjdkis 25 (Temurin, since jdk: current LTS (meta over jdk-25); add jdk-25 (Temurin 25) and jdk-21 (Temurin 21) #897), which satisfies it.maven,gradleandjdtlsmake. Recorded asbinary_from.Apache-2.0.source_provenance = GithubRepo google/google-java-format. Tags arev<version>.834b2a0c…62f7a, computed locally and matching the GitHub release asset digest.Tests (Standalone)
formatformatsclass Hello{void f(){int x=1;if(x>0){x++;}}}and runsdiff -uagainst the exact Google-style output.check_moderuns--dry-run --set-exit-if-changed. It must exit non-zero on an unformatted file and zero on a formatted one.Verified
Built in a
pkgbuildsession (arm64) withmin package build --rebuild.min check --packages google-java-formatpassed every checker, includingstandalone tests,output types validandmissing runtime_deps. Negative control: changing the expected output tox--failedformatwith the real diff (-x--/+x++).amd64 is not separately run locally; it is left to CI.
Refs #899
🤖 Generated with Claude Code
Summary by CodeRabbit