Conversation
Summary of ChangesHello @simbo1905, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request focuses on modernizing the project's technology stack by upgrading its core Java version to Java 21 Long-Term Support. This change involves updating key configuration files like Highlights
Ignored Files
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request upgrades the project to Java 21 by updating the Java version in pom.xml and the base images in the Dockerfile. The changes are straightforward and achieve the goal. I've provided a couple of suggestions to improve the configuration. In pom.xml, I recommend using the maven.compiler.release property for a more robust compiler configuration. In the Dockerfile, I suggest using a more specific image tag for the GraalVM image to ensure reproducible builds.
Dockerfile
Outdated
|
|
||
| # Copy the result to graaljs and test node.js+java in the same vm | ||
| FROM ghcr.io/graalvm/nodejs-community:23.0.2-jvm17-ol9-20231024 AS graal | ||
| FROM ghcr.io/graalvm/nodejs-community:21 AS graal |
There was a problem hiding this comment.
Using a floating tag like 21 can lead to non-reproducible builds as it can be updated with breaking changes. It's recommended to pin the image to a more specific, immutable tag. For example, a tag that includes the full version and build date, similar to the previously used tag 23.0.2-jvm17-ol9-20231024. Please check the available tags for ghcr.io/graalvm/nodejs-community and use a more specific one for Java 21 to ensure build stability.
| <maven.compiler.source>21</maven.compiler.source> | ||
| <maven.compiler.target>21</maven.compiler.target> |
There was a problem hiding this comment.
A more modern approach since Java 9 is to use the maven.compiler.release property. It sets both source and target compatibility and also ensures the code doesn't use APIs from a newer JDK. This simplifies the configuration and makes it more robust.
| <maven.compiler.source>21</maven.compiler.source> | |
| <maven.compiler.target>21</maven.compiler.target> | |
| <maven.compiler.release>21</maven.compiler.release> |
Summary
Upgrades the project to Java 21 LTS to align with modern standards.
Changes
pom.xmlto set source and target compatibility to Java 21.Dockerfileto use:maven:3.9-eclipse-temurin-21ghcr.io/graalvm/nodejs-community:21.github/workflows/maven.yml) to:workflow_dispatch.Verification