From f681f44534930d1f3287404459382d1dbf4b06b4 Mon Sep 17 00:00:00 2001 From: Alexandre Archambault Date: Thu, 18 Aug 2022 19:22:31 +0200 Subject: [PATCH 1/2] Don't depend on JNA It might conflict with a JNA version loaded by users, better not depend on it. It seems it's only pulled for terminal related stuff by Ammonite and scala-compiler, so it shouldn't actually be used by them from Almond. --- build.sc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.sc b/build.sc index f349c931b..ac64481ae 100644 --- a/build.sc +++ b/build.sc @@ -149,8 +149,8 @@ class ScalaInterpreter(val crossScalaVersion: String) extends AlmondModule with Deps.coursierApi, Deps.directories, Deps.jansi, - Deps.ammoniteCompiler(crossScalaVersion), - Deps.ammoniteRepl(crossScalaVersion) + Deps.ammoniteCompiler(crossScalaVersion).exclude(("net.java.dev.jna", "jna")), + Deps.ammoniteRepl(crossScalaVersion).exclude(("net.java.dev.jna", "jna")) ) } object test extends Tests with AlmondTestModule { From 4d155645c32c35037c5e4fe7aea496c0d846950b Mon Sep 17 00:00:00 2001 From: Alexandre Archambault Date: Thu, 18 Aug 2022 19:24:27 +0200 Subject: [PATCH 2/2] Require newer Bloop server version when compiling Older versions have issues compiling pre-Java 17 support Scala versions. --- project/settings.sc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/project/settings.sc b/project/settings.sc index 491f70d8c..73516de62 100644 --- a/project/settings.sc +++ b/project/settings.sc @@ -183,8 +183,7 @@ trait AlmondScalaCliCompile extends ScalaCliCompile { // as support for Java 8 or 11 in Scala CLI relies on the --release flag of Java 17, // and it seems --release puts in the class path stuff not supported by those // Scala versions. - val tmp17Opts = if (needs17) Seq("--jvm", "temurin:17") else Nil - super.extraScalaCliOptions() ++ tmp17Opts + super.extraScalaCliOptions() ++ Seq("--jvm", "8", "--bloop-version", "1.5.3-sc-1") } }