You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@daffodil.apache.org by GitBox <gi...@apache.org> on 2022/07/25 01:26:47 UTC

[GitHub] [daffodil-vscode] Shanedell opened a new pull request, #240: Test suite updates

Shanedell opened a new pull request, #240:
URL: https://github.com/apache/daffodil-vscode/pull/240

   Test suite updates:
   
   - Move test suite to use @vscode/test-electron, so that we can now test all available code not just things that don't call the vscode api.
   - Create additonal unit tests, adding on to previous ones already made
   - Restructure some code to make code flow better and easier to test
   
   Closes #118


-- 
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: commits-unsubscribe@daffodil.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [daffodil-vscode] stevedlawrence commented on a diff in pull request #240: Test suite updates

Posted by GitBox <gi...@apache.org>.
stevedlawrence commented on code in PR #240:
URL: https://github.com/apache/daffodil-vscode/pull/240#discussion_r975736103


##########
package.json:
##########
@@ -1,480 +1,489 @@
 {
-  "name": "apache-daffodil-vscode",
-  "displayName": "Apache Daffodil VS Code Extension",
-  "description": "VS Code extension for Apache Daffodil DFDL schema debugging",
-  "version": "1.1.0",
-  "daffodilVersion": "3.3.0",
-  "omegaEditServerHash": "ffabce0d095364d1c863466f522dfa0ac2f0574d6394a82c0239a613bb84baf7c7b9fd92fdb0457e1d3c9321249acc21567d7dcfd6ff0528e0e792da1b487407",
-  "publisher": "asf",
-  "author": "Apache Daffodil",
-  "license": "Apache-2.0",
-  "engines": {
-    "vscode": "^1.55.0"
-  },
-  "icon": "images/daffodil.ico",
-  "categories": [
-    "Debuggers",
-    "Programming Languages"
-  ],
-  "repository": {
-    "type": "git",
-    "url": "https://github.com/apache/daffodil-vscode.git"
-  },
-  "bugs": {
-    "url": "https://github.com/apache/daffodil-vscode/issues"
-  },
-  "scripts": {
-    "omega-edit-download": "node -e \"require('./build/scripts/omega_edit_download.ts').downloadServer()\"",
-    "precompile": "node -p \"'export const LIB_VERSION = ' + JSON.stringify(require('./package.json').version) + ';'\" > src/version.ts",
-    "compile": "tsc -p ./ && yarn omega-edit-download",
-    "lint": "yarn run prettier src -c",
-    "watch": "yarn omega-edit-download && webpack --watch --devtool nosources-source-map --config ./build/extension.webpack.config.js",
-    "watch2": "tsc -watch -p ./",
-    "webpack": "webpack --mode production --config ./build/extension.webpack.config.js",
-    "prepackage": "yarn sbt && yarn install && yarn compile && yarn webpack",
-    "package": "yarn package-setup && yarn package-create",
-    "package-setup": "node -e \"require('./build/scripts/package.ts').setup()\"",
-    "package-create": "node -e \"require('./build/scripts/package.ts').create()\"",
-    "pretest": "yarn run compile",
-    "test": "node node_modules/mocha/bin/_mocha -u tdd --timeout 999999 --colors ./out/tests",
-    "sbt": "sbt universal:packageBin"
-  },
-  "dependencies": {
-    "@grpc/grpc-js": "^1.5.4",
-    "@types/moo": "^0.5.5",
-    "await-notify": "1.0.1",
-    "child_process": "1.0.2",
-    "google-protobuf": "3.20.1",
-    "hexy": "0.3.4",
-    "moo": "0.5.1",
-    "omega-edit": "0.9.20",
-    "unzip-stream": "0.3.1",
-    "vscode-debugadapter": "1.51.0",
-    "xdg-app-paths": "7.3.0"
-  },
-  "devDependencies": {
-    "@types/glob": "^7.1.3",
-    "@types/mocha": "^9.1.1",
-    "@types/node": "^18.0.0",
-    "@types/vscode": "^1.55.0",
-    "glob": "8.0.3",
-    "mocha": "10.0.0",
-    "prettier": "2.7.1",
-    "ts-loader": "8.1.0",
-    "typescript": "4.3.5",
-    "vsce": "2.9.2",
-    "vscode-debugadapter-testsupport": "1.51.0",
-    "webpack": "5.73.0",
-    "webpack-cli": "4.10.0"
-  },
-  "extensionDependencies": [
-    "vincaslt.highlight-matching-tag"
-  ],
-  "main": "./dist/ext/extension.js",
-  "activationEvents": [
-    "onLanguage:dfdl",
-    "onDebugResolve:dfdl",
-    "onDebugDynamicConfigurations:dfdl",
-    "onCommand:extension.dfdl-debug.getProgramName",
-    "onCommand:extension.dfdl-debug.getDataName",
-    "onCommand:extension.dfdl-debug.runEditorContents",
-    "onCommand:extension.dfdl-debug.debugEditorContents",
-    "onCommand:launch.config",
-    "onCommand:data.edit",
-    "onCommand:omega_edit.version",
-    "onCommand:toggle.experimental",
-    "onCommand:extension.dfdl-debug.debugLastEditorContents"
-  ],
-  "workspaceTrust": {
-    "request": "never"
-  },
-  "contributes": {
-    "languages": [
-      {
-        "id": "dfdl",
-        "aliases": [
-          "dfdl"
-        ],
-        "extensions": [
-          ".dfdl.xsd"
-        ],
-        "configuration": "./language/dfdl.json"
-      }
-    ],
-    "grammars": [
-      {
-        "language": "dfdl",
-        "scopeName": "text.xml.dfdl.xsd",
-        "path": "./language/syntaxes/dfdl.tmLanguage.json"
-      }
-    ],
-    "menus": {
-      "editor/title": [
-        {
-          "command": "launch.config",
-          "group": "navigation@1"
-        },
-        {
-          "command": "hexview.display",
-          "when": "resourceLangId == dfdl",
-          "group": "navigation@4"
-        },
-        {
-          "command": "infoset.display",
-          "when": "resourceLangId == dfdl",
-          "group": "navigation@2"
-        },
-        {
-          "command": "infoset.diff",
-          "when": "resourceLangId == dfdl",
-          "group": "navigation@3"
-        }
-      ],
-      "editor/title/run": [
-        {
-          "command": "extension.dfdl-debug.runEditorContents",
-          "when": "resourceLangId == dfdl"
-        },
-        {
-          "command": "extension.dfdl-debug.debugEditorContents",
-          "when": "resourceLangId == dfdl"
-        },
-        {
-          "command": "extension.dfdl-debug.debugLastEditorContents",
-          "when": "resourceLangId == dfdl"
-        }
-      ],
-      "commandPalette": [
-        {
-          "command": "extension.dfdl-debug.debugEditorContents",
-          "when": "resourceLangId == dfdl"
-        },
-        {
-          "command": "extension.dfdl-debug.runEditorContents",
-          "when": "resourceLangId == dfdl"
-        },
-        {
-          "command": "data.edit",
-          "enablement": "experimentalFeaturesEnabled"
-        },
-        {
-          "command": "omega_edit.version",
-          "enablement": "experimentalFeaturesEnabled"
-        },
-        {
-          "command": "toggle.experimental"
-        },
-        {
-          "command": "extension.dfdl-debug.debugLastEditorContents",
-          "when": "resourceLangId == dfdl"
-        }
-      ],
-      "debug/variables/context": [
-        {
-          "command": "extension.dfdl-debug.toggleFormatting",
-          "when": "debugType == 'dfdl' && debugProtocolVariableMenuContext == 'simple'"
-        }
-      ]
-    },
-    "commands": [
-      {
-        "command": "extension.dfdl-debug.debugEditorContents",
-        "title": "Debug File",
-        "category": "Daffodil Debug",
-        "enablement": "!inDebugMode",
-        "icon": "$(debug-alt)"
-      },
-      {
-        "command": "extension.dfdl-debug.runEditorContents",
-        "title": "Run File",
-        "category": "Daffodil Debug",
-        "enablement": "!inDebugMode",
-        "icon": "$(play)"
-      },
-      {
-        "command": "extension.dfdl-debug.debugLastEditorContents",
-        "title": "Debug Last File",
-        "category": "Daffodil Debug",
-        "enablement": "!inDebugMode",
-        "icon": "$(debug-alt)"
-      },
-      {
-        "command": "extension.dfdl-debug.toggleFormatting",
-        "title": "Toggle between decimal and hex formatting",
-        "category": "Daffodil Debug",
-        "enablement": "inDebugMode"
-      },
-      {
-        "command": "hexview.display",
-        "title": "Display the hex view",
-        "category": "Daffodil Debug",
-        "enablement": "inDebugMode",
-        "icon": "$(file-binary)"
-      },
-      {
-        "command": "infoset.display",
-        "title": "Display the infoset view",
-        "category": "Daffodil Debug",
-        "enablement": "inDebugMode",
-        "icon": "$(file-code)"
-      },
-      {
-        "command": "infoset.diff",
-        "title": "View infoset diff",
-        "category": "Daffodil Debug",
-        "enablement": "inDebugMode",
-        "icon": "$(diff)"
-      },
-      {
-        "command": "infoset.save",
-        "title": "Save the current infoset",
-        "category": "Daffodil Debug",
-        "enablement": "inDebugMode"
-      },
-      {
-        "command": "launch.config",
-        "title": "Configure launch.json",
-        "category": "Daffodil Debug",
-        "enablement": "!inDebugMode",
-        "icon": "$(debug-configure)"
-      },
-      {
-        "command": "toggle.experimental",
-        "title": "Enable Experimental Features",
-        "category": "Daffodil Debug"
-      },
-      {
-        "command": "omega_edit.version",
-        "title": "Omega Edit Ω Version Info",
-        "category": "OmegaEdit",
-        "enablement": "experimentalFeaturesEnabled"
-      },
-      {
-        "command": "data.edit",
-        "title": "Data Editor",
-        "category": "OmegaEdit",
-        "enablement": "experimentalFeaturesEnabled"
-      },
-      {
-        "command": "position.goto",
-        "title": "Go to position",
-        "category": "OmegaEdit",
-        "enablement": "experimentalFeaturesEnabled"
-      }
-    ],
-    "keybindings": [
-      {
-        "command": "position.goto",
-        "key": "ctrl+alt+g",
-        "mac": "ctrl+cmd+g",
-        "when": "editorTextFocus"
-      }
-    ],
-    "breakpoints": [
-      {
-        "language": "dfdl"
-      }
-    ],
-    "debuggers": [
-      {
-        "type": "dfdl",
-        "languages": [
-          "dfdl"
-        ],
-        "label": "Daffodil Debug",
-        "program": "./out/extension.js",
-        "runtime": "node",
-        "configurationAttributes": {
-          "launch": {
-            "required": [
-              "program",
-              "data"
-            ],
-            "properties": {
-              "program": {
-                "type": "string",
-                "description": "Absolute path to the DFDL schema file.",
-                "default": "${command:AskForProgramName}"
-              },
-              "data": {
-                "type": "string",
-                "description": "Absolute path to the input data file.",
-                "default": "${command:AskForDataName}"
-              },
-              "infosetOutput": {
-                "type": "object",
-                "description": "Destination for final Infoset (file-path | 'console' | 'none')",
-                "default": {
-                  "type": "console",
-                  "path": "${workspaceFolder}/infoset.xml"
-                }
-              },
-              "stopOnEntry": {
-                "type": "boolean",
-                "description": "Automatically stop after launch.",
-                "default": true
-              },
-              "trace": {
-                "type": "boolean",
-                "description": "Enable logging of the Debug Adapter Protocol.",
-                "default": true
-              },
-              "debugServer": {
-                "type": "integer",
-                "description": "Port debug server running on",
-                "default": 4711
-              },
-              "useExistingServer": {
-                "type": "boolean",
-                "description": "Enable connection to running DAP Server",
-                "default": false
-              },
-              "openHexView": {
-                "type": "boolean",
-                "description": "Open hexview on debug start",
-                "default": false
-              },
-              "openInfosetView": {
-                "type": "boolean",
-                "description": "Open hexview on debug start",
-                "default": false
-              },
-              "openInfosetDiffView": {
-                "type": "boolean",
-                "description": "Open hexview on debug start",
-                "default": false
-              },
-              "daffodilDebugClasspath": {
-                "type": "string",
-                "description": "Additional classpaths to be exported to the debugger",
-                "default": ""
-              }
-            }
-          }
-        },
-        "initialConfigurations": [
-          {
-            "type": "dfdl",
-            "request": "launch",
-            "name": "Ask for file name",
-            "program": "${command:AskForProgramName}",
-            "stopOnEntry": true,
-            "data": "${command:AskForDataName}",
-            "infosetOutput": {
-              "type": "file",
-              "path": "${workspaceFolder}/infoset.xml"
-            },
-            "debugServer": 4711,
-            "openHexView": false,
-            "openInfosetView": false,
-            "openInfosetDiffView": false,
-            "daffodilDebugClasspath": ""
-          }
-        ],
-        "configurationSnippets": [
-          {
-            "label": "Daffodil Debug: Launch",
-            "description": "A new configuration for 'debugging' a user selected xml file.",
-            "body": {
-              "type": "dfdl",
-              "request": "launch",
-              "name": "Ask for file name",
-              "program": "^\"\\${command:AskForProgramName}\"",
-              "stopOnEntry": true,
-              "data": "^\"\\${command:AskForDataName}\"",
-              "infosetOutput": {
-                "type": "file",
-                "path": "${workspaceFolder}/infoset.xml"
-              },
-              "debugServer": 4711,
-              "openHexView": false,
-              "openInfosetView": false,
-              "openInfosetDiffView": false,
-              "daffodilDebugClasspath": ""
-            }
-          }
-        ],
-        "variables": {
-          "AskForProgramName": "extension.dfdl-debug.getProgramName",
-          "AskForDataName": "extension.dfdl-debug.getDataName"
-        }
-      }
-    ],
-    "configuration": [
-      {
-        "title": "Daffodil Debugger Global",
-        "properties": {
-          "type": {
-            "type": "string",
-            "default": "dfdl"
-          },
-          "program": {
-            "type": "string",
-            "description": "Absolute path to the DFDL schema file.",
-            "default": "${command:AskForProgramName}"
-          },
-          "data": {
-            "type": "string",
-            "description": "Absolute path to the input data file.",
-            "default": "${command:AskForDataName}"
-          },
-          "infosetOutputType": {
-            "type": "string",
-            "description": "Destination for final Infoset (file | 'console' | 'none')",
-            "enum": [
-              "file",
-              "console",
-              "none"
-            ],
-            "default": "none"
-          },
-          "infosetOutputFilePath": {
-            "type": "string",
-            "description": "Path to output for Infoset file (req: infosetOutput=file)",
-            "default": "${workspaceFolder}/infoset.xml"
-          },
-          "stopOnEntry": {
-            "type": "boolean",
-            "description": "Automatically stop after launch.",
-            "default": true
-          },
-          "trace": {
-            "type": "boolean",
-            "description": "Enable logging of the Debug Adapter Protocol.",
-            "default": true
-          },
-          "useExistingServer": {
-            "type": "boolean",
-            "description": "Enable connection to running DAP Server",
-            "default": false
-          },
-          "debugServer": {
-            "type": "integer",
-            "description": "Port debug server running on",
-            "default": 4711
-          },
-          "openHexView": {
-            "type": "boolean",
-            "description": "Open hexview on debug start",
-            "default": false
-          },
-          "openInfosetView": {
-            "type": "boolean",
-            "description": "Open hexview on debug start",
-            "default": false
-          },
-          "openInfosetDiffView": {
-            "type": "boolean",
-            "description": "Open hexview on debug start",
-            "default": false
-          },
-          "daffodilDebugClasspath": {
-            "type": "string",
-            "description": "Additional classpaths to be exported to the debugger",
-            "default": ""
-          }
-        }
-      }
-    ]
-  }
+	"name": "apache-daffodil-vscode",

Review Comment:
   Search for tab and replace with two spaces should do it. Something like this: `sed -i 's/\t/   /g' package.json && git add package.json`



-- 
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: commits-unsubscribe@daffodil.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [daffodil-vscode] stevedlawrence commented on a diff in pull request #240: Test suite updates

Posted by GitBox <gi...@apache.org>.
stevedlawrence commented on code in PR #240:
URL: https://github.com/apache/daffodil-vscode/pull/240#discussion_r976405053


##########
package.json:
##########
@@ -476,5 +477,11 @@
         }
       }
     ]
+  },
+  "__metadata": {
+    "id": "4f1304da-7e65-48f1-9126-0a143e2e5ef2",
+    "publisherDisplayName": "Apache Software Foundation",
+    "publisherId": "4dbc1d1a-d64b-46f8-8756-1c234855f645",

Review Comment:
   Where do `id` and `publisherId` come from? Do they ever need to be updated, or are they specific to this extension and ASF?



-- 
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: commits-unsubscribe@daffodil.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [daffodil-vscode] Shanedell commented on a diff in pull request #240: Test suite updates

Posted by GitBox <gi...@apache.org>.
Shanedell commented on code in PR #240:
URL: https://github.com/apache/daffodil-vscode/pull/240#discussion_r975697031


##########
src/language/providers/attributeCompletion.ts:
##########
@@ -28,38 +28,25 @@ import {
 } from './utils'
 
 import { attributeCompletion } from './intellisense/attributeItems'
+import { getCommonItems, createCompletionItem } from './utils'
 
 function getCompletionItems(
   itemsToUse: string[],
   preVal: string = '',
   additionalItems: string = ''
 ) {
-  let compItems: vscode.CompletionItem[] = []
-  let noPreVals: string[] = [
-    'dfdl:choiceBranchKey=',
-    'dfdl:representation',
-    'dfdl:choiceDispatchKey=',
-    'dfdl:simpleType',
-    'xs:restriction',
-  ]
+  let compItems: vscode.CompletionItem[] = getCommonItems(
+    itemsToUse,
+    preVal,
+    additionalItems
+  )
 
+  compItems.forEach((i) =>
+    vscode.window.showInformationMessage(i.label.toString())
+  )

Review Comment:
   Yeah that is what it is I forgot to delete will remove that



-- 
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: commits-unsubscribe@daffodil.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [daffodil-vscode] Shanedell commented on a diff in pull request #240: Test suite updates

Posted by GitBox <gi...@apache.org>.
Shanedell commented on code in PR #240:
URL: https://github.com/apache/daffodil-vscode/pull/240#discussion_r975733093


##########
yarn.lock:
##########
@@ -8,22 +8,22 @@
   integrity sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==
 
 "@grpc/grpc-js@^1.5.4":
-  version "1.6.7"
-  resolved "https://registry.yarnpkg.com/@grpc/grpc-js/-/grpc-js-1.6.7.tgz#4c4fa998ff719fe859ac19fe977fdef097bb99aa"
-  integrity sha512-eBM03pu9hd3VqDQG+kHahiG1x80RGkkqqRb1Pchcwqej/KkAH95gAvKs6laqaHCycYaPK+TKuNQnOz9UXYA8qw==

Review Comment:
   That was fixed and all the new bundled dependencies (plus their transitive dependencies) were added to the package LICENSE file as they were all MIT licensed.



-- 
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: commits-unsubscribe@daffodil.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [daffodil-vscode] Shanedell commented on a diff in pull request #240: Test suite updates

Posted by GitBox <gi...@apache.org>.
Shanedell commented on code in PR #240:
URL: https://github.com/apache/daffodil-vscode/pull/240#discussion_r976412909


##########
package.json:
##########
@@ -476,5 +477,11 @@
         }
       }
     ]
