shanedell commented on code in PR #1471:
URL: https://github.com/apache/daffodil-vscode/pull/1471#discussion_r2455482598
##########
vite.config.mjs:
##########
@@ -45,41 +44,32 @@ const packageData = jsoncParse(
const pkg_version = packageData['version']
const scalaVersions = ['2.12', '2.13', '3']
-function unzipAfterBuild() {
+function copyDebuggerOutAfterBuild() {
return {
- name: 'unzip-server-package',
+ name: 'copy-debugger-package',
apply: 'build',
async closeBundle() {
scalaVersions.forEach(async (scalaVersion) => {
const serverPackage =
`daffodil-debugger-${scalaVersion}-${pkg_version}`
const jvmFolderName = `jvm-${scalaVersion}`
- const zipFilePath = path.resolve(
- `debugger/target/${jvmFolderName}/universal/${serverPackage}.zip`
+ const stageFilePath = path.resolve(
+ `debugger/target/${jvmFolderName}/universal/stage`
)
- const serverPackageFolder = path.join(
- path.resolve('dist/package'),
- serverPackage
- )
+ const serverPackageFolder = path.join('dist/debuggers', serverPackage)
// remove debugger package folder if exists
if (fs.existsSync(serverPackageFolder)) {
fs.rmSync(serverPackageFolder, { recursive: true, force: true })
}
// if the debugger package doesn't exist continue
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 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]