From 2fcfa1ee761604d8a1ed70f8d6eb7050bd166daf Mon Sep 17 00:00:00 2001 From: Davide Angelocola Date: Tue, 13 Oct 2026 08:59:06 +0200 Subject: [PATCH] build: scope native-access and Unsafe JVM flags to the modules whose tests need them The shared surefire argLine passed --enable-native-access and --sun-misc-unsafe-memory-access=allow to every module. They are now empty properties (test.native.args, test.unsafe.args) that reader, writer, parquet, cli and calcite opt into, each with a comment naming the caller that needs it. Co-Authored-By: Claude Sonnet 5 --- calcite/pom.xml | 2 ++ cli/pom.xml | 4 +++- parquet/pom.xml | 5 +++++ pom.xml | 7 ++++++- reader/pom.xml | 5 +++++ writer/pom.xml | 5 +++++ 6 files changed, 26 insertions(+), 2 deletions(-) diff --git a/calcite/pom.xml b/calcite/pom.xml index 74cad2c3..93daf7db 100644 --- a/calcite/pom.xml +++ b/calcite/pom.xml @@ -13,6 +13,8 @@ Apache Calcite SQL adapter over the Vortex columnar file format (demo: filter/project/aggregate push-down). + + --sun-misc-unsafe-memory-access=allow 1.42.0 diff --git a/cli/pom.xml b/cli/pom.xml index 65c05137..78811a9a 100644 --- a/cli/pom.xml +++ b/cli/pom.xml @@ -13,6 +13,8 @@ Command-line interface for the Vortex columnar file format. + + --enable-native-access=ALL-UNNAMED @@ -85,7 +87,7 @@ {@code coverage} profile is active; empty default otherwise (set in the root pom). Without it the agent never attaches and the cli module reports 0% coverage. --> - @{argLine} --sun-misc-unsafe-memory-access=allow + @{argLine} --sun-misc-unsafe-memory-access=allow ${test.native.args} **/*Test.java **/*IT.java diff --git a/parquet/pom.xml b/parquet/pom.xml index 96e2440d..5c114b6d 100644 --- a/parquet/pom.xml +++ b/parquet/pom.xml @@ -12,6 +12,11 @@ vortex-parquet Parquet conversion support for the Vortex columnar file format. + + + --enable-native-access=ALL-UNNAMED + + diff --git a/pom.xml b/pom.xml index b4858c68..754475a2 100644 --- a/pom.xml +++ b/pom.xml @@ -131,6 +131,11 @@ run with it so the Vector API kernels are exercised; CI also runs a leg with it empty (-Dtest.vector.args=), the configuration users get by default. --> --add-modules jdk.incubator.vector + + + 0.11.0 3.2.8 @@ -391,7 +396,7 @@ {@code net.bytebuddy:byte-buddy-agent:jar} is resolved to an absolute path by {@code maven-dependency-plugin:properties} (declared in build/plugins); loading it as a javaagent suppresses the Mockito self-attach warning. --> - @{argLine} -javaagent:${net.bytebuddy:byte-buddy-agent:jar} --sun-misc-unsafe-memory-access=allow --enable-native-access=ALL-UNNAMED ${test.vector.args} + @{argLine} -javaagent:${net.bytebuddy:byte-buddy-agent:jar} ${test.vector.args} ${test.native.args} ${test.unsafe.args} diff --git a/reader/pom.xml b/reader/pom.xml index c720f4ea..5fe41cb9 100644 --- a/reader/pom.xml +++ b/reader/pom.xml @@ -14,6 +14,11 @@ 25+), no JNI, no sun.misc.Unsafe. + + + --enable-native-access=ALL-UNNAMED + + diff --git a/writer/pom.xml b/writer/pom.xml index 568cc9a6..486dea74 100644 --- a/writer/pom.xml +++ b/writer/pom.xml @@ -14,6 +14,11 @@ implementation. + + + --enable-native-access=ALL-UNNAMED + +