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/01/11 21:27:19 UTC

[GitHub] [daffodil-vscode] mbeckerle commented on a change in pull request #71: Fix Launch Wizard for Windows

mbeckerle commented on a change in pull request #71:
URL: https://github.com/apache/daffodil-vscode/pull/71#discussion_r782535452



##########
File path: src/launchWizard/launchWizard.ts
##########
@@ -52,12 +53,15 @@ async function createUpdateConfigFile(data, updateOrCreate) {
     fs.mkdirSync(`${rootPath}/.vscode`)
   }
 
+  const launchPath =
+    os.platform() === 'win32'

Review comment:
       I can hardly believe you'll get away without needing something like this:
   ```
   osPath(`${rootPath}/.vscode/launch.json`)
   ```
   Which buries the os-specific check down where it is not clutter. 
   
   We made this mistake of allowing OS conditionalizations to proliferate in the CLI test code in Daffodil, and since we didn't nip it in the bud, there's an open ticket to basically convert hundreds of tests that have inline OS conditionalizations to use an osPath like library and otherwise push this os/path stuff down a level.

##########
File path: src/launchWizard/launchWizard.ts
##########
@@ -280,10 +282,14 @@ class LaunchWizard {
   getWebViewContent() {
     const scriptUri = vscode.Uri.parse(
       this.ctx.asAbsolutePath('./src/launchWizard/launchWizard.js')
-    ).with({ scheme: 'vscode-resource' })
+    )
     const styleUri = vscode.Uri.parse(
       this.ctx.asAbsolutePath('./src/launchWizard/styles.css')
-    ).with({ scheme: 'vscode-resource' })
+    )
+    const scriptData = fs.readFileSync(scriptUri.fsPath)
+    const styleData = fs.readFileSync(styleUri.fsPath)
+
+    // const styleUri = this.getPanel().webview.asWebviewUri(stylePath)

Review comment:
       Commented out code. I'd say delete or add a comment to the line why you want it retained. 
   Eg. "// Todo: keep for now. Still thinking about 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