You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@daffodil.apache.org by sh...@apache.org on 2023/11/29 18:37:55 UTC

(daffodil-vscode) branch main updated: Changed assigment of extraArgs to be os specific and fix Java 17 on Windows

This is an automated email from the ASF dual-hosted git repository.

shanedell pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/daffodil-vscode.git


The following commit(s) were added to refs/heads/main by this push:
     new 07720b1  Changed assigment of extraArgs to be os specific and fix Java 17 on Windows
07720b1 is described below

commit 07720b1115758677b32dfd6b51ae76f94404c257
Author: LRBarber <la...@nteligen.com>
AuthorDate: Mon Nov 20 15:52:43 2023 -0500

    Changed assigment of extraArgs to be os specific and fix Java 17 on Windows
    
    - Add yarn.lock to package folder, this is needed to avoid an issue where making the package it was installing different versions of packages. This caused an issue as a package required node 18 instead of 16.
    
    Closes #895
---
 src/daffodilDebugger/utils.ts         | 5 ++++-
 webpack/ext-package.webpack.config.js | 1 +
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/daffodilDebugger/utils.ts b/src/daffodilDebugger/utils.ts
index c8a9092..7eed960 100644
--- a/src/daffodilDebugger/utils.ts
+++ b/src/daffodilDebugger/utils.ts
@@ -43,7 +43,10 @@ export const shellArgs = (port: number, isAtLeastJdk17: boolean) => {
   // Workaround: certain reflection (used by JAXB) isn't allowed by default in JDK 17:
   //   https://docs.oracle.com/en/java/javase/17/migrate/migrating-jdk-8-later-jdk-releases.html#GUID-7BB28E4D-99B3-4078-BDC4-FC24180CE82B
   const extraArgs = isAtLeastJdk17
-    ? ['-J--add-opens', '-Jjava.base/java.lang=ALL-UNNAMED']
+    ? osCheck(
+        ['-J"--add-opens java.base/java.lang=ALL-UNNAMED"'],
+        ['-J--add-opens', '-Jjava.base/java.lang=ALL-UNNAMED']
+      )
     : []
   return ['--listenPort', `${port}`].concat(extraArgs)
 }
diff --git a/webpack/ext-package.webpack.config.js b/webpack/ext-package.webpack.config.js
index 341afca..045a8d0 100644
--- a/webpack/ext-package.webpack.config.js
+++ b/webpack/ext-package.webpack.config.js
@@ -101,6 +101,7 @@ module.exports = /** @type WebpackConfig */ {
         { from: 'images', to: `${pkg_dir}/images` },
         { from: 'language', to: `${pkg_dir}/language` },
         { from: 'package.json', to: `${pkg_dir}` },
+        { from: 'yarn.lock', to: `${pkg_dir}` },
         {
           from: 'node_modules/@omega-edit/server/bin',
           to: `${pkg_dir}/node_modules/@omega-edit/server/bin`,