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


##########
vite.config.mjs:
##########
@@ -122,12 +112,23 @@ function copyToPkgDirPlugin() {
   const serverPackageFolders = []
 
   scalaVersions.forEach((scalaVersion) => {
-    serverPackageFolders.push(
-      path.join(
-        path.resolve('dist/package'),
-        `daffodil-debugger-${scalaVersion}-${pkg_version}`
-      )
+    const serverPackage = `daffodil-debugger-${scalaVersion}-${pkg_version}`
+    const jvmFolderName = `jvm-${scalaVersion}`
+    const stageFilePath = path.resolve(
+      `debugger/target/${jvmFolderName}/universal/stage`
+    )
+    const serverPackageFolder = path.join(
+      path.resolve('dist/package/dist/debuggers'),
+      serverPackage
     )
+
+    // Only push the debugger path if the staged file path exists
+    // When using jdk <= 17 scala 3 shouldn't be mapped as that debugger won't 
be built.

Review Comment:
   I removed this check as I added the getScalaVersions function which will 
only add 3 if the Scala 3 debugger's stage folder exists. Trying to detect the 
java version like we did in the extension kept throwing errors so using the 
stage folder was a workaround. This was also in favor to do what you suggested 
at https://github.com/apache/daffodil-vscode/pull/1471#discussion_r2455086999



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