+
Skip to content

Tags: wvlet/wvlet

Tags

v2025.1.21

Toggle v2025.1.21's commit message
wvlet 2025.1.21

v2025.1.20

Toggle v2025.1.20's commit message
wvlet 2025.1.20

v2025.1.19

Toggle v2025.1.19's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Upgrade sbt-pack to 0.22 with Java 24 JVM options (#1179)

## Summary
- Upgraded sbt-pack plugin from 0.21 to 0.22
- Added Java 24 specific JVM options to prevent warnings and ensure
compatibility

Before this PR:
```
$ wv
WARNING: A terminally deprecated method in sun.misc.Unsafe has been called
WARNING: sun.misc.Unsafe::objectFieldOffset has been called by scala.runtime.LazyVals$ (file:/Users/leo/local/wvlet-cli/wvlet-cli-2025.1.18+18-3d373d14/lib/scala3-library_3-3.7.2.jar)
WARNING: Please consider reporting this to the maintainers of class scala.runtime.LazyVals$
WARNING: sun.misc.Unsafe::objectFieldOffset will be removed in a future release
WARNING: A restricted method in java.lang.System has been called
WARNING: java.lang.System::load has been called by org.jline.nativ.JLineNativeLoader in an unnamed module (file:/Users/leo/local/wvlet-cli/wvlet-cli-2025.1.18+18-3d373d14/lib/jline-3.30.5.jar)
WARNING: Use --enable-native-access=ALL-UNNAMED to avoid a warning for callers in this module
WARNING: Restricted methods will be blocked in a future release unless native access is enabled
```

After this PR:
```
$ wv
> wv
```

## Changes
- **sbt-pack upgrade**: Version 0.21 → 0.22
- Enables new `packJvmVersionSpecificOpts` feature for Java
version-specific JVM options
- **Java 24 JVM options**: Added for both `wv` and `wvlet` commands
- `--sun-misc-unsafe-memory-access=allow`: Allows unsafe memory access
(terminally deprecated in Java 24)
- `--enable-native-access=ALL-UNNAMED`: Enables native access for all
unnamed modules

## Test plan
- [x] Verified project compiles successfully with sbt-pack 0.22
- [x] CLI compilation test passed: `./sbt "cli/compile"`
- [ ] Test launch scripts with Java 24 detect and apply the correct JVM
options

## Notes
These JVM options address the warnings seen when running with Java 24,
particularly:
- `WARNING: sun.misc.Unsafe::objectFieldOffset has been called`
- Native access warnings for unnamed modules

The launch scripts generated by sbt-pack 0.22 will automatically detect
the Java version and apply these options only when running with Java 24
or later.

🤖 Generated with [Claude Code](https://claude.ai/code)

---------

Co-authored-by: Claude <noreply@anthropic.com>

v2025.1.18

Toggle v2025.1.18's commit message
wvlet 2025.1.18

v2025.1.17

Toggle v2025.1.17's commit message
wvlet 2025.1.17

v2025.1.16

Toggle v2025.1.16's commit message
wvlet 2025.1.16

v2025.1.15

Toggle v2025.1.15's commit message
wvlet 2025.1.15

v2025.1.14

Toggle v2025.1.14's commit message
wvlet 2025.1.14

v2025.1.13

Toggle v2025.1.13's commit message
wvlet 2025.1.13

v2025.1.12

Toggle v2025.1.12's commit message
wvlet 2025.1.12

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载