This is an automated email from the ASF dual-hosted git repository.
dongjoon pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/master by this push:
new a2adc4386dad [SPARK-53668][BUILD] Add
`--enable-native-access=ALL-UNNAMED` to `build/sbt`
a2adc4386dad is described below
commit a2adc4386dad7a61d90be518561e03b4ea6b8a73
Author: Dongjoon Hyun <[email protected]>
AuthorDate: Mon Sep 22 16:25:31 2025 -0700
[SPARK-53668][BUILD] Add `--enable-native-access=ALL-UNNAMED` to `build/sbt`
### What changes were proposed in this pull request?
This PR aims to add `build/sbt` with `--enable-native-access=ALL-UNNAMED`
to suppress excessive SBT warnings during building. This is similar to the
previous `Maven` PR.
- #49972
Apache Spark already uses this configuration in general.
```
$ git grep enable-native-access
.mvn/jvm.config:--enable-native-access=ALL-UNNAMED
launcher/src/main/java/org/apache/spark/launcher/JavaModuleOptions.java:
"--enable-native-access=ALL-UNNAMED"};
pom.xml: --enable-native-access=ALL-UNNAMED
pom.xml: <jvmArg>--enable-native-access=ALL-UNNAMED</jvmArg>
project/SparkBuild.scala:
"--enable-native-access=ALL-UNNAMED").mkString(" ")
sql/connect/bin/spark-connect-scala-client:
--enable-native-access=ALL-UNNAMED"
```
### Why are the changes needed?
**BEFORE (Java 25)**
```
$ build/sbt package
...
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
[info] welcome to sbt 1.9.3 (Azul Systems, Inc. Java 25)
```
**AFTER (Java 25)**
```
$ build/sbt package
...
[info] welcome to sbt 1.9.3 (Azul Systems, Inc. Java 25)
```
### Does this PR introduce _any_ user-facing change?
No behavior change.
### How was this patch tested?
Manual review with `build/sbt package`.
### Was this patch authored or co-authored using generative AI tooling?
No.
Closes #52413 from dongjoon-hyun/SPARK-53668.
Authored-by: Dongjoon Hyun <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
---
build/sbt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/build/sbt b/build/sbt
index 7644c143ad42..fe446fd813fc 100755
--- a/build/sbt
+++ b/build/sbt
@@ -36,7 +36,7 @@ fi
declare -r noshare_opts="-Dsbt.global.base=project/.sbtboot
-Dsbt.boot.directory=project/.boot -Dsbt.ivy.home=project/.ivy"
declare -r sbt_opts_file=".sbtopts"
declare -r etc_sbt_opts_file="/etc/sbt/sbtopts"
-declare -r default_sbt_opts="-Xss64m -XX:+IgnoreUnrecognizedVMOptions
-XX:+UnlockDiagnosticVMOptions -XX:GCLockerRetryAllocationCount=100"
+declare -r default_sbt_opts="-Xss64m -XX:+IgnoreUnrecognizedVMOptions
-XX:+UnlockDiagnosticVMOptions -XX:GCLockerRetryAllocationCount=100
--enable-native-access=ALL-UNNAMED"
usage() {
cat <<EOM
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]