graalvm / vscode-extensions

Universal Permissive License v1.0
31 stars 8 forks source link

Handle workspace files correctly #13

Open anthonyvdotbe opened 3 years ago

anthonyvdotbe commented 3 years ago

In my global configuration I have nothing relevant. Now I have a file graalvm.code-workspace like:

{
    "settings": {
        "graalvm.home": "...\\graalvm-ce-java11-21.2.0",
        "graalvm.installations": [
            "...\\graalvm-ce-java11-21.2.0"
        ],
        "netbeans.jdkhome": "...\\graalvm-ce-java11-21.2.0",
        "terminal.explorerKind": "integrated",
        "terminal.integrated.env.windows": {
            "GRAALVM_HOME": "...\\graalvm-ce-java11-21.2.0",
            "JAVA_HOME": "...\\graalvm-ce-java11-21.2.0"
        }
    }
}

When I open the file, 2 issues occur:

(1) I get the following error in the Output window:

[Error - 16:20:04] Server initialization failed.
Error: command 'dry_run' already exists
    at _.registerCommand (c:\Users\me\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:94:109536)
    at Object.registerCommand (c:\Users\me\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:103:20898)
    at W.register (c:\Users\me\.vscode\extensions\oracle-labs-graalvm.graalvm-0.5.11\dist\extension.js:2:320903)
    at W.initialize (c:\Users\me\.vscode\extensions\oracle-labs-graalvm.graalvm-0.5.11\dist\extension.js:2:320665)
    at S.initializeFeatures (c:\Users\me\.vscode\extensions\oracle-labs-graalvm.graalvm-0.5.11\dist\extension.js:2:337737)
    at c:\Users\me\.vscode\extensions\oracle-labs-graalvm.graalvm-0.5.11\dist\extension.js:2:330288

(2) the extension duplicates the configuration that I have in my workspace file in the global settings, appending:

    "graalvm.home": "...\\graalvm-ce-java11-21.2.0",
    "netbeans.jdkhome": "...\\graalvm-ce-java11-21.2.0",
    "terminal.integrated.env.windows": {
        "GRAALVM_HOME": "...\\graalvm-ce-java11-21.2.0",
        "JAVA_HOME": "...\\graalvm-ce-java11-21.2.0"
    }

This is problematic: the GraalVM extension isn't enabled globally, so it shouldn't change any global configuration either. If it's only enabled for the current workspace, it should only touch the workspace configuration. And since all required configuration is already provided in the workspace file, I expect it to do nothing at all in this case.

frank-dspeed commented 1 year ago

closed by:

details see commits related to tunnel in the main branch got no time to explain here more but watch the progress of the above issue and all this issues do close with it as the graal extension it self then runs as module in the browser. no settings needed.