shanedell commented on code in PR #935:
URL: https://github.com/apache/daffodil-vscode/pull/935#discussion_r1449528816
##########
debugger/src/main/scala/org.apache.daffodil.debugger.dap/Parse.scala:
##########
@@ -472,6 +492,28 @@ object Parse {
}
}
+ // Parse the root name field from the launch config
+ // Defaults to None
+ //
+ // arguments: Launch config
+ def parseRootName(arguments: JsonObject) =
+ Option(arguments.getAsJsonPrimitive("rootName"))
+ .map(_.getAsString())
+ .getOrElse("")
+ .asRight[String]
+ .toEitherNel
Review Comment:
@arosien So there a way to make it just `Option[String]` instead of
`Either[String, Option[String]]`? I had tried to do that before but it caused
errors with the `parMapN` functions
##########
debugger/src/main/scala/org.apache.daffodil.debugger.dap/Parse.scala:
##########
@@ -472,6 +492,28 @@ object Parse {
}
}
+ // Parse the root name field from the launch config
+ // Defaults to None
+ //
+ // arguments: Launch config
+ def parseRootName(arguments: JsonObject) =
+ Option(arguments.getAsJsonPrimitive("rootName"))
+ .map(_.getAsString())
+ .getOrElse("")
+ .asRight[String]
+ .toEitherNel
Review Comment:
@arosien So is there a way to make it just `Option[String]` instead of
`Either[String, Option[String]]`? I had tried to do that before but it caused
errors with the `parMapN` functions
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]