stevedlawrence commented on code in PR #1452:
URL: https://github.com/apache/daffodil-vscode/pull/1452#discussion_r2416840915
##########
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 = {
Review Comment:
I'm surprised this logic is in DAPodil. Isn't DAPodil executed with Daffodil
jars already on the classpath? If the jars aren't already on the classpath and
need to be downloaded, wouldn't this need to re-exec itself with the correct
classpath after the jars have been downloaded?
--
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]