internal: Update sbt to 1.11.5 and add JDK 24+ options#296
Conversation
Add --sun-misc-unsafe-memory-access=allow and --enable-native-access flags for JDK 24+ to suppress warnings about sun.misc.Unsafe usage. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Summary of ChangesHello @xerial, 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 build infrastructure by updating the sbt version and enhancing compatibility with the latest Java Development Kit releases. The changes are designed to provide a more stable and warning-free development experience, particularly for users operating on JDK 24 and beyond, by addressing specific JVM-related warnings. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. 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 updates the default sbt version to 1.11.5 and adds specific JVM options for JDK 24+ to handle warnings related to sun.misc.Unsafe. The changes are logical and address the stated goals. I've found one minor issue regarding an extra space in the new JVM options string which could lead to an empty argument being passed to the JVM. I've provided a suggestion to fix this for better code robustness.
| local -r v="$(java_version)" | ||
| if [[ $v -ge 17 ]]; then | ||
| if [[ $v -ge 24 ]]; then | ||
| echo "$default_jvm_opts_common --sun-misc-unsafe-memory-access=allow --enable-native-access=ALL-UNNAMED" |
There was a problem hiding this comment.
There's an extra space between the common options and the new JDK 24+ options. When the output of this function is processed by read -r -a on line 655, this double space will result in an empty string element in the extra_jvm_opts array. While many JVMs might ignore an empty argument, it's cleaner and more robust to avoid it. Please remove the extra space.
echo "$default_jvm_opts_common --sun-misc-unsafe-memory-access=allow --enable-native-access=ALL-UNNAMED"
Summary
Test plan
🤖 Generated with Claude Code