From ca6964b7e2b8f7f757153a8c9c160bf3b8068e7e Mon Sep 17 00:00:00 2001 From: Lars Hupel Date: Mon, 31 Jul 2017 11:11:33 +0200 Subject: [PATCH] re-enable Scala tools support (reverts 5592324) --- build.sbt | 3 ++- .../2016-1/src/main/scala/System/isabelle_tool.scala | 12 ++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/build.sbt b/build.sbt index b3e710b9..98d4d826 100644 --- a/build.sbt +++ b/build.sbt @@ -225,7 +225,8 @@ lazy val pideExtraSettings = Seq( libraryDependencies ++= Seq( "org.tukaani" % "xz" % "1.6", "com.jcraft" % "jsch" % "0.1.54", - "com.jcraft" % "jzlib" % "1.1.3" + "com.jcraft" % "jzlib" % "1.1.3", + ("org.scala-lang" % "scala-compiler" % scalaVersion.value).exclude("org.scala-lang", "scala-library") ) ) diff --git a/modules/pide/2016-1/src/main/scala/System/isabelle_tool.scala b/modules/pide/2016-1/src/main/scala/System/isabelle_tool.scala index 68b3c79c..6780e7a9 100644 --- a/modules/pide/2016-1/src/main/scala/System/isabelle_tool.scala +++ b/modules/pide/2016-1/src/main/scala/System/isabelle_tool.scala @@ -8,8 +8,8 @@ Isabelle system tools: external executables or internal Scala functions. package isabelle import java.net.URLClassLoader -//import scala.reflect.runtime.universe -//import scala.tools.reflect.{ToolBox,ToolBoxError} +import scala.reflect.runtime.universe +import scala.tools.reflect.{ToolBox,ToolBoxError} object Isabelle_Tool @@ -18,7 +18,7 @@ object Isabelle_Tool abstract class Body extends Function[List[String], Unit] - /*private def compile(path: Path): Body = + private def compile(path: Path): Body = { def err(msg: String): Nothing = cat_error(msg, "The error(s) above occurred in Isabelle/Scala tool " + path) @@ -48,7 +48,7 @@ object Isabelle_Tool else err(e.toString) } - }*/ + } /* external tools */ @@ -83,8 +83,8 @@ object Isabelle_Tool private def find_external(name: String): Option[List[String] => Unit] = dirs.collectFirst({ - //case dir if is_external(dir, name + ".scala") => - // compile(dir + Path.basic(name + ".scala")) + case dir if is_external(dir, name + ".scala") => + compile(dir + Path.basic(name + ".scala")) case dir if is_external(dir, name) => (args: List[String]) => {