+  },
+  "__metadata": {
+    "id": "4f1304da-7e65-48f1-9126-0a143e2e5ef2",
+    "publisherDisplayName": "Apache Software Foundation",
+    "publisherId": "4dbc1d1a-d64b-46f8-8756-1c234855f645",

Review Comment:
   I meant to delete this out of the package.json. I think it maybe got added when I had been testing the debugger locally but also have the extension installed from the marketplace as I am not sure 100% where it came from. Would be deleting it be fine?



-- 
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: commits-unsubscribe@daffodil.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [daffodil-vscode] Shanedell commented on pull request #240: Test suite updates

Posted by GitBox <gi...@apache.org>.
Shanedell commented on PR #240:
URL: https://github.com/apache/daffodil-vscode/pull/240#issuecomment-1240034301

   > I've been running the tests this way:
   > 
   > ```
   > npm install
   > npm run pretest
   > npm run test
   > ```
   > 
   > It's beautiful.
   
   @scholarsmate Do not run
   ```bash
   npm run pretest
   ```
   
   That is ran automatically by `npm run test`


-- 
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: commits-unsubscribe@daffodil.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [daffodil-vscode] Shanedell merged pull request #240: Test suite updates

Posted by GitBox <gi...@apache.org>.
Shanedell merged PR #240:
URL: https://github.com/apache/daffodil-vscode/pull/240


-- 
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: commits-unsubscribe@daffodil.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [daffodil-vscode] Shanedell commented on a diff in pull request #240: Test suite updates

Posted by GitBox <gi...@apache.org>.
Shanedell commented on code in PR #240:
URL: https://github.com/apache/daffodil-vscode/pull/240#discussion_r975722021


##########
package.json:
##########
@@ -1,480 +1,489 @@
 {
-  "name": "apache-daffodil-vscode",
-  "displayName": "Apache Daffodil VS Code Extension",
-  "description": "VS Code extension for Apache Daffodil DFDL schema debugging",
-  "version": "1.1.0",
-  "daffodilVersion": "3.3.0",
-  "omegaEditServerHash": "ffabce0d095364d1c863466f522dfa0ac2f0574d6394a82c0239a613bb84baf7c7b9fd92fdb0457e1d3c9321249acc21567d7dcfd6ff0528e0e792da1b487407",
-  "publisher": "asf",
-  "author": "Apache Daffodil",
-  "license": "Apache-2.0",
-  "engines": {
-    "vscode": "^1.55.0"
-  },
-  "icon": "images/daffodil.ico",
-  "categories": [
-    "Debuggers",
-    "Programming Languages"
-  ],
-  "repository": {
-    "type": "git",
-    "url": "https://github.com/apache/daffodil-vscode.git"
-  },
-  "bugs": {
-    "url": "https://github.com/apache/daffodil-vscode/issues"
-  },
-  "scripts": {
-    "omega-edit-download": "node -e \"require('./build/scripts/omega_edit_download.ts').downloadServer()\"",
-    "precompile": "node -p \"'export const LIB_VERSION = ' + JSON.stringify(require('./package.json').version) + ';'\" > src/version.ts",
-    "compile": "tsc -p ./ && yarn omega-edit-download",
-    "lint": "yarn run prettier src -c",
-    "watch": "yarn omega-edit-download && webpack --watch --devtool nosources-source-map --config ./build/extension.webpack.config.js",
-    "watch2": "tsc -watch -p ./",
-    "webpack": "webpack --mode production --config ./build/extension.webpack.config.js",
-    "prepackage": "yarn sbt && yarn install && yarn compile && yarn webpack",
-    "package": "yarn package-setup && yarn package-create",
-    "package-setup": "node -e \"require('./build/scripts/package.ts').setup()\"",
-    "package-create": "node -e \"require('./build/scripts/package.ts').create()\"",
-    "pretest": "yarn run compile",
-    "test": "node node_modules/mocha/bin/_mocha -u tdd --timeout 999999 --colors ./out/tests",
-    "sbt": "sbt universal:packageBin"
-  },
-  "dependencies": {
-    "@grpc/grpc-js": "^1.5.4",
-    "@types/moo": "^0.5.5",
-    "await-notify": "1.0.1",
-    "child_process": "1.0.2",
-    "google-protobuf": "3.20.1",
-    "hexy": "0.3.4",
-    "moo": "0.5.1",
-    "omega-edit": "0.9.20",
-    "unzip-stream": "0.3.1",
-    "vscode-debugadapter": "1.51.0",
-    "xdg-app-paths": "7.3.0"
-  },
-  "devDependencies": {
-    "@types/glob": "^7.1.3",
-    "@types/mocha": "^9.1.1",
-    "@types/node": "^18.0.0",
-    "@types/vscode": "^1.55.0",
-    "glob": "8.0.3",
-    "mocha": "10.0.0",
-    "prettier": "2.7.1",
-    "ts-loader": "8.1.0",
-    "typescript": "4.3.5",
-    "vsce": "2.9.2",
-    "vscode-debugadapter-testsupport": "1.51.0",
-    "webpack": "5.73.0",
-    "webpack-cli": "4.10.0"
-  },
-  "extensionDependencies": [
-    "vincaslt.highlight-matching-tag"
-  ],
-  "main": "./dist/ext/extension.js",
-  "activationEvents": [
-    "onLanguage:dfdl",
-    "onDebugResolve:dfdl",
-    "onDebugDynamicConfigurations:dfdl",
-    "onCommand:extension.dfdl-debug.getProgramName",
-    "onCommand:extension.dfdl-debug.getDataName",
-    "onCommand:extension.dfdl-debug.runEditorContents",
-    "onCommand:extension.dfdl-debug.debugEditorContents",
-    "onCommand:launch.config",
-    "onCommand:data.edit",
-    "onCommand:omega_edit.version",
-    "onCommand:toggle.experimental",
-    "onCommand:extension.dfdl-debug.debugLastEditorContents"
-  ],
-  "workspaceTrust": {
-    "request": "never"
-  },
-  "contributes": {
-    "languages": [
-      {
-        "id": "dfdl",
-        "aliases": [
-          "dfdl"
-        ],
-        "extensions": [
-          ".dfdl.xsd"
-        ],
-        "configuration": "./language/dfdl.json"
-      }
-    ],
-    "grammars": [
-      {
-        "language": "dfdl",
-        "scopeName": "text.xml.dfdl.xsd",
-        "path": "./language/syntaxes/dfdl.tmLanguage.json"
-      }
-    ],
-    "menus": {
-      "editor/title": [
-        {
-          "command": "launch.config",
-          "group": "navigation@1"
-        },
-        {
-          "command": "hexview.display",
-          "when": "resourceLangId == dfdl",
-          "group": "navigation@4"
-        },
-        {
-          "command": "infoset.display",
-          "when": "resourceLangId == dfdl",
-          "group": "navigation@2"
-        },
-        {
-          "command": "infoset.diff",
-          "when": "resourceLangId == dfdl",
-          "group": "navigation@3"
-        }
-      ],
-      "editor/title/run": [
-        {
-          "command": "extension.dfdl-debug.runEditorContents",
-          "when": "resourceLangId == dfdl"
-        },
-        {
-          "command": "extension.dfdl-debug.debugEditorContents",
-          "when": "resourceLangId == dfdl"
-        },
-        {
-          "command": "extension.dfdl-debug.debugLastEditorContents",
-          "when": "resourceLangId == dfdl"
-        }
-      ],
-      "commandPalette": [
-        {
-          "command": "extension.dfdl-debug.debugEditorContents",
-          "when": "resourceLangId == dfdl"
-        },
-        {
-          "command": "extension.dfdl-debug.runEditorContents",
-          "when": "resourceLangId == dfdl"
-        },
-        {
-          "command": "data.edit",
-          "enablement": "experimentalFeaturesEnabled"
-        },
-        {
-          "command": "omega_edit.version",
-          "enablement": "experimentalFeaturesEnabled"
-        },
-        {
-          "command": "toggle.experimental"
-        },
-        {
-          "command": "extension.dfdl-debug.debugLastEditorContents",
-          "when": "resourceLangId == dfdl"
-        }
-      ],
-      "debug/variables/context": [
-        {
-          "command": "extension.dfdl-debug.toggleFormatting",
-          "when": "debugType == 'dfdl' && debugProtocolVariableMenuContext == 'simple'"
-        }
-      ]
-    },
-    "commands": [
-      {
-        "command": "extension.dfdl-debug.debugEditorContents",
-        "title": "Debug File",
-        "category": "Daffodil Debug",
-        "enablement": "!inDebugMode",
-        "icon": "$(debug-alt)"
-      },
-      {
-        "command": "extension.dfdl-debug.runEditorContents",
-        "title": "Run File",
-        "category": "Daffodil Debug",
-        "enablement": "!inDebugMode",
-        "icon": "$(play)"
-      },
-      {
-        "command": "extension.dfdl-debug.debugLastEditorContents",
-        "title": "Debug Last File",
-        "category": "Daffodil Debug",
-        "enablement": "!inDebugMode",
-        "icon": "$(debug-alt)"
-      },
-      {
-        "command": "extension.dfdl-debug.toggleFormatting",
-        "title": "Toggle between decimal and hex formatting",
-        "category": "Daffodil Debug",
-        "enablement": "inDebugMode"
-      },
-      {
-        "command": "hexview.display",
-        "title": "Display the hex view",
-        "category": "Daffodil Debug",
-        "enablement": "inDebugMode",
-        "icon": "$(file-binary)"
-      },
-      {
-        "command": "infoset.display",
-        "title": "Display the infoset view",
-        "category": "Daffodil Debug",
-        "enablement": "inDebugMode",
-        "icon": "$(file-code)"
-      },
-      {
-        "command": "infoset.diff",
-        "title": "View infoset diff",
-        "category": "Daffodil Debug",
-        "enablement": "inDebugMode",
-        "icon": "$(diff)"
-      },
-      {
-        "command": "infoset.save",
-        "title": "Save the current infoset",
-        "category": "Daffodil Debug",
-        "enablement": "inDebugMode"
-      },
-      {
-        "command": "launch.config",
-        "title": "Configure launch.json",
-        "category": "Daffodil Debug",
-        "enablement": "!inDebugMode",
-        "icon": "$(debug-configure)"
-      },
-      {
-        "command": "toggle.experimental",
-        "title": "Enable Experimental Features",
-        "category": "Daffodil Debug"
-      },
-      {
-        "command": "omega_edit.version",
-        "title": "Omega Edit Ω Version Info",
-        "category": "OmegaEdit",
-        "enablement": "experimentalFeaturesEnabled"
-      },
-      {
-        "command": "data.edit",
-        "title": "Data Editor",
-        "category": "OmegaEdit",
-        "enablement": "experimentalFeaturesEnabled"
-      },
-      {
-        "command": "position.goto",
-        "title": "Go to position",
-        "category": "OmegaEdit",
-        "enablement": "experimentalFeaturesEnabled"
-      }
-    ],
-    "keybindings": [
-      {
-        "command": "position.goto",
-        "key": "ctrl+alt+g",
-        "mac": "ctrl+cmd+g",
-        "when": "editorTextFocus"
-      }
-    ],
-    "breakpoints": [
-      {
-        "language": "dfdl"
-      }
-    ],
-    "debuggers": [
-      {
-        "type": "dfdl",
-        "languages": [
-          "dfdl"
-        ],
-        "label": "Daffodil Debug",
-        "program": "./out/extension.js",
-        "runtime": "node",
-        "configurationAttributes": {
-          "launch": {
-            "required": [
-              "program",
-              "data"
-            ],
-            "properties": {
-              "program": {
-                "type": "string",
-                "description": "Absolute path to the DFDL schema file.",
-                "default": "${command:AskForProgramName}"
-              },
-              "data": {
-                "type": "string",
-                "description": "Absolute path to the input data file.",
-                "default": "${command:AskForDataName}"
-              },
-              "infosetOutput": {
-                "type": "object",
-                "description": "Destination for final Infoset (file-path | 'console' | 'none')",
-                "default": {
-                  "type": "console",
-                  "path": "${workspaceFolder}/infoset.xml"
-                }
-              },
-              "stopOnEntry": {
-                "type": "boolean",
-                "description": "Automatically stop after launch.",
-                "default": true
-              },
-              "trace": {
-                "type": "boolean",
-                "description": "Enable logging of the Debug Adapter Protocol.",
-                "default": true
-              },
-              "debugServer": {
-                "type": "integer",
-                "description": "Port debug server running on",
-                "default": 4711
-              },
-              "useExistingServer": {
-                "type": "boolean",
-                "description": "Enable connection to running DAP Server",
-                "default": false
-              },
-              "openHexView": {
-                "type": "boolean",
-                "description": "Open hexview on debug start",
-                "default": false
-              },
-              "openInfosetView": {
-                "type": "boolean",
-                "description": "Open hexview on debug start",
-                "default": false
-              },
-              "openInfosetDiffView": {
-                "type": "boolean",
-                "description": "Open hexview on debug start",
-                "default": false
-              },
-              "daffodilDebugClasspath": {
-                "type": "string",
-                "description": "Additional classpaths to be exported to the debugger",
-                "default": ""
-              }
-            }
-          }
-        },
-        "initialConfigurations": [
-          {
-            "type": "dfdl",
-            "request": "launch",
-            "name": "Ask for file name",
-            "program": "${command:AskForProgramName}",
-            "stopOnEntry": true,
-            "data": "${command:AskForDataName}",
-            "infosetOutput": {
-              "type": "file",
-              "path": "${workspaceFolder}/infoset.xml"
-            },
-            "debugServer": 4711,
-            "openHexView": false,
-            "openInfosetView": false,
-            "openInfosetDiffView": false,
-            "daffodilDebugClasspath": ""
-          }
-        ],
-        "configurationSnippets": [
-          {
-            "label": "Daffodil Debug: Launch",
-            "description": "A new configuration for 'debugging' a user selected xml file.",
-            "body": {
-              "type": "dfdl",
-              "request": "launch",
-              "name": "Ask for file name",
-              "program": "^\"\\${command:AskForProgramName}\"",
-              "stopOnEntry": true,
-              "data": "^\"\\${command:AskForDataName}\"",
-              "infosetOutput": {
-                "type": "file",
-                "path": "${workspaceFolder}/infoset.xml"
-              },
-              "debugServer": 4711,
-              "openHexView": false,
-              "openInfosetView": false,
-              "openInfosetDiffView": false,
-              "daffodilDebugClasspath": ""
-            }
-          }
-        ],
-        "variables": {
-          "AskForProgramName": "extension.dfdl-debug.getProgramName",
-          "AskForDataName": "extension.dfdl-debug.getDataName"
-        }
-      }
-    ],
-    "configuration": [
-      {
-        "title": "Daffodil Debugger Global",
-        "properties": {
-          "type": {
-            "type": "string",
-            "default": "dfdl"
-          },
-          "program": {
-            "type": "string",
-            "description": "Absolute path to the DFDL schema file.",
-            "default": "${command:AskForProgramName}"
-          },
-          "data": {
-            "type": "string",
-            "description": "Absolute path to the input data file.",
-            "default": "${command:AskForDataName}"
-          },
-          "infosetOutputType": {
-            "type": "string",
-            "description": "Destination for final Infoset (file | 'console' | 'none')",
-            "enum": [
-              "file",
-              "console",
-              "none"
-            ],
-            "default": "none"
-          },
-          "infosetOutputFilePath": {
-            "type": "string",
-            "description": "Path to output for Infoset file (req: infosetOutput=file)",
-            "default": "${workspaceFolder}/infoset.xml"
-          },
-          "stopOnEntry": {
-            "type": "boolean",
-            "description": "Automatically stop after launch.",
-            "default": true
-          },
-          "trace": {
-            "type": "boolean",
-            "description": "Enable logging of the Debug Adapter Protocol.",
-            "default": true
-          },
-          "useExistingServer": {
-            "type": "boolean",
-            "description": "Enable connection to running DAP Server",
-            "default": false
-          },
-          "debugServer": {
-            "type": "integer",
-            "description": "Port debug server running on",
-            "default": 4711
-          },
-          "openHexView": {
-            "type": "boolean",
-            "description": "Open hexview on debug start",
-            "default": false
-          },
-          "openInfosetView": {
-            "type": "boolean",
-            "description": "Open hexview on debug start",
-            "default": false
-          },
-          "openInfosetDiffView": {
-            "type": "boolean",
-            "description": "Open hexview on debug start",
-            "default": false
-          },
-          "daffodilDebugClasspath": {
-            "type": "string",
-            "description": "Additional classpaths to be exported to the debugger",
-            "default": ""
-          }
-        }
-      }
-    ]
-  }
+	"name": "apache-daffodil-vscode",

Review Comment:
   Yeah I am not sure why, how would we fix it?



-- 
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: commits-unsubscribe@daffodil.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [daffodil-vscode] mbeckerle commented on a diff in pull request #240: Test suite updates

Posted by GitBox <gi...@apache.org>.
mbeckerle commented on code in PR #240:
URL: https://github.com/apache/daffodil-vscode/pull/240#discussion_r975801093


##########
src/tests/suite/daffodil.test.ts:
##########
@@ -142,4 +150,138 @@ suite('Daffodfil', () => {
       assert.strictEqual(daffodilVersion, '0.0.0')
     })
   })
