From 030e46bfb407681f3a0cd84f5a8af1007b53f15a Mon Sep 17 00:00:00 2001 From: Jaroslav Tulach Date: Tue, 19 Jul 2022 11:28:31 +0200 Subject: [PATCH] Switching to Java 19 Frgaal compiler (#3594) Updating to Frgaal 19.0.0-RC1 to give us access to latest Java features including pattern matching on `record` classes. Builds upon #3421. --- build.sbt | 2 +- project/FrgaalJavaCompiler.scala | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build.sbt b/build.sbt index f1230540ee0..5bb3fb90a24 100644 --- a/build.sbt +++ b/build.sbt @@ -1154,7 +1154,7 @@ val distributionEnvironmentOverrides = { ) } -val frgaalSourceLevel = "18" +val frgaalSourceLevel = "19" /** A setting to replace javac with Frgaal compiler, allowing to use latest Java features in the code * and still compile down to JDK 11 diff --git a/project/FrgaalJavaCompiler.scala b/project/FrgaalJavaCompiler.scala index ccb53ef3299..d647f9b38cc 100644 --- a/project/FrgaalJavaCompiler.scala +++ b/project/FrgaalJavaCompiler.scala @@ -23,7 +23,7 @@ import scala.sys.process.Process object FrgaalJavaCompiler { - val frgaal = "org.frgaal" % "compiler" % "18.0.0" % "provided" + val frgaal = "org.frgaal" % "compiler" % "19.0.0-RC1" % "provided" def compilers(classpath: sbt.Keys.Classpath, sbtCompilers: xsbti.compile.Compilers, javaVersion: String) = { // Enable Java 11+ features by invoking Frgaal instead of regular javac @@ -69,7 +69,7 @@ object FrgaalJavaCompiler { withArgumentFile(allArguments) { argsFile => // Need to disable standard compiler tools that come with used jdk and replace them // with the ones provided with Frgaal. - val forkArgs = (jArgs ++ Seq("--limit-modules", "java.base,jdk.zipfs", "-jar", compilerJar.toString)) :+ + val forkArgs = (jArgs ++ Seq("--limit-modules", "java.base,jdk.zipfs,jdk.internal.vm.compiler.management", "-jar", compilerJar.toString)) :+ s"@${normalizeSlash(argsFile.getAbsolutePath)}" val exe = getJavaExecutable(javaHome, "java") val cwd = new File(new File(".").getAbsolutePath).getCanonicalFile