From 2cc254199d8c27e1270592b2a99504eab3e76afb Mon Sep 17 00:00:00 2001 From: Stephen Amar Date: Thu, 11 Dec 2025 11:47:10 -0800 Subject: [PATCH] Fix JVM warnings introduced with JDK25 --- build.mill | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/build.mill b/build.mill index ba843c1c..bb6e8278 100644 --- a/build.mill +++ b/build.mill @@ -53,6 +53,10 @@ trait SjsonnetCrossModule extends CrossScalaModule with ScalafmtModule { mvn"org.scala-lang.modules::scala-collection-compat::2.14.0" ) + def manifest = super.manifest().add( + "Enable-Native-Access" -> "net.jpountz.util.Native" + ) + def generatedSources = Task { os.write( Task.ctx().dest / "Version.scala", @@ -90,7 +94,7 @@ trait SjsonnetJvmNative extends ScalaModule { } object bench extends ScalaModule with JmhModule with ScalafmtModule { - def forkArgs = Seq("-Xss" + stackSize) + def forkArgs = Seq("-Xss" + stackSize, "--enable-native-access=ALL-UNNAMED") def scalaVersion = scalaVersions.head def moduleDeps = Seq(sjsonnet.jvm.crossModules.head) def jmhCoreVersion = "1.37" @@ -282,7 +286,7 @@ object sjsonnet extends VersionFileModule { ) object test extends ScalaTests with CrossTests { - def forkArgs = Seq("-Xss" + stackSize) + def forkArgs = Seq("-Xss" + stackSize, "--enable-native-access=ALL-UNNAMED") def sources = Task.Sources(sourceDirs.map(d => this.moduleDir / d)*) }