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


##########
debugger/src/main/scala/org.apache.daffodil.debugger.dap/DAPodil.scala:
##########
@@ -434,29 +436,55 @@ object DAPodil extends IOApp {
         .withDefault(4711),
       Opts
         .option[Duration]("listenTimeout", "duration to wait for a DAP client 
connection (default: 10s)")
-        .withDefault(10.seconds)
-    ).mapN(Options)
+        .withDefault(10.seconds),
+      Opts
+        .option[String]("daffodilVersion", "version of Daffodil to use 
(default: 3.11.0)")
+        .withDefault("3.11.0")
+    ).mapN(Options.apply)
 
   implicit val logger: Logger[IO] = Slf4jLogger.getLogger
 
-  val header =
-    s"""|
-        |******************************************************
-        |A DAP server for debugging Daffodil schema processors.
-        |
-        |Build info:
-        |  version: ${BuildInfo.version}
-        |  daffodilVersion: ${BuildInfo.daffodilVersion}
-        |  scalaVersion: ${BuildInfo.scalaVersion}
-        |  sbtVersion: ${BuildInfo.sbtVersion}
-        |Runtime info:
-        |  JVM version: ${System.getProperty("java.version")} 
(${System.getProperty("java.home")})
-        |******************************************************""".stripMargin
+  def getHeader(daffodilVersion: Option[String]): String = {
+    val header =
+      s"""|
+          |******************************************************
+          |A DAP server for debugging Daffodil schema processors.
+          |
+          |Build info:
+          |  version: ${BuildInfo.version}
+          |  scalaVersion: ${BuildInfo.scalaVersion}
+          |  sbtVersion: ${BuildInfo.sbtVersion}
+          |Runtime info:
+          |  JVM version: ${System.getProperty("java.version")} 
(${System.getProperty("java.home")})
+          
|******************************************************""".stripMargin
+
+    daffodilVersion match {
+      case Some(version) =>
+        header.replace(
+          s"Runtime info:",
+          s"Runtime info:\n  Daffodil Version: ${version}"
+        )
+      case None => header
+    }
+  }
+
+  def getDaffodilCLIJars(daffodilVersion: String): Unit = {
+    val url =
+      
s"https://www.apache.org/dyn/closer.lua/download/daffodil/${daffodilVersion}/bin/apache-daffodil-${daffodilVersion}-bin.zip";
+    val dest = Paths.get(sys.props("user.home"), ".cache", "daffodil-debugger")

Review Comment:
   Yeah maybe you are right. It worked fine when testing on windows but I used 
the user home since I was doing in both scala and TS



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