Permalink
Browse files

new wdl4s dependency

1 parent ac6ebeb commit 51e9098be1b4bd277a27d26b2121482c267dbf22 @cjllanwarne cjllanwarne committed Feb 13, 2017
Showing with 4 additions and 3 deletions.
  1. +1 −1 build.sbt
  2. +2 −1 src/main/scala/wdltool/GraphPrint.scala
  3. +1 −1 src/main/scala/wdltool/Main.scala
View
@@ -34,7 +34,7 @@ resolvers ++= Seq(
)
libraryDependencies ++= Seq(
- "org.broadinstitute" %% "wdl4s" % "0.8",
+ "org.broadinstitute" %% "wdl4s" % "0.10-ae6c153-SNAP",
//---------- Test libraries -------------------//
"org.scalatest" %% "scalatest" % "2.2.5" % Test
)
@@ -10,7 +10,8 @@ object GraphPrint {
case class WorkflowDigraph(workflowName: String, digraph: Set[String])
def generateWorkflowDigraph(file: String, allNodesMode: Boolean): WorkflowDigraph = {
- val namespace = WdlNamespaceWithWorkflow.load(Files.readAllLines(Paths.get(file)).asScala.mkString(System.lineSeparator()), Seq(WdlNamespace.fileResolver _))
+ // It's ok to use .get here, we're happy to throw an exception and crash the program!
+ val namespace = WdlNamespaceWithWorkflow.load(Files.readAllLines(Paths.get(file)).asScala.mkString(System.lineSeparator()), Seq(WdlNamespace.fileResolver _)).get
val digraph = if (allNodesMode) {
listAllGraphNodes(namespace)
@@ -94,7 +94,7 @@ object Main extends App {
private[this] def continueIf(valid: => Boolean)(block: => Termination): Termination = if (valid) block else BadUsageTermination
private[this] def loadWdl(path: String)(f: WdlNamespace => Termination): Termination = {
- Try(WdlNamespace.loadUsingPath(Paths.get(path), None, None)) match {
+ WdlNamespace.loadUsingPath(Paths.get(path), None, None) match {
case Success(namespace) => f(namespace)
case Failure(t) => UnsuccessfulTermination(t.getMessage)
}

0 comments on commit 51e9098

Please sign in to comment.