Skip to content

Fix a couple problems with building under JDK 22:#517

Merged
cpovirk merged 1 commit intomainfrom
twentytwo
Jun 24, 2024
Merged

Fix a couple problems with building under JDK 22:#517
cpovirk merged 1 commit intomainfrom
twentytwo

Conversation

@cpovirk
Copy link
Copy Markdown
Collaborator

@cpovirk cpovirk commented May 24, 2024

Thanks to cushon@ for the pointers.

While there, rename a test that I should have renamed as part of
#270.

And update our CI versions to include JDK 21. (I haven't added JDK 22,
as we've seen some potential signs of remaining flakiness there.)

- Upgrade Spotless to upgrade google-java-format.
- Make nested test classes `static` so that we don't end up with
  [synthetic parameters that upset our JDK-8 integration
  test](https://bugs.openjdk.org/browse/JDK-8058322).
  (https://errorprone.info/bugpattern/ClassCanBeStatic!)

Thanks to cushon@ for the pointers.

While there, rename a test that I should have renamed as part of
#270.

And update our CI versions to include JDK 21. (I haven't added JDK 22,
as we've seen some potential signs of remaining flakiness there.)
@cpovirk
Copy link
Copy Markdown
Collaborator Author

cpovirk commented May 24, 2024

(Context in internal Google bug 342453778.)

@ben-manes
Copy link
Copy Markdown
Contributor

you might want to make the Gradle build run on 21, but compile/test/etc on 8-22. You can do this using a gradle daemon toolchain and a java language toolchain, and an env var in your build matrix. This is what Caffeine does and its much cleaner than relying on the jdk used to start the gradle process.

@cpovirk
Copy link
Copy Markdown
Collaborator Author

cpovirk commented May 24, 2024

Thanks, that seems to be the consensus advice, which someday I will get around to understanding and implementing in our various projects :)

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.

3 participants