Skip to content

Commit

Permalink
Address feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
Win Wang committed Jul 30, 2019
1 parent 40446b9 commit b8c2fbc
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
4 changes: 2 additions & 2 deletions build.sbt
Expand Up @@ -62,12 +62,12 @@ lazy val check = project
scalacOptions += "-Xexperimental",
libraryDependencies += "ch.qos.logback" % "logback-classic" % "1.2.3",
libraryDependencies += "commons-cli" % "commons-cli" % "1.4",
libraryDependencies += "io.github.java-diff-utils" % "java-diff-utils" % "4.0",
libraryDependencies += "io.github.soc" % "directories" % "10",
libraryDependencies += "org.ow2.asm" % "asm" % V.asm,
libraryDependencies += "org.ow2.asm" % "asm-util" % V.asm,
libraryDependencies += "org.scala-lang" % "scalap" % V.scala,
libraryDependencies += "org.eclipse.jgit" % "org.eclipse.jgit" % "4.6.0.201612231935-r",
libraryDependencies += "io.github.java-diff-utils" % "java-diff-utils" % "4.0",
libraryDependencies += "io.github.soc" % "directories" % "10",
libraryDependencies += "org.scala-lang" % "scala-compiler" % V.scala,
libraryDependencies += "org.scalameta" %% "cli" % V.scalameta,
libraryDependencies += "org.scalameta" %% "metacp" % V.scalameta,
Expand Down
6 changes: 6 additions & 0 deletions check/src/main/scala/rsc/checkscalasig/Main.scala
Expand Up @@ -3,6 +3,12 @@ package rsc.checkscalasig
import java.nio.file.Path
import _root_.rsc.checkbase.{SimpleBase, ToolResult}

/**
* Example invocation (in sbt):
* check/runMain rsc.checkscalasig.Main --classpath $JAVALIB:SCALALIB C.scala
*
* Replace $JAVALIB:SCALALIB with the actual paths
*/
object Main extends SimpleBase[Settings, Path, Path] {

def settings(args: List[String]): Either[List[String], Settings] = {
Expand Down
Expand Up @@ -7,6 +7,7 @@ import java.net._
import java.nio.file._
import java.util.jar._
import scala.collection.JavaConverters._
import scala.collection.mutable.ListBuffer

object Binaries {
def apply(paths: List[Path])(fn: Binary => Unit): Unit = {
Expand Down Expand Up @@ -61,11 +62,11 @@ object Binaries {
}

def list(paths: Path*): List[Binary] = {
var ress = List.empty[Binary]
val ress = ListBuffer.empty[Binary]

apply(paths.toList) { res =>
ress = ress :+ res
ress.prepend(res)
}
ress
ress.reverse.toList
}
}

0 comments on commit b8c2fbc

Please sign in to comment.