Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suppress or resolve jdk24 native-access warning #343

Open
ben-manes opened this issue Oct 20, 2024 · 0 comments
Open

Suppress or resolve jdk24 native-access warning #343

ben-manes opened this issue Oct 20, 2024 · 0 comments

Comments

@ben-manes
Copy link

ben-manes commented Oct 20, 2024

In jdk24, the upcoming restrictions for native access produces a warning as the default will change in a later version. Since this is produced by Gradle itself, and for a build without its own native platform dependencies, I think it should be resolved by the Gradle team and not by end users. Here is the build scan for this github action build.

WARNING: A restricted method in java.lang.System has been called

WARNING: java.lang.System::load has been called by net.rubygrapefruit.platform.internal.NativeLibraryLoader in an unnamed module (file:/home/runner/.gradle/wrapper/dists/gradle-8.11-rc-1-bin/3ryjaa5huf6y10uzhnh695xix/gradle-8.11-rc-1/lib/native-platform-0.22-milestone-26.jar)
WARNING: Use --enable-native-access=ALL-UNNAMED to avoid a warning for callers in this module
> Task :jcache:compileJava
WARNING: Restricted methods will be blocked in a future release unless native access is enabled

WARNING: A restricted method in java.lang.System has been called

WARNING: java.lang.System::load has been called by net.rubygrapefruit.platform.internal.NativeLibraryLoader in an unnamed module (file:/home/runner/.gradle/wrapper/dists/gradle-8.11-rc-1-bin/3ryjaa5huf6y10uzhnh695xix/gradle-8.11-rc-1/lib/native-platform-0.22-milestone-26.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

> Task :caffeine:compileTestJava FROM-CACHE
> Task :caffeine:testClasses UP-TO-DATE

> Task :simulator:compileJava
WARNING: A restricted method in java.lang.System has been called

WARNING: java.lang.System::load has been called by net.rubygrapefruit.platform.internal.NativeLibraryLoader in an unnamed module (file:/home/runner/.gradle/wrapper/dists/gradle-8.11-rc-1-bin/3ryjaa5huf6y10uzhnh695xix/gradle-8.11-rc-1/lib/native-platform-0.22-milestone-26.jar)
> Task :guava:compileJava
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
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

No branches or pull requests

1 participant