shanedell commented on code in PR #935:
URL: https://github.com/apache/daffodil-vscode/pull/935#discussion_r1449535599


##########
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:
   When I add this and change all `rootName` to `Either[String, 
Option[String]]` I get a bunch of errors like below:
   
   ```bash
   [error]  found   : (java.nio.file.Path, java.nio.file.Path, Boolean, String, 
org.apache.daffodil.debugger.dap.Parse.Debugee.LaunchArgs.InfosetOutput, 
Either[String,Option[String]], Either[String,Option[String]], 
Map[String,String], Map[String,String]) => 
org.apache.daffodil.debugger.dap.Parse.Debugee.LaunchArgs.Manual
   [error]  required: (java.nio.file.Path, java.nio.file.Path, Boolean, String, 
Product with Serializable with 
org.apache.daffodil.debugger.dap.Parse.Debugee.LaunchArgs.InfosetOutput, 
Option[String], Option[String], scala.collection.immutable.Map[String,String], 
scala.collection.immutable.Map[String,String]) => ?
   [error]         ).parMapN(LaunchArgs.Manual.apply)
   ```
   
   Which are similar errors I got when trying to just do `Option[String]` and 
was the reason I went with `String` then just to do that matching before 
passing to `compileFile`



-- 
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]

Reply via email to