+
+  suite('non-debug specifc commands', () => {
+    const nonDebugSpecificCmds = [
+      'extension.dfdl-debug.debugEditorContents',
+      'extension.dfdl-debug.runEditorContents',
+      'launch.config',
+    ]
+
+    // This breaks when the omega-edit tests run for some reason

Review Comment:
   Should a ticket be created for this mystery?



##########
src/language/providers/intellisense/commonItems.ts:
##########
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+// prettier-ignore
+export const commonCompletion = (additionalItems) => {
+  return {
+    items: [
+      {
+        item: 'type=',
+        snippetString: 'type="${1|xs:string,xs:decimal,xs:float,xs:double,xs:integer,xs:nonNegativeInteger,xs:int,xs:unsignedInt,xs:short,xs:unsignedShort,xs:long,xs:unsignedLong,xs:byte,xs:unsignedByte,xs:hexBinary,xs:boolean' + additionalItems + '|}"$0',
+        markdownString: 'attribute to specify a simple type element type',

Review Comment:
   Awkward. Maybe 'an attribute which specifies the type of a simply-typed element'



##########
src/tests/suite/daffodil.test.ts:
##########
@@ -142,4 +150,138 @@ suite('Daffodfil', () => {
       assert.strictEqual(daffodilVersion, '0.0.0')
     })
   })
+
+  suite('non-debug specifc commands', () => {
+    const nonDebugSpecificCmds = [
+      'extension.dfdl-debug.debugEditorContents',
+      'extension.dfdl-debug.runEditorContents',
+      'launch.config',
+    ]
+
+    // This breaks when the omega-edit tests run for some reason
+    // test('Available by default', () => {
+    //   nonDebugSpecificCmds.forEach(async (cmd) => {
+    //     assert.strictEqual(
+    //       (await vscode.commands.getCommands()).includes(cmd),
+    //       true
+    //     )
+    //   })
+    // })
+
+    test('Not available when inDebugMode', () => {
+      vscode.commands.executeCommand('setContext', 'inDebugMode', true)
+
+      nonDebugSpecificCmds.forEach(async (cmd) => {
+        assert.strictEqual(
+          (await vscode.commands.getCommands()).includes(cmd),
+          false
+        )
+      })
+    })
+  })
+
+  suite('debug specifc commands', () => {
+    const debugSpecificCmds = [
+      'extension.dfdl-debug.toggleFormatting',
+      'hexview.display',
+      'infoset.display',
+      'infoset.diff',
+      'infoset.save',
+    ]
+
+    test('Not available by default', () => {
+      debugSpecificCmds.forEach(async (cmd) => {
+        assert.strictEqual(
+          (await vscode.commands.getCommands()).includes(cmd),
+          false
+        )
+      })
+    })
+
+    // This breaks when the omega-edit tests run for some reason
+    // test('Available when inDebugMode', () => {
+    //   vscode.commands.executeCommand('setContext', 'inDebugMode', true)
+
+    //   debugSpecificCmds.forEach(async (cmd) => {
+    //     assert.strictEqual(
+    //       (await vscode.commands.getCommands()).includes(cmd),
+    //       true
+    //     )
+    //   })
+    // })
+  })
+
+  suite('getCommands', () => {
+    test('getProgramName file exists', async () => {
+      assert.strictEqual(
+        await vscode.commands.executeCommand(
+          'extension.dfdl-debug.getProgramName',
+          testDfdlFile
+        ),
+        testDfdlFile
+      )
+    })
+
+    test('getProgramName file does not exists', async () => {
+      let file = path.join(__dirname, '../data/test.dfdl.xsd')
+
+      assert.notStrictEqual(
+        await vscode.commands.executeCommand(
+          'extension.dfdl-debug.getProgramName',
+          file
+        ),
+        file
+      )
+    })
+
+    test('getDataName file exists', async () => {
+      assert.strictEqual(
+        await vscode.commands.executeCommand(
+          'extension.dfdl-debug.getDataName',
+          testDfdlFile
+        ),
+        testDfdlFile
+      )
+    })
+
+    test('getDataName file does not exists', async () => {
+      let file = path.join(__dirname, '../data/test.dfdl.xsd')
+
+      assert.notStrictEqual(
+        await vscode.commands.executeCommand(
+          'extension.dfdl-debug.getDataName',
+          file
+        ),
+        file
+      )
+    })
+  })
+
+  suite('artifact attributes', () => {
+    const packageName = 'daffodil-debugger'
+    const packageVersion = '1.0.0'
+    const scriptName = 'daffodil-debugger'
+    const artifact = new Artifact(packageName, packageVersion, scriptName)
+
+    test('name set properly', () => {
+      assert.strictEqual(
+        artifact.name,
+        `${packageName}-${packageVersion}-${LIB_VERSION}`
+      )
+    })
+
+    test('archive set properly', () => {
+      assert.strictEqual(
+        artifact.archive,
+        `${packageName}-${packageVersion}-${LIB_VERSION}.zip`
+      )
+    })
+
+    test('scriptName set properly', () => {
+      assert.strictEqual(
+        artifact.scriptName,
+        os.platform() === 'win32' ? `${scriptName}.bat` : `./${scriptName}`

Review Comment:
   Definitely make it a goal to use a library that suppresses all these platform conditionalizations before they proliferate. 
   
   As people add new tests they should NOT copy this. 
   
   We didn't do that soon enough in the daffodil-cli test rig, and the code-volume legacy of these sort of trivial conditionalization literring that test code is way too high. 



##########
src/tests/suite/index.ts:
##########
@@ -0,0 +1,56 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import * as path from 'path'
+const Mocha = require('mocha')
+const glob = require('glob')
+
+export function run(): Promise<void> {
+  // Create the mocha test
+  const mocha = new Mocha({
+    ui: 'tdd',
+    color: true,
+    timeout: 999999,
+  })
+
+  const testsRoot = path.resolve(__dirname, '..')
+
+  return new Promise((c, e) => {
+    glob('**/**.test.js', { cwd: testsRoot }, (err, files) => {
+      if (err) {
+        return e(err)
+      }
+
+      // Add files to the test suite
+      files.forEach((f) => mocha.addFile(path.resolve(testsRoot, f)))
+
+      try {
+        // Run the mocha test

Review Comment:
   What's this "mocha" test thing? Comment should prob. just be deleted, as it's obvious you are doing mocha.run(....). 
   
   But this suggests need a comment above at line 19. Why would one want to run this test suite? Who created it and named it Mocha anyway? 



-- 
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: commits-unsubscribe@daffodil.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [daffodil-vscode] Shanedell commented on a diff in pull request #240: Test suite updates

Posted by GitBox <gi...@apache.org>.
Shanedell commented on code in PR #240:
URL: https://github.com/apache/daffodil-vscode/pull/240#discussion_r975744117


##########
package.json:
##########
@@ -1,480 +1,489 @@
 {
-  "name": "apache-daffodil-vscode",
-  "displayName": "Apache Daffodil VS Code Extension",
-  "description": "VS Code extension for Apache Daffodil DFDL schema debugging",
-  "version": "1.1.0",
-  "daffodilVersion": "3.3.0",
-  "omegaEditServerHash": "ffabce0d095364d1c863466f522dfa0ac2f0574d6394a82c0239a613bb84baf7c7b9fd92fdb0457e1d3c9321249acc21567d7dcfd6ff0528e0e792da1b487407",
-  "publisher": "asf",
-  "author": "Apache Daffodil",
-  "license": "Apache-2.0",
-  "engines": {
-    "vscode": "^1.55.0"
-  },
-  "icon": "images/daffodil.ico",
-  "categories": [
-    "Debuggers",
-    "Programming Languages"
-  ],
-  "repository": {
-    "type": "git",
-    "url": "https://github.com/apache/daffodil-vscode.git"
-  },
-  "bugs": {
-    "url": "https://github.com/apache/daffodil-vscode/issues"
-  },
-  "scripts": {
-    "omega-edit-download": "node -e \"require('./build/scripts/omega_edit_download.ts').downloadServer()\"",
-    "precompile": "node -p \"'export const LIB_VERSION = ' + JSON.stringify(require('./package.json').version) + ';'\" > src/version.ts",
-    "compile": "tsc -p ./ && yarn omega-edit-download",
-    "lint": "yarn run prettier src -c",
-    "watch": "yarn omega-edit-download && webpack --watch --devtool nosources-source-map --config ./build/extension.webpack.config.js",
-    "watch2": "tsc -watch -p ./",
-    "webpack": "webpack --mode production --config ./build/extension.webpack.config.js",
-    "prepackage": "yarn sbt && yarn install && yarn compile && yarn webpack",
-    "package": "yarn package-setup && yarn package-create",
-    "package-setup": "node -e \"require('./build/scripts/package.ts').setup()\"",
-    "package-create": "node -e \"require('./build/scripts/package.ts').create()\"",
-    "pretest": "yarn run compile",
-    "test": "node node_modules/mocha/bin/_mocha -u tdd --timeout 999999 --colors ./out/tests",
-    "sbt": "sbt universal:packageBin"
-  },
-  "dependencies": {
-    "@grpc/grpc-js": "^1.5.4",
-    "@types/moo": "^0.5.5",
-    "await-notify": "1.0.1",
-    "child_process": "1.0.2",
-    "google-protobuf": "3.20.1",
-    "hexy": "0.3.4",
-    "moo": "0.5.1",
-    "omega-edit": "0.9.20",
-    "unzip-stream": "0.3.1",
-    "vscode-debugadapter": "1.51.0",
-    "xdg-app-paths": "7.3.0"
-  },
-  "devDependencies": {
-    "@types/glob": "^7.1.3",
-    "@types/mocha": "^9.1.1",
-    "@types/node": "^18.0.0",
-    "@types/vscode": "^1.55.0",
-    "glob": "8.0.3",
-    "mocha": "10.0.0",
-    "prettier": "2.7.1",
-    "ts-loader": "8.1.0",
-    "typescript": "4.3.5",
-    "vsce": "2.9.2",
-    "vscode-debugadapter-testsupport": "1.51.0",
-    "webpack": "5.73.0",
-    "webpack-cli": "4.10.0"
-  },
-  "extensionDependencies": [
-    "vincaslt.highlight-matching-tag"
-  ],
-  "main": "./dist/ext/extension.js",
-  "activationEvents": [
-    "onLanguage:dfdl",
-    "onDebugResolve:dfdl",
-    "onDebugDynamicConfigurations:dfdl",
-    "onCommand:extension.dfdl-debug.getProgramName",
-    "onCommand:extension.dfdl-debug.getDataName",
-    "onCommand:extension.dfdl-debug.runEditorContents",
-    "onCommand:extension.dfdl-debug.debugEditorContents",
-    "onCommand:launch.config",
-    "onCommand:data.edit",
-    "onCommand:omega_edit.version",
-    "onCommand:toggle.experimental",
-    "onCommand:extension.dfdl-debug.debugLastEditorContents"
-  ],
-  "workspaceTrust": {
-    "request": "never"
-  },
-  "contributes": {
-    "languages": [
-      {
-        "id": "dfdl",
-        "aliases": [
-          "dfdl"
-        ],
-        "extensions": [
-          ".dfdl.xsd"
-        ],
-        "configuration": "./language/dfdl.json"
-      }
-    ],
-    "grammars": [
-      {
-        "language": "dfdl",
-        "scopeName": "text.xml.dfdl.xsd",
-        "path": "./language/syntaxes/dfdl.tmLanguage.json"
-      }
-    ],
-    "menus": {
-      "editor/title": [
-        {
-          "command": "launch.config",
-          "group": "navigation@1"
-        },
-        {
-          "command": "hexview.display",
-          "when": "resourceLangId == dfdl",
-          "group": "navigation@4"
-        },
-        {
-          "command": "infoset.display",
-          "when": "resourceLangId == dfdl",
-          "group": "navigation@2"
-        },
-        {
-          "command": "infoset.diff",
-          "when": "resourceLangId == dfdl",
-          "group": "navigation@3"
-        }
-      ],
-      "editor/title/run": [
-        {
-          "command": "extension.dfdl-debug.runEditorContents",
-          "when": "resourceLangId == dfdl"
-        },
-        {
-          "command": "extension.dfdl-debug.debugEditorContents",
-          "when": "resourceLangId == dfdl"
-        },
-        {
-          "command": "extension.dfdl-debug.debugLastEditorContents",
-          "when": "resourceLangId == dfdl"
-        }
-      ],
-      "commandPalette": [
-        {
-          "command": "extension.dfdl-debug.debugEditorContents",
-          "when": "resourceLangId == dfdl"
-        },
-        {
-          "command": "extension.dfdl-debug.runEditorContents",
-          "when": "resourceLangId == dfdl"
-        },
-        {
-          "command": "data.edit",
-          "enablement": "experimentalFeaturesEnabled"
-        },
-        {
-          "command": "omega_edit.version",
-          "enablement": "experimentalFeaturesEnabled"
-        },
-        {
-          "command": "toggle.experimental"
-        },
-        {
-          "command": "extension.dfdl-debug.debugLastEditorContents",
-          "when": "resourceLangId == dfdl"
-        }
-      ],
-      "debug/variables/context": [
-        {
-          "command": "extension.dfdl-debug.toggleFormatting",
-          "when": "debugType == 'dfdl' && debugProtocolVariableMenuContext == 'simple'"
-        }
-      ]
-    },
-    "commands": [
-      {
-        "command": "extension.dfdl-debug.debugEditorContents",
-        "title": "Debug File",
-        "category": "Daffodil Debug",
-        "enablement": "!inDebugMode",
-        "icon": "$(debug-alt)"
-      },
-      {
-        "command": "extension.dfdl-debug.runEditorContents",
-        "title": "Run File",
-        "category": "Daffodil Debug",
-        "enablement": "!inDebugMode",
-        "icon": "$(play)"
-      },
-      {
-        "command": "extension.dfdl-debug.debugLastEditorContents",
-        "title": "Debug Last File",
-        "category": "Daffodil Debug",
-        "enablement": "!inDebugMode",
-        "icon": "$(debug-alt)"
-      },
-      {
-        "command": "extension.dfdl-debug.toggleFormatting",
-        "title": "Toggle between decimal and hex formatting",
-        "category": "Daffodil Debug",
-        "enablement": "inDebugMode"
-      },
-      {
-        "command": "hexview.display",
-        "title": "Display the hex view",
-        "category": "Daffodil Debug",
-        "enablement": "inDebugMode",
-        "icon": "$(file-binary)"
-      },
-      {
-        "command": "infoset.display",
-        "title": "Display the infoset view",
-        "category": "Daffodil Debug",
-        "enablement": "inDebugMode",
-        "icon": "$(file-code)"
-      },
-      {
-        "command": "infoset.diff",
-        "title": "View infoset diff",
-        "category": "Daffodil Debug",
-        "enablement": "inDebugMode",
-        "icon": "$(diff)"
-      },
-      {
-        "command": "infoset.save",
-        "title": "Save the current infoset",
-        "category": "Daffodil Debug",
-        "enablement": "inDebugMode"
-      },
-      {
-        "command": "launch.config",
-        "title": "Configure launch.json",
-        "category": "Daffodil Debug",
-        "enablement": "!inDebugMode",
-        "icon": "$(debug-configure)"
-      },
-      {
-        "command": "toggle.experimental",
-        "title": "Enable Experimental Features",
-        "category": "Daffodil Debug"
-      },
-      {
-        "command": "omega_edit.version",
-        "title": "Omega Edit Ω Version Info",
-        "category": "OmegaEdit",
-        "enablement": "experimentalFeaturesEnabled"
-      },
-      {
-        "command": "data.edit",
-        "title": "Data Editor",
-        "category": "OmegaEdit",
-        "enablement": "experimentalFeaturesEnabled"
-      },
-      {
-        "command": "position.goto",
-        "title": "Go to position",
-        "category": "OmegaEdit",
-        "enablement": "experimentalFeaturesEnabled"
-      }
-    ],
-    "keybindings": [
-      {
-        "command": "position.goto",
-        "key": "ctrl+alt+g",
-        "mac": "ctrl+cmd+g",
-        "when": "editorTextFocus"
-      }
-    ],
-    "breakpoints": [
-      {
-        "language": "dfdl"
-      }
-    ],
-    "debuggers": [
-      {
-        "type": "dfdl",
-        "languages": [
-          "dfdl"
-        ],
-        "label": "Daffodil Debug",
-        "program": "./out/extension.js",
-        "runtime": "node",
-        "configurationAttributes": {
-          "launch": {
-            "required": [
-              "program",
-              "data"
-            ],
-            "properties": {
-              "program": {
-                "type": "string",
-                "description": "Absolute path to the DFDL schema file.",
-                "default": "${command:AskForProgramName}"
-              },
-              "data": {
-                "type": "string",
-                "description": "Absolute path to the input data file.",
-                "default": "${command:AskForDataName}"
-              },
-              "infosetOutput": {
-                "type": "object",
-                "description": "Destination for final Infoset (file-path | 'console' | 'none')",
-                "default": {
-                  "type": "console",
-                  "path": "${workspaceFolder}/infoset.xml"
-                }
-              },
-              "stopOnEntry": {
-                "type": "boolean",
-                "description": "Automatically stop after launch.",
-                "default": true
-              },
-              "trace": {
-                "type": "boolean",
-                "description": "Enable logging of the Debug Adapter Protocol.",
-                "default": true
-              },
-              "debugServer": {
-                "type": "integer",
-                "description": "Port debug server running on",
-                "default": 4711
-              },
-              "useExistingServer": {
-                "type": "boolean",
-                "description": "Enable connection to running DAP Server",
-                "default": false
-              },
-              "openHexView": {
-                "type": "boolean",
-                "description": "Open hexview on debug start",
-                "default": false
-              },
-              "openInfosetView": {
-                "type": "boolean",
-                "description": "Open hexview on debug start",
-                "default": false
-              },
-              "openInfosetDiffView": {
-                "type": "boolean",
-                "description": "Open hexview on debug start",
-                "default": false
-              },
-              "daffodilDebugClasspath": {
-                "type": "string",
-                "description": "Additional classpaths to be exported to the debugger",
-                "default": ""
-              }
-            }
-          }
-        },
-        "initialConfigurations": [
-          {
-            "type": "dfdl",
-            "request": "launch",
-            "name": "Ask for file name",
-            "program": "${command:AskForProgramName}",
-            "stopOnEntry": true,
-            "data": "${command:AskForDataName}",
-            "infosetOutput": {
-              "type": "file",
-              "path": "${workspaceFolder}/infoset.xml"
-            },
-            "debugServer": 4711,
-            "openHexView": false,
-            "openInfosetView": false,
-            "openInfosetDiffView": false,
-            "daffodilDebugClasspath": ""
-          }
-        ],
-        "configurationSnippets": [
-          {
-            "label": "Daffodil Debug: Launch",
-            "description": "A new configuration for 'debugging' a user selected xml file.",
-            "body": {
-              "type": "dfdl",
-              "request": "launch",
-              "name": "Ask for file name",
-              "program": "^\"\\${command:AskForProgramName}\"",
-              "stopOnEntry": true,
-              "data": "^\"\\${command:AskForDataName}\"",
-              "infosetOutput": {
-                "type": "file",
-                "path": "${workspaceFolder}/infoset.xml"
-              },
-              "debugServer": 4711,
-              "openHexView": false,
-              "openInfosetView": false,
-              "openInfosetDiffView": false,
-              "daffodilDebugClasspath": ""
-            }
-          }
-        ],
-        "variables": {
-          "AskForProgramName": "extension.dfdl-debug.getProgramName",
-          "AskForDataName": "extension.dfdl-debug.getDataName"
-        }
-      }
-    ],
-    "configuration": [
-      {
-        "title": "Daffodil Debugger Global",
-        "properties": {
-          "type": {
-            "type": "string",
-            "default": "dfdl"
-          },
-          "program": {
-            "type": "string",
-            "description": "Absolute path to the DFDL schema file.",
-            "default": "${command:AskForProgramName}"
-          },
-          "data": {
-            "type": "string",
-            "description": "Absolute path to the input data file.",
-            "default": "${command:AskForDataName}"
-          },
-          "infosetOutputType": {
-            "type": "string",
-            "description": "Destination for final Infoset (file | 'console' | 'none')",
-            "enum": [
-              "file",
-              "console",
-              "none"
-            ],
-            "default": "none"
-          },
-          "infosetOutputFilePath": {
-            "type": "string",
-            "description": "Path to output for Infoset file (req: infosetOutput=file)",
-            "default": "${workspaceFolder}/infoset.xml"
-          },
-          "stopOnEntry": {
-            "type": "boolean",
-            "description": "Automatically stop after launch.",
-            "default": true
-          },
-          "trace": {
-            "type": "boolean",
-            "description": "Enable logging of the Debug Adapter Protocol.",
-            "default": true
-          },
-          "useExistingServer": {
-            "type": "boolean",
-            "description": "Enable connection to running DAP Server",
-            "default": false
-          },
-          "debugServer": {
-            "type": "integer",
-            "description": "Port debug server running on",
-            "default": 4711
-          },
-          "openHexView": {
-            "type": "boolean",
-            "description": "Open hexview on debug start",
-            "default": false
-          },
-          "openInfosetView": {
-            "type": "boolean",
-            "description": "Open hexview on debug start",
-            "default": false
-          },
-          "openInfosetDiffView": {
-            "type": "boolean",
-            "description": "Open hexview on debug start",
-            "default": false
-          },
-          "daffodilDebugClasspath": {
-            "type": "string",
-            "description": "Additional classpaths to be exported to the debugger",
-            "default": ""
-          }
-        }
-      }
-    ]
-  }
+	"name": "apache-daffodil-vscode",

Review Comment:
   @stevedlawrence should be good now



-- 
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: commits-unsubscribe@daffodil.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [daffodil-vscode] Shanedell commented on a diff in pull request #240: Test suite updates

Posted by GitBox <gi...@apache.org>.
Shanedell commented on code in PR #240:
URL: https://github.com/apache/daffodil-vscode/pull/240#discussion_r975727714


##########
yarn.lock:
##########
@@ -8,22 +8,22 @@
   integrity sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==
 
 "@grpc/grpc-js@^1.5.4":
-  version "1.6.7"
-  resolved "https://registry.yarnpkg.com/@grpc/grpc-js/-/grpc-js-1.6.7.tgz#4c4fa998ff719fe859ac19fe977fdef097bb99aa"
-  integrity sha512-eBM03pu9hd3VqDQG+kHahiG1x80RGkkqqRb1Pchcwqej/KkAH95gAvKs6laqaHCycYaPK+TKuNQnOz9UXYA8qw==

Review Comment:
   Actually `@vscode/test-electron` should only be dev dependencies and not be packages I will fix that



-- 
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: commits-unsubscribe@daffodil.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [daffodil-vscode] Shanedell commented on a diff in pull request #240: Test suite updates

Posted by GitBox <gi...@apache.org>.
Shanedell commented on code in PR #240:
URL: https://github.com/apache/daffodil-vscode/pull/240#discussion_r975889182


##########
src/tests/suite/daffodil.test.ts:
##########
@@ -142,4 +150,138 @@ suite('Daffodfil', () => {
       assert.strictEqual(daffodilVersion, '0.0.0')
     })
   })
+
+  suite('non-debug specifc commands', () => {
+    const nonDebugSpecificCmds = [
+      'extension.dfdl-debug.debugEditorContents',
+      'extension.dfdl-debug.runEditorContents',
+      'launch.config',
+    ]
+
+    // This breaks when the omega-edit tests run for some reason
+    // test('Available by default', () => {
+    //   nonDebugSpecificCmds.forEach(async (cmd) => {
+    //     assert.strictEqual(
+    //       (await vscode.commands.getCommands()).includes(cmd),
+    //       true
+    //     )
+    //   })
+    // })
+
+    test('Not available when inDebugMode', () => {
+      vscode.commands.executeCommand('setContext', 'inDebugMode', true)
+
+      nonDebugSpecificCmds.forEach(async (cmd) => {
+        assert.strictEqual(
+          (await vscode.commands.getCommands()).includes(cmd),
+          false
+        )
+      })
+    })
+  })
+
+  suite('debug specifc commands', () => {
+    const debugSpecificCmds = [
+      'extension.dfdl-debug.toggleFormatting',
+      'hexview.display',
+      'infoset.display',
+      'infoset.diff',
+      'infoset.save',
+    ]
+
+    test('Not available by default', () => {
+      debugSpecificCmds.forEach(async (cmd) => {
+        assert.strictEqual(
+          (await vscode.commands.getCommands()).includes(cmd),
+          false
+        )
+      })
+    })
+
+    // This breaks when the omega-edit tests run for some reason
+    // test('Available when inDebugMode', () => {
+    //   vscode.commands.executeCommand('setContext', 'inDebugMode', true)
+
+    //   debugSpecificCmds.forEach(async (cmd) => {
+    //     assert.strictEqual(
+    //       (await vscode.commands.getCommands()).includes(cmd),
+    //       true
+    //     )
+    //   })
+    // })
+  })
+
+  suite('getCommands', () => {
+    test('getProgramName file exists', async () => {
+      assert.strictEqual(
+        await vscode.commands.executeCommand(
+          'extension.dfdl-debug.getProgramName',
+          testDfdlFile
+        ),
+        testDfdlFile
+      )
+    })
+
+    test('getProgramName file does not exists', async () => {
+      let file = path.join(__dirname, '../data/test.dfdl.xsd')
+
+      assert.notStrictEqual(
+        await vscode.commands.executeCommand(
+          'extension.dfdl-debug.getProgramName',
+          file
+        ),
+        file
+      )
+    })
+
+    test('getDataName file exists', async () => {
+      assert.strictEqual(
+        await vscode.commands.executeCommand(
+          'extension.dfdl-debug.getDataName',
+          testDfdlFile
+        ),
+        testDfdlFile
+      )
+    })
+
+    test('getDataName file does not exists', async () => {
+      let file = path.join(__dirname, '../data/test.dfdl.xsd')
+
+      assert.notStrictEqual(
+        await vscode.commands.executeCommand(
+          'extension.dfdl-debug.getDataName',
+          file
+        ),
+        file
+      )
+    })
+  })
+
+  suite('artifact attributes', () => {
+    const packageName = 'daffodil-debugger'
+    const packageVersion = '1.0.0'
+    const scriptName = 'daffodil-debugger'
+    const artifact = new Artifact(packageName, packageVersion, scriptName)
+
+    test('name set properly', () => {
+      assert.strictEqual(
+        artifact.name,
+        `${packageName}-${packageVersion}-${LIB_VERSION}`
+      )
+    })
+
+    test('archive set properly', () => {
+      assert.strictEqual(
+        artifact.archive,
+        `${packageName}-${packageVersion}-${LIB_VERSION}.zip`
+      )
+    })
+
+    test('scriptName set properly', () => {
+      assert.strictEqual(
+        artifact.scriptName,
+        os.platform() === 'win32' ? `${scriptName}.bat` : `./${scriptName}`

Review Comment:
   Created issue #301 to handle looking into this



-- 
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: commits-unsubscribe@daffodil.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [daffodil-vscode] scholarsmate commented on a diff in pull request #240: Test suite updates

Posted by GitBox <gi...@apache.org>.
scholarsmate commented on code in PR #240:
URL: https://github.com/apache/daffodil-vscode/pull/240#discussion_r965324998


##########
src/adapter/activateDaffodilDebug.ts:
##########
@@ -24,6 +24,35 @@ import * as launchWizard from '../launchWizard/launchWizard'
 import * as omegaEditClient from '../omega_edit/client'
 import * as dfdlLang from '../language/dfdl'
 
+// Method to file path for program and data

Review Comment:
   Yeah, I just googled that and found http://typedoc.org/example/ (among some other options).  Would be good to integrate something, and I can do the same on the Ωedit side since the TypeScript client there is a "public facing" API.  Scala has ScalaDoc, and I'm using Doxygen for the C and C++ API.



-- 
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: commits-unsubscribe@daffodil.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [daffodil-vscode] scholarsmate commented on a diff in pull request #240: Test suite updates

Posted by GitBox <gi...@apache.org>.
scholarsmate commented on code in PR #240:
URL: https://github.com/apache/daffodil-vscode/pull/240#discussion_r967170083


##########
.vscode/launch.json:
##########
@@ -33,20 +33,31 @@
 		},
 		{
 			"name": "Tests",
-			"type": "node",
+			// "name": "Extension Tests",

Review Comment:
   Remove comment



##########
.vscode/launch.json:
##########
@@ -33,20 +33,31 @@
 		},
 		{
 			"name": "Tests",
-			"type": "node",
+			// "name": "Extension Tests",
+			"type": "extensionHost",
 			"request": "launch",
-			"cwd": "${workspaceFolder}",
-			"program": "${workspaceFolder}/node_modules/mocha/bin/_mocha",
+			"runtimeExecutable": "${execPath}",
 			"args": [
-				"-u", "tdd",
-				"--timeout", "999999",
-				"--colors",
-				"./out/tests/"
+				"--extensionDevelopmentPath=${workspaceFolder}",
+				"--extensionTestsPath=${workspaceFolder}/out/tests/suite"
 			],
 			"outFiles": [
-				"${workspaceFolder}/out/**/*.js"
+				"${workspaceFolder}/out/tests/**/*.js",
 			],
-			"internalConsoleOptions": "openOnSessionStart",
+			// "type": "node",
+			// "request": "launch",
+			// "cwd": "${workspaceFolder}",
+			// "program": "${workspaceFolder}/node_modules/mocha/bin/_mocha",
+			// "args": [
+			// 	"-u", "tdd",
+			// 	"--timeout", "999999",
+			// 	"--colors",
+			// 	"./out/tests/"
+			// ],
+			// "outFiles": [
+			// 	"${workspaceFolder}/out/**/*.js"
+			// ],
+			// "internalConsoleOptions": "openOnSessionStart",

Review Comment:
   Remove commented out lines.



-- 
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: commits-unsubscribe@daffodil.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [daffodil-vscode] Shanedell commented on a diff in pull request #240: Test suite updates

Posted by GitBox <gi...@apache.org>.
Shanedell commented on code in PR #240:
URL: https://github.com/apache/daffodil-vscode/pull/240#discussion_r975741094


##########
package.json:
##########
@@ -1,480 +1,489 @@
 {
-  "name": "apache-daffodil-vscode",
-  "displayName": "Apache Daffodil VS Code Extension",
-  "description": "VS Code extension for Apache Daffodil DFDL schema debugging",
-  "version": "1.1.0",
-  "daffodilVersion": "3.3.0",
-  "omegaEditServerHash": "ffabce0d095364d1c863466f522dfa0ac2f0574d6394a82c0239a613bb84baf7c7b9fd92fdb0457e1d3c9321249acc21567d7dcfd6ff0528e0e792da1b487407",
-  "publisher": "asf",
-  "author": "Apache Daffodil",
-  "license": "Apache-2.0",
-  "engines": {
-    "vscode": "^1.55.0"
-  },
-  "icon": "images/daffodil.ico",
-  "categories": [
-    "Debuggers",
-    "Programming Languages"
-  ],
-  "repository": {
-    "type": "git",
-    "url": "https://github.com/apache/daffodil-vscode.git"
-  },
-  "bugs": {
-    "url": "https://github.com/apache/daffodil-vscode/issues"
-  },
-  "scripts": {
-    "omega-edit-download": "node -e \"require('./build/scripts/omega_edit_download.ts').downloadServer()\"",
-    "precompile": "node -p \"'export const LIB_VERSION = ' + JSON.stringify(require('./package.json').version) + ';'\" > src/version.ts",
-    "compile": "tsc -p ./ && yarn omega-edit-download",
-    "lint": "yarn run prettier src -c",
-    "watch": "yarn omega-edit-download && webpack --watch --devtool nosources-source-map --config ./build/extension.webpack.config.js",
-    "watch2": "tsc -watch -p ./",
-    "webpack": "webpack --mode production --config ./build/extension.webpack.config.js",
-    "prepackage": "yarn sbt && yarn install && yarn compile && yarn webpack",
-    "package": "yarn package-setup && yarn package-create",
-    "package-setup": "node -e \"require('./build/scripts/package.ts').setup()\"",
-    "package-create": "node -e \"require('./build/scripts/package.ts').create()\"",
-    "pretest": "yarn run compile",
-    "test": "node node_modules/mocha/bin/_mocha -u tdd --timeout 999999 --colors ./out/tests",
-    "sbt": "sbt universal:packageBin"
-  },
-  "dependencies": {
-    "@grpc/grpc-js": "^1.5.4",
-    "@types/moo": "^0.5.5",
-    "await-notify": "1.0.1",
-    "child_process": "1.0.2",
-    "google-protobuf": "3.20.1",
-    "hexy": "0.3.4",
-    "moo": "0.5.1",
-    "omega-edit": "0.9.20",
-    "unzip-stream": "0.3.1",
-    "vscode-debugadapter": "1.51.0",
-    "xdg-app-paths": "7.3.0"
-  },
-  "devDependencies": {
-    "@types/glob": "^7.1.3",
-    "@types/mocha": "^9.1.1",
-    "@types/node": "^18.0.0",
-    "@types/vscode": "^1.55.0",
-    "glob": "8.0.3",
-    "mocha": "10.0.0",
-    "prettier": "2.7.1",
-    "ts-loader": "8.1.0",
-    "typescript": "4.3.5",
-    "vsce": "2.9.2",
-    "vscode-debugadapter-testsupport": "1.51.0",
-    "webpack": "5.73.0",
-    "webpack-cli": "4.10.0"
-  },
-  "extensionDependencies": [
-    "vincaslt.highlight-matching-tag"
-  ],
-  "main": "./dist/ext/extension.js",
-  "activationEvents": [
-    "onLanguage:dfdl",
-    "onDebugResolve:dfdl",
-    "onDebugDynamicConfigurations:dfdl",
-    "onCommand:extension.dfdl-debug.getProgramName",
-    "onCommand:extension.dfdl-debug.getDataName",
-    "onCommand:extension.dfdl-debug.runEditorContents",
-    "onCommand:extension.dfdl-debug.debugEditorContents",
-    "onCommand:launch.config",
-    "onCommand:data.edit",
-    "onCommand:omega_edit.version",
-    "onCommand:toggle.experimental",
-    "onCommand:extension.dfdl-debug.debugLastEditorContents"
-  ],
-  "workspaceTrust": {
-    "request": "never"
-  },
-  "contributes": {
-    "languages": [
-      {
-        "id": "dfdl",
-        "aliases": [
-          "dfdl"
-        ],
-        "extensions": [
-          ".dfdl.xsd"
-        ],
-        "configuration": "./language/dfdl.json"
-      }
-    ],
-    "grammars": [
-      {
-        "language": "dfdl",
-        "scopeName": "text.xml.dfdl.xsd",
-        "path": "./language/syntaxes/dfdl.tmLanguage.json"
-      }
-    ],
-    "menus": {
-      "editor/title": [
-        {
-          "command": "launch.config",
-          "group": "navigation@1"
-        },
-        {
-          "command": "hexview.display",
-          "when": "resourceLangId == dfdl",
-          "group": "navigation@4"
-        },
-        {
-          "command": "infoset.display",
-          "when": "resourceLangId == dfdl",
-          "group": "navigation@2"
-        },
-        {
-          "command": "infoset.diff",
-          "when": "resourceLangId == dfdl",
-          "group": "navigation@3"
-        }
-      ],
-      "editor/title/run": [
-        {
-          "command": "extension.dfdl-debug.runEditorContents",
-          "when": "resourceLangId == dfdl"
-        },
-        {
-          "command": "extension.dfdl-debug.debugEditorContents",
-          "when": "resourceLangId == dfdl"
-        },
-        {
-          "command": "extension.dfdl-debug.debugLastEditorContents",
-          "when": "resourceLangId == dfdl"
-        }
-      ],
-      "commandPalette": [
-        {
-          "command": "extension.dfdl-debug.debugEditorContents",
-          "when": "resourceLangId == dfdl"
-        },
-        {
-          "command": "extension.dfdl-debug.runEditorContents",
-          "when": "resourceLangId == dfdl"
-        },
-        {
-          "command": "data.edit",
-          "enablement": "experimentalFeaturesEnabled"
-        },
-        {
-          "command": "omega_edit.version",
-          "enablement": "experimentalFeaturesEnabled"
-        },
-        {
-          "command": "toggle.experimental"
-        },
-        {
-          "command": "extension.dfdl-debug.debugLastEditorContents",
-          "when": "resourceLangId == dfdl"
-        }
-      ],
-      "debug/variables/context": [
-        {
-          "command": "extension.dfdl-debug.toggleFormatting",
-          "when": "debugType == 'dfdl' && debugProtocolVariableMenuContext == 'simple'"
-        }
-      ]
-    },
-    "commands": [
-      {
-        "command": "extension.dfdl-debug.debugEditorContents",
-        "title": "Debug File",
-        "category": "Daffodil Debug",
-        "enablement": "!inDebugMode",
-        "icon": "$(debug-alt)"
-      },
-      {
-        "command": "extension.dfdl-debug.runEditorContents",
-        "title": "Run File",
-        "category": "Daffodil Debug",
-        "enablement": "!inDebugMode",
-        "icon": "$(play)"
-      },
-      {
-        "command": "extension.dfdl-debug.debugLastEditorContents",
-        "title": "Debug Last File",
-        "category": "Daffodil Debug",
-        "enablement": "!inDebugMode",
-        "icon": "$(debug-alt)"
-      },
-      {
-        "command": "extension.dfdl-debug.toggleFormatting",
-        "title": "Toggle between decimal and hex formatting",
-        "category": "Daffodil Debug",
-        "enablement": "inDebugMode"
-      },
-      {
-        "command": "hexview.display",
-        "title": "Display the hex view",
-        "category": "Daffodil Debug",
-        "enablement": "inDebugMode",
-        "icon": "$(file-binary)"
-      },
-      {
-        "command": "infoset.display",
-        "title": "Display the infoset view",
-        "category": "Daffodil Debug",
-        "enablement": "inDebugMode",
-        "icon": "$(file-code)"
-      },
-      {
-        "command": "infoset.diff",
-        "title": "View infoset diff",
-        "category": "Daffodil Debug",
-        "enablement": "inDebugMode",
-        "icon": "$(diff)"
-      },
-      {
-        "command": "infoset.save",
-        "title": "Save the current infoset",
-        "category": "Daffodil Debug",
-        "enablement": "inDebugMode"
-      },
-      {
-        "command": "launch.config",
-        "title": "Configure launch.json",
-        "category": "Daffodil Debug",
-        "enablement": "!inDebugMode",
-        "icon": "$(debug-configure)"
-      },
-      {
-        "command": "toggle.experimental",
-        "title": "Enable Experimental Features",
-        "category": "Daffodil Debug"
-      },
-      {
-        "command": "omega_edit.version",
-        "title": "Omega Edit Ω Version Info",
-        "category": "OmegaEdit",
-        "enablement": "experimentalFeaturesEnabled"
-      },
-      {
-        "command": "data.edit",
-        "title": "Data Editor",
-        "category": "OmegaEdit",
-        "enablement": "experimentalFeaturesEnabled"
-      },
-      {
-        "command": "position.goto",
-        "title": "Go to position",
-        "category": "OmegaEdit",
-        "enablement": "experimentalFeaturesEnabled"
-      }
-    ],
-    "keybindings": [
-      {
-        "command": "position.goto",
-        "key": "ctrl+alt+g",
-        "mac": "ctrl+cmd+g",
-        "when": "editorTextFocus"
-      }
-    ],
-    "breakpoints": [
-      {
-        "language": "dfdl"
-      }
-    ],
-    "debuggers": [
-      {
-        "type": "dfdl",
-        "languages": [
-          "dfdl"
-        ],
-        "label": "Daffodil Debug",
-        "program": "./out/extension.js",
-        "runtime": "node",
-        "configurationAttributes": {
-          "launch": {
-            "required": [
-              "program",
-              "data"
-            ],
-            "properties": {
-              "program": {
-                "type": "string",
-                "description": "Absolute path to the DFDL schema file.",
-                "default": "${command:AskForProgramName}"
-              },
-              "data": {
-                "type": "string",
-                "description": "Absolute path to the input data file.",
-                "default": "${command:AskForDataName}"
-              },
-              "infosetOutput": {
-                "type": "object",
-                "description": "Destination for final Infoset (file-path | 'console' | 'none')",
-                "default": {
-                  "type": "console",
-                  "path": "${workspaceFolder}/infoset.xml"
-                }
-              },
-              "stopOnEntry": {
-                "type": "boolean",
-                "description": "Automatically stop after launch.",
-                "default": true
-              },
-              "trace": {
-                "type": "boolean",
-                "description": "Enable logging of the Debug Adapter Protocol.",
-                "default": true
-              },
-              "debugServer": {
-                "type": "integer",
-                "description": "Port debug server running on",
-                "default": 4711
-              },
-              "useExistingServer": {
-                "type": "boolean",
-                "description": "Enable connection to running DAP Server",
-                "default": false
-              },
-              "openHexView": {
-                "type": "boolean",
-                "description": "Open hexview on debug start",
-                "default": false
-              },
-              "openInfosetView": {
-                "type": "boolean",
-                "description": "Open hexview on debug start",
-                "default": false
-              },
-              "openInfosetDiffView": {
-                "type": "boolean",
-                "description": "Open hexview on debug start",
-                "default": false
-              },
-              "daffodilDebugClasspath": {
-                "type": "string",
-                "description": "Additional classpaths to be exported to the debugger",
-                "default": ""
-              }
-            }
-          }
-        },
-        "initialConfigurations": [
-          {
-            "type": "dfdl",
-            "request": "launch",
-            "name": "Ask for file name",
-            "program": "${command:AskForProgramName}",
-            "stopOnEntry": true,
-            "data": "${command:AskForDataName}",
-            "infosetOutput": {
-              "type": "file",
-              "path": "${workspaceFolder}/infoset.xml"
-            },
-            "debugServer": 4711,
-            "openHexView": false,
-            "openInfosetView": false,
-            "openInfosetDiffView": false,
-            "daffodilDebugClasspath": ""
-          }
-        ],
-        "configurationSnippets": [
-          {
-            "label": "Daffodil Debug: Launch",
-            "description": "A new configuration for 'debugging' a user selected xml file.",
-            "body": {
-              "type": "dfdl",
-              "request": "launch",
-              "name": "Ask for file name",
-              "program": "^\"\\${command:AskForProgramName}\"",
-              "stopOnEntry": true,
-              "data": "^\"\\${command:AskForDataName}\"",
-              "infosetOutput": {
-                "type": "file",
-                "path": "${workspaceFolder}/infoset.xml"
-              },
-              "debugServer": 4711,
-              "openHexView": false,
-              "openInfosetView": false,
-              "openInfosetDiffView": false,
-              "daffodilDebugClasspath": ""
-            }
-          }
-        ],
-        "variables": {
-          "AskForProgramName": "extension.dfdl-debug.getProgramName",
-          "AskForDataName": "extension.dfdl-debug.getDataName"
-        }
-      }
-    ],
-    "configuration": [
-      {
-        "title": "Daffodil Debugger Global",
-        "properties": {
-          "type": {
-            "type": "string",
-            "default": "dfdl"
-          },
-          "program": {
-            "type": "string",
-            "description": "Absolute path to the DFDL schema file.",
-            "default": "${command:AskForProgramName}"
-          },
-          "data": {
-            "type": "string",
-            "description": "Absolute path to the input data file.",
-            "default": "${command:AskForDataName}"
-          },
-          "infosetOutputType": {
-            "type": "string",
-            "description": "Destination for final Infoset (file | 'console' | 'none')",
-            "enum": [
-              "file",
-              "console",
-              "none"
-            ],
-            "default": "none"
-          },
-          "infosetOutputFilePath": {
-            "type": "string",
-            "description": "Path to output for Infoset file (req: infosetOutput=file)",
-            "default": "${workspaceFolder}/infoset.xml"
-          },
-          "stopOnEntry": {
-            "type": "boolean",
-            "description": "Automatically stop after launch.",
-            "default": true
-          },
-          "trace": {
-            "type": "boolean",
-            "description": "Enable logging of the Debug Adapter Protocol.",
-            "default": true
-          },
-          "useExistingServer": {
-            "type": "boolean",
-            "description": "Enable connection to running DAP Server",
-            "default": false
-          },
-          "debugServer": {
-            "type": "integer",
-            "description": "Port debug server running on",
-            "default": 4711
-          },
-          "openHexView": {
-            "type": "boolean",
-            "description": "Open hexview on debug start",
-            "default": false
-          },
-          "openInfosetView": {
-            "type": "boolean",
-            "description": "Open hexview on debug start",
-            "default": false
-          },
-          "openInfosetDiffView": {
-            "type": "boolean",
-            "description": "Open hexview on debug start",
-            "default": false
-          },
-          "daffodilDebugClasspath": {
-            "type": "string",
-            "description": "Additional classpaths to be exported to the debugger",
-            "default": ""
-          }
-        }
-      }
-    ]
-  }
+	"name": "apache-daffodil-vscode",

Review Comment:
   @stevedlawrence So I did that but it seemed to reorganize the file as well, does that look better or do you want it different?



-- 
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: commits-unsubscribe@daffodil.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [daffodil-vscode] stevedlawrence commented on a diff in pull request #240: Test suite updates

Posted by GitBox <gi...@apache.org>.
stevedlawrence commented on code in PR #240:
URL: https://github.com/apache/daffodil-vscode/pull/240#discussion_r976414214


##########
package.json:
##########
@@ -476,5 +477,11 @@
         }
       }
     ]
+  },
+  "__metadata": {
+    "id": "4f1304da-7e65-48f1-9126-0a143e2e5ef2",
+    "publisherDisplayName": "Apache Software Foundation",
+    "publisherId": "4dbc1d1a-d64b-46f8-8756-1c234855f645",

Review Comment:
   I don't really know what this __metadata is used for, so hard to say if it should be deleted. But we haven't needed it in the past so I assume it's safe to remove.



-- 
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: commits-unsubscribe@daffodil.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [daffodil-vscode] scholarsmate commented on pull request #240: Test suite updates

Posted by GitBox <gi...@apache.org>.
scholarsmate commented on PR #240:
URL: https://github.com/apache/daffodil-vscode/pull/240#issuecomment-1239952236

   I've been running the tests this way:
   
   ```
   npm install
   npm run pretest
   npm test
   ```
   
   It's beautiful.


-- 
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: commits-unsubscribe@daffodil.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [daffodil-vscode] Shanedell commented on pull request #240: Test suite updates

Posted by GitBox <gi...@apache.org>.
Shanedell commented on PR #240:
URL: https://github.com/apache/daffodil-vscode/pull/240#issuecomment-1252611298

   @stevedlawrence @mbeckerle Would you guys be able to give this a review when you have a chance?


-- 
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: commits-unsubscribe@daffodil.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [daffodil-vscode] stevedlawrence commented on a diff in pull request #240: Test suite updates

Posted by GitBox <gi...@apache.org>.
stevedlawrence commented on code in PR #240:
URL: https://github.com/apache/daffodil-vscode/pull/240#discussion_r975609468


##########
.github/workflows/CI.yml:
##########
@@ -110,6 +110,9 @@ jobs:
       - run: $SBT compile # used to initialize sbt, if not done sbt universal:packageBin ran by yarn package times out -- windows only
         if: runner.os == 'Windows'
       - run: yarn install
-      - run: yarn package
+      - run: yarn sbt

Review Comment:
   Why the change from yarn package to yarn sbt? Dont' we sitll want to package to ensure the .vsix builds correctly?



##########
yarn.lock:
##########
@@ -8,22 +8,22 @@
   integrity sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==
 
 "@grpc/grpc-js@^1.5.4":
-  version "1.6.7"
-  resolved "https://registry.yarnpkg.com/@grpc/grpc-js/-/grpc-js-1.6.7.tgz#4c4fa998ff719fe859ac19fe977fdef097bb99aa"
-  integrity sha512-eBM03pu9hd3VqDQG+kHahiG1x80RGkkqqRb1Pchcwqej/KkAH95gAvKs6laqaHCycYaPK+TKuNQnOz9UXYA8qw==

Review Comment:
   This is a lot of changes to the dependencies. Did you go through all of these and verify that the licenses are ASF compatible and if the LICENSE/NOTICE needs to be updated.



##########
src/language/providers/attributeCompletion.ts:
##########
@@ -28,38 +28,25 @@ import {
 } from './utils'
 
 import { attributeCompletion } from './intellisense/attributeItems'
+import { getCommonItems, createCompletionItem } from './utils'
 
 function getCompletionItems(
   itemsToUse: string[],
   preVal: string = '',
   additionalItems: string = ''
 ) {
-  let compItems: vscode.CompletionItem[] = []
-  let noPreVals: string[] = [
-    'dfdl:choiceBranchKey=',
-    'dfdl:representation',
-    'dfdl:choiceDispatchKey=',
-    'dfdl:simpleType',
-    'xs:restriction',
-  ]
+  let compItems: vscode.CompletionItem[] = getCommonItems(
+    itemsToUse,
+    preVal,
+    additionalItems
+  )
 
+  compItems.forEach((i) =>
+    vscode.window.showInformationMessage(i.label.toString())
+  )

Review Comment:
   Is this correct? This feels like some sort of debug output?



##########
package.json:
##########
@@ -1,480 +1,489 @@
 {
-  "name": "apache-daffodil-vscode",
-  "displayName": "Apache Daffodil VS Code Extension",
-  "description": "VS Code extension for Apache Daffodil DFDL schema debugging",
-  "version": "1.1.0",
-  "daffodilVersion": "3.3.0",
-  "omegaEditServerHash": "ffabce0d095364d1c863466f522dfa0ac2f0574d6394a82c0239a613bb84baf7c7b9fd92fdb0457e1d3c9321249acc21567d7dcfd6ff0528e0e792da1b487407",
-  "publisher": "asf",
-  "author": "Apache Daffodil",
-  "license": "Apache-2.0",
-  "engines": {
-    "vscode": "^1.55.0"
-  },
-  "icon": "images/daffodil.ico",
-  "categories": [
-    "Debuggers",
-    "Programming Languages"
-  ],
-  "repository": {
-    "type": "git",
-    "url": "https://github.com/apache/daffodil-vscode.git"
-  },
-  "bugs": {
-    "url": "https://github.com/apache/daffodil-vscode/issues"
-  },
-  "scripts": {
-    "omega-edit-download": "node -e \"require('./build/scripts/omega_edit_download.ts').downloadServer()\"",
-    "precompile": "node -p \"'export const LIB_VERSION = ' + JSON.stringify(require('./package.json').version) + ';'\" > src/version.ts",
-    "compile": "tsc -p ./ && yarn omega-edit-download",
-    "lint": "yarn run prettier src -c",
-    "watch": "yarn omega-edit-download && webpack --watch --devtool nosources-source-map --config ./build/extension.webpack.config.js",
-    "watch2": "tsc -watch -p ./",
-    "webpack": "webpack --mode production --config ./build/extension.webpack.config.js",
-    "prepackage": "yarn sbt && yarn install && yarn compile && yarn webpack",
-    "package": "yarn package-setup && yarn package-create",
-    "package-setup": "node -e \"require('./build/scripts/package.ts').setup()\"",
-    "package-create": "node -e \"require('./build/scripts/package.ts').create()\"",
-    "pretest": "yarn run compile",
-    "test": "node node_modules/mocha/bin/_mocha -u tdd --timeout 999999 --colors ./out/tests",
-    "sbt": "sbt universal:packageBin"
-  },
-  "dependencies": {
-    "@grpc/grpc-js": "^1.5.4",
-    "@types/moo": "^0.5.5",
-    "await-notify": "1.0.1",
-    "child_process": "1.0.2",
-    "google-protobuf": "3.20.1",
-    "hexy": "0.3.4",
-    "moo": "0.5.1",
-    "omega-edit": "0.9.20",
-    "unzip-stream": "0.3.1",
-    "vscode-debugadapter": "1.51.0",
-    "xdg-app-paths": "7.3.0"
-  },
-  "devDependencies": {
-    "@types/glob": "^7.1.3",
-    "@types/mocha": "^9.1.1",
-    "@types/node": "^18.0.0",
-    "@types/vscode": "^1.55.0",
-    "glob": "8.0.3",
-    "mocha": "10.0.0",
-    "prettier": "2.7.1",
-    "ts-loader": "8.1.0",
-    "typescript": "4.3.5",
-    "vsce": "2.9.2",
-    "vscode-debugadapter-testsupport": "1.51.0",
-    "webpack": "5.73.0",
-    "webpack-cli": "4.10.0"
-  },
-  "extensionDependencies": [
-    "vincaslt.highlight-matching-tag"
-  ],
-  "main": "./dist/ext/extension.js",
-  "activationEvents": [
-    "onLanguage:dfdl",
-    "onDebugResolve:dfdl",
-    "onDebugDynamicConfigurations:dfdl",
-    "onCommand:extension.dfdl-debug.getProgramName",
-    "onCommand:extension.dfdl-debug.getDataName",
-    "onCommand:extension.dfdl-debug.runEditorContents",
-    "onCommand:extension.dfdl-debug.debugEditorContents",
-    "onCommand:launch.config",
-    "onCommand:data.edit",
-    "onCommand:omega_edit.version",
-    "onCommand:toggle.experimental",
-    "onCommand:extension.dfdl-debug.debugLastEditorContents"
-  ],
-  "workspaceTrust": {
-    "request": "never"
-  },
-  "contributes": {
-    "languages": [
-      {
-        "id": "dfdl",
-        "aliases": [
-          "dfdl"
-        ],
-        "extensions": [
-          ".dfdl.xsd"
-        ],
-        "configuration": "./language/dfdl.json"
-      }
-    ],
-    "grammars": [
-      {
-        "language": "dfdl",
-        "scopeName": "text.xml.dfdl.xsd",
-        "path": "./language/syntaxes/dfdl.tmLanguage.json"
-      }
-    ],
-    "menus": {
-      "editor/title": [
-        {
-          "command": "launch.config",
-          "group": "navigation@1"
-        },
-        {
-          "command": "hexview.display",
-          "when": "resourceLangId == dfdl",
-          "group": "navigation@4"
-        },
-        {
-          "command": "infoset.display",
-          "when": "resourceLangId == dfdl",
-          "group": "navigation@2"
-        },
-        {
-          "command": "infoset.diff",
-          "when": "resourceLangId == dfdl",
-          "group": "navigation@3"
-        }
-      ],
-      "editor/title/run": [
-        {
-          "command": "extension.dfdl-debug.runEditorContents",
-          "when": "resourceLangId == dfdl"
-        },
-        {
-          "command": "extension.dfdl-debug.debugEditorContents",
-          "when": "resourceLangId == dfdl"
-        },
-        {
-          "command": "extension.dfdl-debug.debugLastEditorContents",
-          "when": "resourceLangId == dfdl"
-        }
-      ],
-      "commandPalette": [
-        {
-          "command": "extension.dfdl-debug.debugEditorContents",
-          "when": "resourceLangId == dfdl"
-        },
-        {
-          "command": "extension.dfdl-debug.runEditorContents",
-          "when": "resourceLangId == dfdl"
-        },
-        {
-          "command": "data.edit",
-          "enablement": "experimentalFeaturesEnabled"
-        },
-        {
-          "command": "omega_edit.version",
-          "enablement": "experimentalFeaturesEnabled"
-        },
-        {
-          "command": "toggle.experimental"
-        },
-        {
-          "command": "extension.dfdl-debug.debugLastEditorContents",
-          "when": "resourceLangId == dfdl"
-        }
-      ],
-      "debug/variables/context": [
-        {
-          "command": "extension.dfdl-debug.toggleFormatting",
-          "when": "debugType == 'dfdl' && debugProtocolVariableMenuContext == 'simple'"
-        }
-      ]
-    },
-    "commands": [
-      {
-        "command": "extension.dfdl-debug.debugEditorContents",
-        "title": "Debug File",
-        "category": "Daffodil Debug",
-        "enablement": "!inDebugMode",
-        "icon": "$(debug-alt)"
-      },
-      {
-        "command": "extension.dfdl-debug.runEditorContents",
-        "title": "Run File",
-        "category": "Daffodil Debug",
-        "enablement": "!inDebugMode",
-        "icon": "$(play)"
-      },
-      {
-        "command": "extension.dfdl-debug.debugLastEditorContents",
-        "title": "Debug Last File",
-        "category": "Daffodil Debug",
-        "enablement": "!inDebugMode",
-        "icon": "$(debug-alt)"
-      },
-      {
-        "command": "extension.dfdl-debug.toggleFormatting",
-        "title": "Toggle between decimal and hex formatting",
-        "category": "Daffodil Debug",
-        "enablement": "inDebugMode"
-      },
-      {
-        "command": "hexview.display",
-        "title": "Display the hex view",
-        "category": "Daffodil Debug",
-        "enablement": "inDebugMode",
-        "icon": "$(file-binary)"
-      },
-      {
-        "command": "infoset.display",
-        "title": "Display the infoset view",
-        "category": "Daffodil Debug",
-        "enablement": "inDebugMode",
-        "icon": "$(file-code)"
-      },
-      {
-        "command": "infoset.diff",
-        "title": "View infoset diff",
-        "category": "Daffodil Debug",
-        "enablement": "inDebugMode",
-        "icon": "$(diff)"
-      },
-      {
-        "command": "infoset.save",
-        "title": "Save the current infoset",
-        "category": "Daffodil Debug",
-        "enablement": "inDebugMode"
-      },
-      {
-        "command": "launch.config",
-        "title": "Configure launch.json",
-        "category": "Daffodil Debug",
-        "enablement": "!inDebugMode",
-        "icon": "$(debug-configure)"
-      },
-      {
-        "command": "toggle.experimental",
-        "title": "Enable Experimental Features",
-        "category": "Daffodil Debug"
-      },
-      {
-        "command": "omega_edit.version",
-        "title": "Omega Edit Ω Version Info",
-        "category": "OmegaEdit",
-        "enablement": "experimentalFeaturesEnabled"
-      },
-      {
-        "command": "data.edit",
-        "title": "Data Editor",
-        "category": "OmegaEdit",
-        "enablement": "experimentalFeaturesEnabled"
-      },
-      {
-        "command": "position.goto",
-        "title": "Go to position",
-        "category": "OmegaEdit",
-        "enablement": "experimentalFeaturesEnabled"
-      }
-    ],
-    "keybindings": [
-      {
-        "command": "position.goto",
-        "key": "ctrl+alt+g",
-        "mac": "ctrl+cmd+g",
-        "when": "editorTextFocus"
-      }
-    ],
-    "breakpoints": [
-      {
-        "language": "dfdl"
-      }
-    ],
-    "debuggers": [
-      {
-        "type": "dfdl",
-        "languages": [
-          "dfdl"
-        ],
-        "label": "Daffodil Debug",
-        "program": "./out/extension.js",
-        "runtime": "node",
-        "configurationAttributes": {
-          "launch": {
-            "required": [
-              "program",
-              "data"
-            ],
-            "properties": {
-              "program": {
-                "type": "string",
-                "description": "Absolute path to the DFDL schema file.",
-                "default": "${command:AskForProgramName}"
-              },
-              "data": {
-                "type": "string",
-                "description": "Absolute path to the input data file.",
-                "default": "${command:AskForDataName}"
-              },
-              "infosetOutput": {
-                "type": "object",
-                "description": "Destination for final Infoset (file-path | 'console' | 'none')",
-                "default": {
-                  "type": "console",
-                  "path": "${workspaceFolder}/infoset.xml"
-                }
-              },
-              "stopOnEntry": {
-                "type": "boolean",
-                "description": "Automatically stop after launch.",
-                "default": true
-              },
-              "trace": {
-                "type": "boolean",
-                "description": "Enable logging of the Debug Adapter Protocol.",
-                "default": true
-              },
-              "debugServer": {
-                "type": "integer",
-                "description": "Port debug server running on",
-                "default": 4711
-              },
-              "useExistingServer": {
-                "type": "boolean",
-                "description": "Enable connection to running DAP Server",
-                "default": false
-              },
-              "openHexView": {
-                "type": "boolean",
-                "description": "Open hexview on debug start",
-                "default": false
-              },
-              "openInfosetView": {
-                "type": "boolean",
-                "description": "Open hexview on debug start",
-                "default": false
-              },
-              "openInfosetDiffView": {
-                "type": "boolean",
-                "description": "Open hexview on debug start",
-                "default": false
-              },
-              "daffodilDebugClasspath": {
-                "type": "string",
-                "description": "Additional classpaths to be exported to the debugger",
-                "default": ""
-              }
-            }
-          }
-        },
-        "initialConfigurations": [
-          {
-            "type": "dfdl",
-            "request": "launch",
-            "name": "Ask for file name",
-            "program": "${command:AskForProgramName}",
-            "stopOnEntry": true,
-            "data": "${command:AskForDataName}",
-            "infosetOutput": {
-              "type": "file",
-              "path": "${workspaceFolder}/infoset.xml"
-            },
-            "debugServer": 4711,
-            "openHexView": false,
-            "openInfosetView": false,
-            "openInfosetDiffView": false,
-            "daffodilDebugClasspath": ""
-          }
-        ],
-        "configurationSnippets": [
-          {
-            "label": "Daffodil Debug: Launch",
-            "description": "A new configuration for 'debugging' a user selected xml file.",
-            "body": {
-              "type": "dfdl",
-              "request": "launch",
-              "name": "Ask for file name",
-              "program": "^\"\\${command:AskForProgramName}\"",
-              "stopOnEntry": true,
-              "data": "^\"\\${command:AskForDataName}\"",
-              "infosetOutput": {
-                "type": "file",
-                "path": "${workspaceFolder}/infoset.xml"
-              },
-              "debugServer": 4711,
-              "openHexView": false,
-              "openInfosetView": false,
-              "openInfosetDiffView": false,
-              "daffodilDebugClasspath": ""
-            }
-          }
-        ],
-        "variables": {
-          "AskForProgramName": "extension.dfdl-debug.getProgramName",
-          "AskForDataName": "extension.dfdl-debug.getDataName"
-        }
-      }
-    ],
-    "configuration": [
-      {
-        "title": "Daffodil Debugger Global",
-        "properties": {
-          "type": {
-            "type": "string",
-            "default": "dfdl"
-          },
-          "program": {
-            "type": "string",
-            "description": "Absolute path to the DFDL schema file.",
-            "default": "${command:AskForProgramName}"
-          },
-          "data": {
-            "type": "string",
-            "description": "Absolute path to the input data file.",
-            "default": "${command:AskForDataName}"
-          },
-          "infosetOutputType": {
-            "type": "string",
-            "description": "Destination for final Infoset (file | 'console' | 'none')",
-            "enum": [
-              "file",
-              "console",
-              "none"
-            ],
-            "default": "none"
-          },
-          "infosetOutputFilePath": {
-            "type": "string",
-            "description": "Path to output for Infoset file (req: infosetOutput=file)",
-            "default": "${workspaceFolder}/infoset.xml"
-          },
-          "stopOnEntry": {
-            "type": "boolean",
-            "description": "Automatically stop after launch.",
-            "default": true
-          },
-          "trace": {
-            "type": "boolean",
-            "description": "Enable logging of the Debug Adapter Protocol.",
-            "default": true
-          },
-          "useExistingServer": {
-            "type": "boolean",
-            "description": "Enable connection to running DAP Server",
-            "default": false
-          },
-          "debugServer": {
-            "type": "integer",
-            "description": "Port debug server running on",
-            "default": 4711
-          },
-          "openHexView": {
-            "type": "boolean",
-            "description": "Open hexview on debug start",
-            "default": false
-          },
-          "openInfosetView": {
-            "type": "boolean",
-            "description": "Open hexview on debug start",
-            "default": false
-          },
-          "openInfosetDiffView": {
-            "type": "boolean",
-            "description": "Open hexview on debug start",
-            "default": false
-          },
-          "daffodilDebugClasspath": {
-            "type": "string",
-            "description": "Additional classpaths to be exported to the debugger",
-            "default": ""
-          }
-        }
-      }
-    ]
-  }
+	"name": "apache-daffodil-vscode",

Review Comment:
   Is this just an indentation change? Please revert, it impossible if something actually changed. If we want to change whitespace we can do that in a separate PR.



##########
src/adapter/activateDaffodilDebug.ts:
##########
@@ -24,6 +24,35 @@ import * as launchWizard from '../launchWizard/launchWizard'
 import * as omegaEditClient from '../omega_edit/client'
 import * as dfdlLang from '../language/dfdl'
 
+// Method to file path for program and data
+async function getFile(fileRequested, label, title) {
+  let file = ''
+
+  if (fileRequested && fs.existsSync(fileRequested)) {
+    file = fileRequested
+  } else if (fileRequested && !fs.existsSync(fileRequested)) {
+    file = ''
+  } else {

Review Comment:
   I dont' think I understand why we need this `fileRequested` logic? If a caller passes in `fileRequested` then we don't actually use an open dialog and get the file eslehwere? I think this needs comments explain the parameters and expected return of this function, but it's not clear based on the name.



-- 
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: commits-unsubscribe@daffodil.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [daffodil-vscode] Shanedell commented on a diff in pull request #240: Test suite updates

Posted by GitBox <gi...@apache.org>.
Shanedell commented on code in PR #240:
URL: https://github.com/apache/daffodil-vscode/pull/240#discussion_r975704331


##########
package.json:
##########
@@ -1,480 +1,489 @@
 {
-  "name": "apache-daffodil-vscode",
-  "displayName": "Apache Daffodil VS Code Extension",
-  "description": "VS Code extension for Apache Daffodil DFDL schema debugging",
-  "version": "1.1.0",
-  "daffodilVersion": "3.3.0",
-  "omegaEditServerHash": "ffabce0d095364d1c863466f522dfa0ac2f0574d6394a82c0239a613bb84baf7c7b9fd92fdb0457e1d3c9321249acc21567d7dcfd6ff0528e0e792da1b487407",
-  "publisher": "asf",
-  "author": "Apache Daffodil",
-  "license": "Apache-2.0",
-  "engines": {
-    "vscode": "^1.55.0"
-  },
-  "icon": "images/daffodil.ico",
-  "categories": [
-    "Debuggers",
-    "Programming Languages"
-  ],
-  "repository": {
-    "type": "git",
-    "url": "https://github.com/apache/daffodil-vscode.git"
-  },
-  "bugs": {
-    "url": "https://github.com/apache/daffodil-vscode/issues"
-  },
-  "scripts": {
-    "omega-edit-download": "node -e \"require('./build/scripts/omega_edit_download.ts').downloadServer()\"",
-    "precompile": "node -p \"'export const LIB_VERSION = ' + JSON.stringify(require('./package.json').version) + ';'\" > src/version.ts",
-    "compile": "tsc -p ./ && yarn omega-edit-download",
-    "lint": "yarn run prettier src -c",
-    "watch": "yarn omega-edit-download && webpack --watch --devtool nosources-source-map --config ./build/extension.webpack.config.js",
-    "watch2": "tsc -watch -p ./",
-    "webpack": "webpack --mode production --config ./build/extension.webpack.config.js",
-    "prepackage": "yarn sbt && yarn install && yarn compile && yarn webpack",
-    "package": "yarn package-setup && yarn package-create",
-    "package-setup": "node -e \"require('./build/scripts/package.ts').setup()\"",
-    "package-create": "node -e \"require('./build/scripts/package.ts').create()\"",
-    "pretest": "yarn run compile",
-    "test": "node node_modules/mocha/bin/_mocha -u tdd --timeout 999999 --colors ./out/tests",
-    "sbt": "sbt universal:packageBin"
-  },
-  "dependencies": {
-    "@grpc/grpc-js": "^1.5.4",
-    "@types/moo": "^0.5.5",
-    "await-notify": "1.0.1",
-    "child_process": "1.0.2",
-    "google-protobuf": "3.20.1",
-    "hexy": "0.3.4",
-    "moo": "0.5.1",
-    "omega-edit": "0.9.20",
-    "unzip-stream": "0.3.1",
-    "vscode-debugadapter": "1.51.0",
-    "xdg-app-paths": "7.3.0"
-  },
-  "devDependencies": {
-    "@types/glob": "^7.1.3",
-    "@types/mocha": "^9.1.1",
-    "@types/node": "^18.0.0",
-    "@types/vscode": "^1.55.0",
-    "glob": "8.0.3",
-    "mocha": "10.0.0",
-    "prettier": "2.7.1",
-    "ts-loader": "8.1.0",
-    "typescript": "4.3.5",
-    "vsce": "2.9.2",
-    "vscode-debugadapter-testsupport": "1.51.0",
-    "webpack": "5.73.0",
-    "webpack-cli": "4.10.0"
-  },
-  "extensionDependencies": [
-    "vincaslt.highlight-matching-tag"
-  ],
-  "main": "./dist/ext/extension.js",
-  "activationEvents": [
-    "onLanguage:dfdl",
-    "onDebugResolve:dfdl",
-    "onDebugDynamicConfigurations:dfdl",
-    "onCommand:extension.dfdl-debug.getProgramName",
-    "onCommand:extension.dfdl-debug.getDataName",
-    "onCommand:extension.dfdl-debug.runEditorContents",
-    "onCommand:extension.dfdl-debug.debugEditorContents",
-    "onCommand:launch.config",
-    "onCommand:data.edit",
-    "onCommand:omega_edit.version",
-    "onCommand:toggle.experimental",
-    "onCommand:extension.dfdl-debug.debugLastEditorContents"
-  ],
-  "workspaceTrust": {
-    "request": "never"
-  },
-  "contributes": {
-    "languages": [
-      {
-        "id": "dfdl",
-        "aliases": [
-          "dfdl"
-        ],
-        "extensions": [
-          ".dfdl.xsd"
-        ],
-        "configuration": "./language/dfdl.json"
-      }
-    ],
-    "grammars": [
-      {
-        "language": "dfdl",
-        "scopeName": "text.xml.dfdl.xsd",
-        "path": "./language/syntaxes/dfdl.tmLanguage.json"
-      }
-    ],
-    "menus": {
-      "editor/title": [
-        {
-          "command": "launch.config",
-          "group": "navigation@1"
-        },
-        {
-          "command": "hexview.display",
-          "when": "resourceLangId == dfdl",
-          "group": "navigation@4"
-        },
-        {
-          "command": "infoset.display",
-          "when": "resourceLangId == dfdl",
-          "group": "navigation@2"
-        },
-        {
-          "command": "infoset.diff",
-          "when": "resourceLangId == dfdl",
-          "group": "navigation@3"
-        }
-      ],
-      "editor/title/run": [
-        {
-          "command": "extension.dfdl-debug.runEditorContents",
-          "when": "resourceLangId == dfdl"
-        },
-        {
-          "command": "extension.dfdl-debug.debugEditorContents",
-          "when": "resourceLangId == dfdl"
-        },
-        {
-          "command": "extension.dfdl-debug.debugLastEditorContents",
-          "when": "resourceLangId == dfdl"
-        }
-      ],
-      "commandPalette": [
-        {
-          "command": "extension.dfdl-debug.debugEditorContents",
-          "when": "resourceLangId == dfdl"
-        },
-        {
-          "command": "extension.dfdl-debug.runEditorContents",
-          "when": "resourceLangId == dfdl"
-        },
-        {
-          "command": "data.edit",
-          "enablement": "experimentalFeaturesEnabled"
-        },
-        {
-          "command": "omega_edit.version",
-          "enablement": "experimentalFeaturesEnabled"
-        },
-        {
-          "command": "toggle.experimental"
-        },
-        {
-          "command": "extension.dfdl-debug.debugLastEditorContents",
-          "when": "resourceLangId == dfdl"
-        }
-      ],
-      "debug/variables/context": [
-        {
-          "command": "extension.dfdl-debug.toggleFormatting",
-          "when": "debugType == 'dfdl' && debugProtocolVariableMenuContext == 'simple'"
-        }
-      ]
-    },
-    "commands": [
-      {
-        "command": "extension.dfdl-debug.debugEditorContents",
-        "title": "Debug File",
-        "category": "Daffodil Debug",
-        "enablement": "!inDebugMode",
-        "icon": "$(debug-alt)"
-      },
-      {
-        "command": "extension.dfdl-debug.runEditorContents",
-        "title": "Run File",
-        "category": "Daffodil Debug",
-        "enablement": "!inDebugMode",
-        "icon": "$(play)"
-      },
-      {
-        "command": "extension.dfdl-debug.debugLastEditorContents",
-        "title": "Debug Last File",
-        "category": "Daffodil Debug",
-        "enablement": "!inDebugMode",
-        "icon": "$(debug-alt)"
-      },
-      {
-        "command": "extension.dfdl-debug.toggleFormatting",
-        "title": "Toggle between decimal and hex formatting",
-        "category": "Daffodil Debug",
-        "enablement": "inDebugMode"
-      },
-      {
-        "command": "hexview.display",
-        "title": "Display the hex view",
-        "category": "Daffodil Debug",
-        "enablement": "inDebugMode",
-        "icon": "$(file-binary)"
-      },
-      {
-        "command": "infoset.display",
-        "title": "Display the infoset view",
-        "category": "Daffodil Debug",
-        "enablement": "inDebugMode",
-        "icon": "$(file-code)"
-      },
-      {
-        "command": "infoset.diff",
-        "title": "View infoset diff",
-        "category": "Daffodil Debug",
-        "enablement": "inDebugMode",
-        "icon": "$(diff)"
-      },
-      {
-        "command": "infoset.save",
-        "title": "Save the current infoset",
-        "category": "Daffodil Debug",
-        "enablement": "inDebugMode"
-      },
-      {
-        "command": "launch.config",
-        "title": "Configure launch.json",
-        "category": "Daffodil Debug",
-        "enablement": "!inDebugMode",
-        "icon": "$(debug-configure)"
-      },
-      {
-        "command": "toggle.experimental",
-        "title": "Enable Experimental Features",
-        "category": "Daffodil Debug"
-      },
-      {
-        "command": "omega_edit.version",
-        "title": "Omega Edit Ω Version Info",
-        "category": "OmegaEdit",
-        "enablement": "experimentalFeaturesEnabled"
-      },
-      {
-        "command": "data.edit",
-        "title": "Data Editor",
-        "category": "OmegaEdit",
-        "enablement": "experimentalFeaturesEnabled"
-      },
-      {
-        "command": "position.goto",
-        "title": "Go to position",
-        "category": "OmegaEdit",
-        "enablement": "experimentalFeaturesEnabled"
-      }
-    ],
-    "keybindings": [
-      {
-        "command": "position.goto",
-        "key": "ctrl+alt+g",
-        "mac": "ctrl+cmd+g",
-        "when": "editorTextFocus"
-      }
-    ],
-    "breakpoints": [
-      {
-        "language": "dfdl"
-      }
-    ],
-    "debuggers": [
-      {
-        "type": "dfdl",
-        "languages": [
-          "dfdl"
-        ],
-        "label": "Daffodil Debug",
-        "program": "./out/extension.js",
-        "runtime": "node",
-        "configurationAttributes": {
-          "launch": {
-            "required": [
-              "program",
-              "data"
-            ],
-            "properties": {
-              "program": {
-                "type": "string",
-                "description": "Absolute path to the DFDL schema file.",
-                "default": "${command:AskForProgramName}"
-              },
-              "data": {
-                "type": "string",
-                "description": "Absolute path to the input data file.",
-                "default": "${command:AskForDataName}"
-              },
-              "infosetOutput": {
-                "type": "object",
-                "description": "Destination for final Infoset (file-path | 'console' | 'none')",
-                "default": {
-                  "type": "console",
-                  "path": "${workspaceFolder}/infoset.xml"
-                }
-              },
-              "stopOnEntry": {
-                "type": "boolean",
-                "description": "Automatically stop after launch.",
-                "default": true
-              },
-              "trace": {
-                "type": "boolean",
-                "description": "Enable logging of the Debug Adapter Protocol.",
-                "default": true
-              },
-              "debugServer": {
-                "type": "integer",
-                "description": "Port debug server running on",
-                "default": 4711
-              },
-              "useExistingServer": {
-                "type": "boolean",
-                "description": "Enable connection to running DAP Server",
-                "default": false
-              },
-              "openHexView": {
-                "type": "boolean",
-                "description": "Open hexview on debug start",
-                "default": false
-              },
-              "openInfosetView": {
-                "type": "boolean",
-                "description": "Open hexview on debug start",
-                "default": false
-              },
-              "openInfosetDiffView": {
-                "type": "boolean",
-                "description": "Open hexview on debug start",
-                "default": false
-              },
-              "daffodilDebugClasspath": {
-                "type": "string",
-                "description": "Additional classpaths to be exported to the debugger",
-                "default": ""
-              }
-            }
-          }
-        },
-        "initialConfigurations": [
-          {
-            "type": "dfdl",
-            "request": "launch",
-            "name": "Ask for file name",
-            "program": "${command:AskForProgramName}",
-            "stopOnEntry": true,
-            "data": "${command:AskForDataName}",
-            "infosetOutput": {
-              "type": "file",
-              "path": "${workspaceFolder}/infoset.xml"
-            },
-            "debugServer": 4711,
-            "openHexView": false,
-            "openInfosetView": false,
-            "openInfosetDiffView": false,
-            "daffodilDebugClasspath": ""
-          }
-        ],
-        "configurationSnippets": [
-          {
-            "label": "Daffodil Debug: Launch",
-            "description": "A new configuration for 'debugging' a user selected xml file.",
-            "body": {
-              "type": "dfdl",
-              "request": "launch",
-              "name": "Ask for file name",
-              "program": "^\"\\${command:AskForProgramName}\"",
-              "stopOnEntry": true,
-              "data": "^\"\\${command:AskForDataName}\"",
-              "infosetOutput": {
-                "type": "file",
-                "path": "${workspaceFolder}/infoset.xml"
-              },
-              "debugServer": 4711,
-              "openHexView": false,
-              "openInfosetView": false,
-              "openInfosetDiffView": false,
-              "daffodilDebugClasspath": ""
-            }
-          }
-        ],
-        "variables": {
-          "AskForProgramName": "extension.dfdl-debug.getProgramName",
-          "AskForDataName": "extension.dfdl-debug.getDataName"
-        }
-      }
-    ],
-    "configuration": [
-      {
-        "title": "Daffodil Debugger Global",
-        "properties": {
-          "type": {
-            "type": "string",
-            "default": "dfdl"
-          },
-          "program": {
-            "type": "string",
-            "description": "Absolute path to the DFDL schema file.",
-            "default": "${command:AskForProgramName}"
-          },
-          "data": {
-            "type": "string",
-            "description": "Absolute path to the input data file.",
-            "default": "${command:AskForDataName}"
-          },
-          "infosetOutputType": {
-            "type": "string",
-            "description": "Destination for final Infoset (file | 'console' | 'none')",
-            "enum": [
-              "file",
-              "console",
-              "none"
-            ],
-            "default": "none"
-          },
-          "infosetOutputFilePath": {
-            "type": "string",
-            "description": "Path to output for Infoset file (req: infosetOutput=file)",
-            "default": "${workspaceFolder}/infoset.xml"
-          },
-          "stopOnEntry": {
-            "type": "boolean",
-            "description": "Automatically stop after launch.",
-            "default": true
-          },
-          "trace": {
-            "type": "boolean",
-            "description": "Enable logging of the Debug Adapter Protocol.",
-            "default": true
-          },
-          "useExistingServer": {
-            "type": "boolean",
-            "description": "Enable connection to running DAP Server",
-            "default": false
-          },
-          "debugServer": {
-            "type": "integer",
-            "description": "Port debug server running on",
-            "default": 4711
-          },
-          "openHexView": {
-            "type": "boolean",
-            "description": "Open hexview on debug start",
-            "default": false
-          },
-          "openInfosetView": {
-            "type": "boolean",
-            "description": "Open hexview on debug start",
-            "default": false
-          },
-          "openInfosetDiffView": {
-            "type": "boolean",
-            "description": "Open hexview on debug start",
-            "default": false
-          },
-          "daffodilDebugClasspath": {
-            "type": "string",
-            "description": "Additional classpaths to be exported to the debugger",
-            "default": ""
-          }
-        }
-      }
-    ]
-  }
+	"name": "apache-daffodil-vscode",

Review Comment:
   I actually don't know why it looks like this because I actually didn't change any indentation and mine doesn't look like this locally



-- 
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: commits-unsubscribe@daffodil.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [daffodil-vscode] stevedlawrence commented on a diff in pull request #240: Test suite updates

Posted by GitBox <gi...@apache.org>.
stevedlawrence commented on code in PR #240:
URL: https://github.com/apache/daffodil-vscode/pull/240#discussion_r975733361


##########
src/adapter/activateDaffodilDebug.ts:
##########
@@ -24,6 +24,35 @@ import * as launchWizard from '../launchWizard/launchWizard'
 import * as omegaEditClient from '../omega_edit/client'
 import * as dfdlLang from '../language/dfdl'
 
+// Method to file path for program and data
+async function getFile(fileRequested, label, title) {
+  let file = ''
+
+  if (fileRequested && fs.existsSync(fileRequested)) {
+    file = fileRequested
+  } else if (fileRequested && !fs.existsSync(fileRequested)) {
+    file = ''
+  } else {

Review Comment:
   Yes sounds good :+1: 



-- 
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: commits-unsubscribe@daffodil.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [daffodil-vscode] stevedlawrence commented on a diff in pull request #240: Test suite updates

Posted by GitBox <gi...@apache.org>.
stevedlawrence commented on code in PR #240:
URL: https://github.com/apache/daffodil-vscode/pull/240#discussion_r975706161


##########
package.json:
##########
@@ -1,480 +1,489 @@
 {
-  "name": "apache-daffodil-vscode",
-  "displayName": "Apache Daffodil VS Code Extension",
-  "description": "VS Code extension for Apache Daffodil DFDL schema debugging",
-  "version": "1.1.0",
-  "daffodilVersion": "3.3.0",
-  "omegaEditServerHash": "ffabce0d095364d1c863466f522dfa0ac2f0574d6394a82c0239a613bb84baf7c7b9fd92fdb0457e1d3c9321249acc21567d7dcfd6ff0528e0e792da1b487407",
-  "publisher": "asf",
-  "author": "Apache Daffodil",
-  "license": "Apache-2.0",
-  "engines": {
-    "vscode": "^1.55.0"
-  },
-  "icon": "images/daffodil.ico",
-  "categories": [
-    "Debuggers",
-    "Programming Languages"
-  ],
-  "repository": {
-    "type": "git",
-    "url": "https://github.com/apache/daffodil-vscode.git"
-  },
-  "bugs": {
-    "url": "https://github.com/apache/daffodil-vscode/issues"
-  },
-  "scripts": {
-    "omega-edit-download": "node -e \"require('./build/scripts/omega_edit_download.ts').downloadServer()\"",
-    "precompile": "node -p \"'export const LIB_VERSION = ' + JSON.stringify(require('./package.json').version) + ';'\" > src/version.ts",
-    "compile": "tsc -p ./ && yarn omega-edit-download",
-    "lint": "yarn run prettier src -c",
-    "watch": "yarn omega-edit-download && webpack --watch --devtool nosources-source-map --config ./build/extension.webpack.config.js",
-    "watch2": "tsc -watch -p ./",
-    "webpack": "webpack --mode production --config ./build/extension.webpack.config.js",
-    "prepackage": "yarn sbt && yarn install && yarn compile && yarn webpack",
-    "package": "yarn package-setup && yarn package-create",
-    "package-setup": "node -e \"require('./build/scripts/package.ts').setup()\"",
-    "package-create": "node -e \"require('./build/scripts/package.ts').create()\"",
-    "pretest": "yarn run compile",
-    "test": "node node_modules/mocha/bin/_mocha -u tdd --timeout 999999 --colors ./out/tests",
-    "sbt": "sbt universal:packageBin"
-  },
-  "dependencies": {
-    "@grpc/grpc-js": "^1.5.4",
-    "@types/moo": "^0.5.5",
-    "await-notify": "1.0.1",
-    "child_process": "1.0.2",
-    "google-protobuf": "3.20.1",
-    "hexy": "0.3.4",
-    "moo": "0.5.1",
-    "omega-edit": "0.9.20",
-    "unzip-stream": "0.3.1",
-    "vscode-debugadapter": "1.51.0",
-    "xdg-app-paths": "7.3.0"
-  },
-  "devDependencies": {
-    "@types/glob": "^7.1.3",
-    "@types/mocha": "^9.1.1",
-    "@types/node": "^18.0.0",
-    "@types/vscode": "^1.55.0",
-    "glob": "8.0.3",
-    "mocha": "10.0.0",
-    "prettier": "2.7.1",
-    "ts-loader": "8.1.0",
-    "typescript": "4.3.5",
-    "vsce": "2.9.2",
-    "vscode-debugadapter-testsupport": "1.51.0",
-    "webpack": "5.73.0",
-    "webpack-cli": "4.10.0"
-  },
-  "extensionDependencies": [
-    "vincaslt.highlight-matching-tag"
-  ],
-  "main": "./dist/ext/extension.js",
-  "activationEvents": [
-    "onLanguage:dfdl",
-    "onDebugResolve:dfdl",
-    "onDebugDynamicConfigurations:dfdl",
-    "onCommand:extension.dfdl-debug.getProgramName",
-    "onCommand:extension.dfdl-debug.getDataName",
-    "onCommand:extension.dfdl-debug.runEditorContents",
-    "onCommand:extension.dfdl-debug.debugEditorContents",
-    "onCommand:launch.config",
-    "onCommand:data.edit",
-    "onCommand:omega_edit.version",
-    "onCommand:toggle.experimental",
-    "onCommand:extension.dfdl-debug.debugLastEditorContents"
-  ],
-  "workspaceTrust": {
-    "request": "never"
-  },
-  "contributes": {
-    "languages": [
-      {
-        "id": "dfdl",
-        "aliases": [
-          "dfdl"
-        ],
-        "extensions": [
-          ".dfdl.xsd"
-        ],
-        "configuration": "./language/dfdl.json"
-      }
-    ],
-    "grammars": [
-      {
-        "language": "dfdl",
-        "scopeName": "text.xml.dfdl.xsd",
-        "path": "./language/syntaxes/dfdl.tmLanguage.json"
-      }
-    ],
-    "menus": {
-      "editor/title": [
-        {
-          "command": "launch.config",
-          "group": "navigation@1"
-        },
-        {
-          "command": "hexview.display",
-          "when": "resourceLangId == dfdl",
-          "group": "navigation@4"
-        },
-        {
-          "command": "infoset.display",
-          "when": "resourceLangId == dfdl",
-          "group": "navigation@2"
-        },
-        {
-          "command": "infoset.diff",
-          "when": "resourceLangId == dfdl",
-          "group": "navigation@3"
-        }
-      ],
-      "editor/title/run": [
-        {
-          "command": "extension.dfdl-debug.runEditorContents",
-          "when": "resourceLangId == dfdl"
-        },
-        {
-          "command": "extension.dfdl-debug.debugEditorContents",
-          "when": "resourceLangId == dfdl"
-        },
-        {
-          "command": "extension.dfdl-debug.debugLastEditorContents",
-          "when": "resourceLangId == dfdl"
-        }
-      ],
-      "commandPalette": [
-        {
-          "command": "extension.dfdl-debug.debugEditorContents",
-          "when": "resourceLangId == dfdl"
-        },
-        {
-          "command": "extension.dfdl-debug.runEditorContents",
-          "when": "resourceLangId == dfdl"
-        },
-        {
-          "command": "data.edit",
-          "enablement": "experimentalFeaturesEnabled"
-        },
-        {
-          "command": "omega_edit.version",
-          "enablement": "experimentalFeaturesEnabled"
-        },
-        {
-          "command": "toggle.experimental"
-        },
-        {
-          "command": "extension.dfdl-debug.debugLastEditorContents",
-          "when": "resourceLangId == dfdl"
-        }
-      ],
-      "debug/variables/context": [
-        {
-          "command": "extension.dfdl-debug.toggleFormatting",
-          "when": "debugType == 'dfdl' && debugProtocolVariableMenuContext == 'simple'"
-        }
-      ]
-    },
-    "commands": [
-      {
-        "command": "extension.dfdl-debug.debugEditorContents",
-        "title": "Debug File",
-        "category": "Daffodil Debug",
-        "enablement": "!inDebugMode",
-        "icon": "$(debug-alt)"
-      },
-      {
-        "command": "extension.dfdl-debug.runEditorContents",
-        "title": "Run File",
-        "category": "Daffodil Debug",
-        "enablement": "!inDebugMode",
-        "icon": "$(play)"
-      },
-      {
-        "command": "extension.dfdl-debug.debugLastEditorContents",
-        "title": "Debug Last File",
-        "category": "Daffodil Debug",
-        "enablement": "!inDebugMode",
-        "icon": "$(debug-alt)"
-      },
-      {
-        "command": "extension.dfdl-debug.toggleFormatting",
-        "title": "Toggle between decimal and hex formatting",
-        "category": "Daffodil Debug",
-        "enablement": "inDebugMode"
-      },
-      {
-        "command": "hexview.display",
-        "title": "Display the hex view",
-        "category": "Daffodil Debug",
-        "enablement": "inDebugMode",
-        "icon": "$(file-binary)"
-      },
-      {
-        "command": "infoset.display",
-        "title": "Display the infoset view",
-        "category": "Daffodil Debug",
-        "enablement": "inDebugMode",
-        "icon": "$(file-code)"
-      },
-      {
-        "command": "infoset.diff",
-        "title": "View infoset diff",
-        "category": "Daffodil Debug",
-        "enablement": "inDebugMode",
-        "icon": "$(diff)"
-      },
-      {
-        "command": "infoset.save",
-        "title": "Save the current infoset",
-        "category": "Daffodil Debug",
-        "enablement": "inDebugMode"
-      },
-      {
-        "command": "launch.config",
-        "title": "Configure launch.json",
-        "category": "Daffodil Debug",
-        "enablement": "!inDebugMode",
-        "icon": "$(debug-configure)"
-      },
-      {
-        "command": "toggle.experimental",
-        "title": "Enable Experimental Features",
-        "category": "Daffodil Debug"
-      },
-      {
-        "command": "omega_edit.version",
-        "title": "Omega Edit Ω Version Info",
-        "category": "OmegaEdit",
-        "enablement": "experimentalFeaturesEnabled"
-      },
-      {
-        "command": "data.edit",
-        "title": "Data Editor",
-        "category": "OmegaEdit",
-        "enablement": "experimentalFeaturesEnabled"
-      },
-      {
-        "command": "position.goto",
-        "title": "Go to position",
-        "category": "OmegaEdit",
-        "enablement": "experimentalFeaturesEnabled"
-      }
-    ],
-    "keybindings": [
-      {
-        "command": "position.goto",
-        "key": "ctrl+alt+g",
-        "mac": "ctrl+cmd+g",
-        "when": "editorTextFocus"
-      }
-    ],
-    "breakpoints": [
-      {
-        "language": "dfdl"
-      }
-    ],
-    "debuggers": [
-      {
-        "type": "dfdl",
-        "languages": [
-          "dfdl"
-        ],
-        "label": "Daffodil Debug",
-        "program": "./out/extension.js",
-        "runtime": "node",
-        "configurationAttributes": {
-          "launch": {
-            "required": [
-              "program",
-              "data"
-            ],
-            "properties": {
-              "program": {
-                "type": "string",
-                "description": "Absolute path to the DFDL schema file.",
-                "default": "${command:AskForProgramName}"
-              },
-              "data": {
-                "type": "string",
-                "description": "Absolute path to the input data file.",
-                "default": "${command:AskForDataName}"
-              },
-              "infosetOutput": {
-                "type": "object",
-                "description": "Destination for final Infoset (file-path | 'console' | 'none')",
-                "default": {
-                  "type": "console",
-                  "path": "${workspaceFolder}/infoset.xml"
-                }
-              },
-              "stopOnEntry": {
-                "type": "boolean",
-                "description": "Automatically stop after launch.",
-                "default": true
-              },
-              "trace": {
-                "type": "boolean",
-                "description": "Enable logging of the Debug Adapter Protocol.",
-                "default": true
-              },
-              "debugServer": {
-                "type": "integer",
-                "description": "Port debug server running on",
-                "default": 4711
-              },
-              "useExistingServer": {
-                "type": "boolean",
-                "description": "Enable connection to running DAP Server",
-                "default": false
-              },
-              "openHexView": {
-                "type": "boolean",
-                "description": "Open hexview on debug start",
-                "default": false
-              },
-              "openInfosetView": {
-                "type": "boolean",
-                "description": "Open hexview on debug start",
-                "default": false
-              },
-              "openInfosetDiffView": {
-                "type": "boolean",
-                "description": "Open hexview on debug start",
-                "default": false
-              },
-              "daffodilDebugClasspath": {
-                "type": "string",
-                "description": "Additional classpaths to be exported to the debugger",
-                "default": ""
-              }
-            }
-          }
-        },
-        "initialConfigurations": [
-          {
-            "type": "dfdl",
-            "request": "launch",
-            "name": "Ask for file name",
-            "program": "${command:AskForProgramName}",
-            "stopOnEntry": true,
-            "data": "${command:AskForDataName}",
-            "infosetOutput": {
-              "type": "file",
-              "path": "${workspaceFolder}/infoset.xml"
-            },
-            "debugServer": 4711,
-            "openHexView": false,
-            "openInfosetView": false,
-            "openInfosetDiffView": false,
-            "daffodilDebugClasspath": ""
-          }
-        ],
-        "configurationSnippets": [
-          {
-            "label": "Daffodil Debug: Launch",
-            "description": "A new configuration for 'debugging' a user selected xml file.",
-            "body": {
-              "type": "dfdl",
-              "request": "launch",
-              "name": "Ask for file name",
-              "program": "^\"\\${command:AskForProgramName}\"",
-              "stopOnEntry": true,
-              "data": "^\"\\${command:AskForDataName}\"",
-              "infosetOutput": {
-                "type": "file",
-                "path": "${workspaceFolder}/infoset.xml"
-              },
-              "debugServer": 4711,
-              "openHexView": false,
-              "openInfosetView": false,
-              "openInfosetDiffView": false,
-              "daffodilDebugClasspath": ""
-            }
-          }
-        ],
-        "variables": {
-          "AskForProgramName": "extension.dfdl-debug.getProgramName",
-          "AskForDataName": "extension.dfdl-debug.getDataName"
-        }
-      }
-    ],
-    "configuration": [
-      {
-        "title": "Daffodil Debugger Global",
-        "properties": {
-          "type": {
-            "type": "string",
-            "default": "dfdl"
-          },
-          "program": {
-            "type": "string",
-            "description": "Absolute path to the DFDL schema file.",
-            "default": "${command:AskForProgramName}"
-          },
-          "data": {
-            "type": "string",
-            "description": "Absolute path to the input data file.",
-            "default": "${command:AskForDataName}"
-          },
-          "infosetOutputType": {
-            "type": "string",
-            "description": "Destination for final Infoset (file | 'console' | 'none')",
-            "enum": [
-              "file",
-              "console",
-              "none"
-            ],
-            "default": "none"
-          },
-          "infosetOutputFilePath": {
-            "type": "string",
-            "description": "Path to output for Infoset file (req: infosetOutput=file)",
-            "default": "${workspaceFolder}/infoset.xml"
-          },
-          "stopOnEntry": {
-            "type": "boolean",
-            "description": "Automatically stop after launch.",
-            "default": true
-          },
-          "trace": {
-            "type": "boolean",
-            "description": "Enable logging of the Debug Adapter Protocol.",
-            "default": true
-          },
-          "useExistingServer": {
-            "type": "boolean",
-            "description": "Enable connection to running DAP Server",
-            "default": false
-          },
-          "debugServer": {
-            "type": "integer",
-            "description": "Port debug server running on",
-            "default": 4711
-          },
-          "openHexView": {
-            "type": "boolean",
-            "description": "Open hexview on debug start",
-            "default": false
-          },
-          "openInfosetView": {
-            "type": "boolean",
-            "description": "Open hexview on debug start",
-            "default": false
-          },
-          "openInfosetDiffView": {
-            "type": "boolean",
-            "description": "Open hexview on debug start",
-            "default": false
-          },
-          "daffodilDebugClasspath": {
-            "type": "string",
-            "description": "Additional classpaths to be exported to the debugger",
-            "default": ""
-          }
-        }
-      }
-    ]
-  }
+	"name": "apache-daffodil-vscode",

Review Comment:
   Looks like space-indentation was converted to tab indentation in this PR.



-- 
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: commits-unsubscribe@daffodil.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [daffodil-vscode] Shanedell commented on a diff in pull request #240: Test suite updates

Posted by GitBox <gi...@apache.org>.
Shanedell commented on code in PR #240:
URL: https://github.com/apache/daffodil-vscode/pull/240#discussion_r975717665


##########
src/adapter/activateDaffodilDebug.ts:
##########
@@ -24,6 +24,35 @@ import * as launchWizard from '../launchWizard/launchWizard'
 import * as omegaEditClient from '../omega_edit/client'
 import * as dfdlLang from '../language/dfdl'
 
+// Method to file path for program and data
+async function getFile(fileRequested, label, title) {
+  let file = ''
+
+  if (fileRequested && fs.existsSync(fileRequested)) {
+    file = fileRequested
+  } else if (fileRequested && !fs.existsSync(fileRequested)) {
+    file = ''
+  } else {

Review Comment:
   I added  better comment above it, does it better answer why it exists?



-- 
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: commits-unsubscribe@daffodil.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [daffodil-vscode] Shanedell commented on pull request #240: Test suite updates

Posted by GitBox <gi...@apache.org>.
Shanedell commented on PR #240:
URL: https://github.com/apache/daffodil-vscode/pull/240#issuecomment-1252807329

   > > > To review this I really need to pull a copy and run these tests.
   > > > Are there instructions on how to run them suitable for someone who has never run this test kit before? The CI.yml file suggests simply 'yarn test' which would be awesome, but I can hardly believe there aren't setup steps in advance.
   > > 
   > > 
   > > @mbeckerle I am pretty confident that all you should need to do is pull down this code and run these commands.
   > > ```shell
   > > rm -rf node_modules # just ensures you won't have multiple versions of packages
   > > yarn install
   > > yarn test
   > > ```
   > > 
   > > 
   > >     
   > >       
   > >     
   > > 
   > >       
   > >     
   > > 
   > >     
   > >   
   > > If you run into issues leave a comment here and I should be able to help you out.
   > 
   > Looks like there's missing updates to node.js, protobuf, etc.
   > 
   > ```
   > $ rm -rf node_modules
   > $ yarn install
   > yarn install v1.22.17
   > [1/5] Validating package.json...
   > warning apache-daffodil-vscode@1.1.0-SNAPSHOT: The engine "vscode" appears to be invalid.
   > [2/5] Resolving packages...
   > [3/5] Fetching packages...
   > error protobufjs@7.0.0: The engine "node" is incompatible with this module. Expected version ">=12.0.0". Got "10.19.0"
   > error Found incompatible module.
   > info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
   > ```
   
   @mbeckerle This looks like it might be the version of node you are using. If you run `node --version` it should display `10.19.0` currently. That error message is saying you need to update to nodejs 12.0.0 or greater


-- 
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: commits-unsubscribe@daffodil.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [daffodil-vscode] Shanedell commented on pull request #240: Test suite updates

Posted by GitBox <gi...@apache.org>.
Shanedell commented on PR #240:
URL: https://github.com/apache/daffodil-vscode/pull/240#issuecomment-1239945639

   > To review this I really need to pull a copy and run these tests.
   > 
   > Are there instructions on how to run them suitable for someone who has never run this test kit before? The CI.yml file suggests simply 'yarn test' which would be awesome, but I can hardly believe there aren't setup steps in advance.
   
   @mbeckerle I am pretty confident that all you should need to do is pull down this code and run these commands.
   
   ```bash
   rm -rf node_modules # just ensures you won't have multiple versions of packages
   yarn install
   yarn test
   ```
   
   If you run into issues leave a comment here and I should be able to help you out.


-- 
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: commits-unsubscribe@daffodil.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [daffodil-vscode] scholarsmate commented on pull request #240: Test suite updates

Posted by GitBox <gi...@apache.org>.
scholarsmate commented on PR #240:
URL: https://github.com/apache/daffodil-vscode/pull/240#issuecomment-1240658259

   @Shanedell, okay, so then just:
   
   ```
   npm install
   npm run test
   ```
   
   I'll document this under the Developers tab on the repo wiki.


-- 
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: commits-unsubscribe@daffodil.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [daffodil-vscode] Shanedell commented on a diff in pull request #240: Test suite updates

Posted by GitBox <gi...@apache.org>.
Shanedell commented on code in PR #240:
URL: https://github.com/apache/daffodil-vscode/pull/240#discussion_r975886688


##########
src/tests/suite/daffodil.test.ts:
##########
@@ -142,4 +150,138 @@ suite('Daffodfil', () => {
       assert.strictEqual(daffodilVersion, '0.0.0')
     })
   })
+
+  suite('non-debug specifc commands', () => {
+    const nonDebugSpecificCmds = [
+      'extension.dfdl-debug.debugEditorContents',
+      'extension.dfdl-debug.runEditorContents',
+      'launch.config',
+    ]
+
+    // This breaks when the omega-edit tests run for some reason

Review Comment:
   Made issue #300 to look into these two unit tests.



-- 
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: commits-unsubscribe@daffodil.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [daffodil-vscode] Shanedell commented on a diff in pull request #240: Test suite updates

Posted by GitBox <gi...@apache.org>.
Shanedell commented on code in PR #240:
URL: https://github.com/apache/daffodil-vscode/pull/240#discussion_r975721659


##########
yarn.lock:
##########
@@ -8,22 +8,22 @@
   integrity sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==
 
 "@grpc/grpc-js@^1.5.4":
-  version "1.6.7"
-  resolved "https://registry.yarnpkg.com/@grpc/grpc-js/-/grpc-js-1.6.7.tgz#4c4fa998ff719fe859ac19fe977fdef097bb99aa"
-  integrity sha512-eBM03pu9hd3VqDQG+kHahiG1x80RGkkqqRb1Pchcwqej/KkAH95gAvKs6laqaHCycYaPK+TKuNQnOz9UXYA8qw==

Review Comment:
   Yeah so the `moo` related packages were delete because we don't use them anymore they were just part of the repo we used to create this one. The `gRPC` related packages were deleted as we only used them when the `omega-edit` wrapper code was in this repo which it no longer is. These packages are still installed but as transitive dependencies instead of direct dependencies of `daffodil-vscode`. As for the 3 new packages added
   
   ```yaml
   - @vscode/test-electron: MIT
   - uuid: MIT
   - wait-port: MIT
   ```
   
   If I didn't add those already I will do so now



-- 
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: commits-unsubscribe@daffodil.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [daffodil-vscode] mbeckerle commented on pull request #240: Test suite updates

Posted by GitBox <gi...@apache.org>.
mbeckerle commented on PR #240:
URL: https://github.com/apache/daffodil-vscode/pull/240#issuecomment-1252759546

   > > To review this I really need to pull a copy and run these tests.
   > > Are there instructions on how to run them suitable for someone who has never run this test kit before? The CI.yml file suggests simply 'yarn test' which would be awesome, but I can hardly believe there aren't setup steps in advance.
   > 
   > @mbeckerle I am pretty confident that all you should need to do is pull down this code and run these commands.
   > 
   > ```shell
   > rm -rf node_modules # just ensures you won't have multiple versions of packages
   > yarn install
   > yarn test
   > ```
   > 
   > If you run into issues leave a comment here and I should be able to help you out.
   
   Looks like there's missing updates to node.js, protobuf, etc. 
   
   ```
   $ rm -rf node_modules
   $ yarn install
   yarn install v1.22.17
   [1/5] Validating package.json...
   warning apache-daffodil-vscode@1.1.0-SNAPSHOT: The engine "vscode" appears to be invalid.
   [2/5] Resolving packages...
   [3/5] Fetching packages...
   error protobufjs@7.0.0: The engine "node" is incompatible with this module. Expected version ">=12.0.0". Got "10.19.0"
   error Found incompatible module.
   info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
   ```
   


-- 
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: commits-unsubscribe@daffodil.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [daffodil-vscode] mbeckerle commented on a diff in pull request #240: Test suite updates

Posted by GitBox <gi...@apache.org>.
mbeckerle commented on code in PR #240:
URL: https://github.com/apache/daffodil-vscode/pull/240#discussion_r965226820


##########
yarn.lock:
##########
@@ -8,22 +8,22 @@
   integrity sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==

Review Comment:
   I believe yarn.lock should not be part of any commit. Should we add it to .gitignore?



##########
src/utils.ts:
##########
@@ -130,3 +136,90 @@ export function getConfig(
       : defaultConf.get('daffodilDebugClasspath', ''),
   }
 }
+
+export async function unzipFile(zipFilePath: string, extractPath: string) {
+  return await new Promise((resolve, reject) => {
+    let stream = fs
+      .createReadStream(zipFilePath)
+      .pipe(unzip.Extract({ path: `${extractPath}` }))
+    stream.on('close', () => {
+      try {
+        resolve(zipFilePath)
+      } catch (err) {
+        reject(err)
+      }
+    })
+  })
+}
+
+export async function executeScript(
+  name: string,
+  cwd: string,
+  shellPath: string,
+  shellArgs: string[] = []
+) {
+  // Start server in terminal based on scriptName
+  let terminal = vscode.window.createTerminal({
+    name: name,
+    cwd: cwd,
+    hideFromUser: false,
+    shellPath: shellPath,
+    shellArgs: shellArgs,
+  })
+  terminal.show()
+
+  return terminal
+}
+
+export async function killProcess(id: number | undefined) {
+  if (id) {
+    if (os.platform() === 'win32') {
+      child_process.exec(`taskkill /F /PID ${id}`)
+    } else {
+      child_process.exec(`kill -9 ${id} 2>&1 || echo 0`)
+    }
+  }
+}
+
+export async function runScript(
+  scriptPath: string,
+  artifact: Artifact,
+  shellPath: string | null = null,
+  shellArgs: string[] = [],
+  env:
+    | {
+        [key: string]: string | null | undefined
+      }
+    | undefined = undefined,
+  type: string = '',
+  hideTerminal: boolean = false
+) {
+  const delay = (ms: number) => new Promise((res) => setTimeout(res, ms))
+
+  if (!os.platform().toLowerCase().startsWith('win')) {
+    child_process.execSync(
+      `chmod +x ${scriptPath.replace(
+        ' ',
+        '\\ '
+      )}/bin/${artifact.scriptName.replace('./', '')}`
+    )
+  }
+
+  // Start server in terminal based on scriptName
+  let terminal = vscode.window.createTerminal({
+    name: artifact.scriptName,
+    cwd: `${scriptPath}/bin`,
+    hideFromUser: false,
+    shellPath: shellPath !== null ? shellPath : artifact.scriptName,
+    shellArgs: shellArgs,
+    env: env,
+  })
+
+  if (!hideTerminal) terminal.show()
+
+  type.includes('daffodil')
+    ? await delay(5000).then(() => {})
+    : await wait_port({ host: '127.0.0.1', port: 9000, output: 'silent' })
+
+  return terminal
+}

Review Comment:
   They won't let me comment on the next file. yarn.lock should not be checked in. 



##########
src/adapter/activateDaffodilDebug.ts:
##########
@@ -24,6 +24,35 @@ import * as launchWizard from '../launchWizard/launchWizard'
 import * as omegaEditClient from '../omega_edit/client'
 import * as dfdlLang from '../language/dfdl'
 
+// Method to file path for program and data

Review Comment:
   Is there any sort of javadoc-like thing for typescript?



-- 
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: commits-unsubscribe@daffodil.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [daffodil-vscode] scholarsmate commented on a diff in pull request #240: Test suite updates

Posted by GitBox <gi...@apache.org>.
scholarsmate commented on code in PR #240:
URL: https://github.com/apache/daffodil-vscode/pull/240#discussion_r965316128


##########
yarn.lock:
##########
@@ -8,22 +8,22 @@
   integrity sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==

Review Comment:
   @mbeckerle, yarn.lock should be checked in.  See references below for why:
   
   https://classic.yarnpkg.com/lang/en/docs/yarn-lock/
   https://stackoverflow.com/questions/39990017/should-i-commit-the-yarn-lock-file-and-what-is-it-for
   



-- 
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: commits-unsubscribe@daffodil.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org