diff --git a/build.sbt b/build.sbt index 04e7a722f..e1e2d1f85 100644 --- a/build.sbt +++ b/build.sbt @@ -6,7 +6,7 @@ val overflowdbVersion = "1.42" inThisBuild( List( organization := "io.shiftleft", - scalaVersion := "2.13.4", + scalaVersion := "2.13.6", resolvers ++= Seq( Resolver.mavenLocal, "Sonatype OSS" at "https://oss.sonatype.org/content/repositories/public" diff --git a/console/build.sbt b/console/build.sbt index 55e966c40..a7d2d7aac 100644 --- a/console/build.sbt +++ b/console/build.sbt @@ -51,8 +51,7 @@ val BetterFilesVersion = "3.8.0" val CaskVersion = "0.7.8" val CatsVersion = "2.3.1" val CirceVersion = "0.12.2" -val AmmoniteVersion = "2.3.8-4-88785969" //works -// val AmmoniteVersion = "2.4.0" //stalls +val AmmoniteVersion = "2.4.0" val ZeroturnaroundVersion = "1.13" dependsOn(Projects.fuzzyc2cpg % Test) diff --git a/console/src/main/scala/io/shiftleft/console/embammonite/EmbeddedAmmonite.scala b/console/src/main/scala/io/shiftleft/console/embammonite/EmbeddedAmmonite.scala index 6c2f0d6d2..825c89416 100644 --- a/console/src/main/scala/io/shiftleft/console/embammonite/EmbeddedAmmonite.scala +++ b/console/src/main/scala/io/shiftleft/console/embammonite/EmbeddedAmmonite.scala @@ -124,10 +124,9 @@ object EmbeddedAmmonite { */ val predef: String = - """ - | class CustomFrontend extends ammonite.repl.AmmoniteFrontEnd() { - | override def width = 65536 - | override def height = 65536 + """class CustomFrontend extends ammonite.repl.AmmoniteFrontEnd(ammonite.compiler.Parsers) { + | override def width = 65536 + | override def height = 65536 | | override def readLine(reader: java.io.Reader, | output: java.io.OutputStream, @@ -138,21 +137,20 @@ object EmbeddedAmmonite { | | val writer = new java.io.OutputStreamWriter(output) | - | val multilineFilter = ammonite.terminal.Filter.action( - | ammonite.terminal.SpecialKeys.NewLine, - | ti => ammonite.interp.Parsers.split(ti.ts.buffer.mkString).isEmpty - | ){ - | case ammonite.terminal.TermState(rest, b, c, _) => ammonite.terminal.filters.BasicFilters.injectNewLine(b, c, rest) - | } + | val multilineFilter = ammonite.terminal.Filter.action( + | ammonite.terminal.SpecialKeys.NewLine, + | ti => ammonite.compiler.Parsers.split(ti.ts.buffer.mkString).isEmpty) { + | case ammonite.terminal.TermState(rest, b, c, _) => ammonite.terminal.filters.BasicFilters.injectNewLine(b, c, rest) + | } | | val allFilters = ammonite.terminal.Filter.merge(extraFilters, multilineFilter, ammonite.terminal.filters.BasicFilters.all) | - | new ammonite.terminal.LineReader(width, prompt, reader, writer, allFilters, displayTransform = { (x: Vector[Char], i: Int) => (fansi.Str(""), i) } ) + | new ammonite.terminal.LineReader(width, prompt, reader, writer, allFilters, displayTransform = { (_: Vector[Char], i: Int) => (fansi.Str(""), i) } ) | .readChar(ammonite.terminal.TermState(ammonite.terminal.LazyList.continually(reader.read()), Vector.empty, 0, ""), 0) | } |} - | repl.frontEnd() = new CustomFrontend() | + |repl.frontEnd() = new CustomFrontend() |""".stripMargin private val logger: Logger = LoggerFactory.getLogger(classOf[EmbeddedAmmonite]) diff --git a/project/build.properties b/project/build.properties index 67d27a1df..9edb75b77 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.5.3 +sbt.version=1.5.4