Skip to content

Commit

Permalink
Switching to Java 19 Frgaal compiler (#3594)
Browse files Browse the repository at this point in the history
Updating to Frgaal 19.0.0-RC1 to give us access to latest Java features including pattern matching on `record` classes. Builds upon #3421.
  • Loading branch information
JaroslavTulach authored Jul 19, 2022
1 parent 7fa4e5e commit 030e46b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions project/FrgaalJavaCompiler.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 030e46b

Please sign in to comment.