[ISSUE] Workbench Continuously Asks to Install Dependencies

I already have the Workbench extension installed and it works just fine. A few weeks ago it started asking me to install dependencies every time I open a new VSCode window or project. When I hit cancel it says local compilation won’t work which is false, still works fine.

Here is a video of the issue. https://youtu.be/RUzOKcwO7Sc

I haven’t tried selecting Install because I don’t know what it wants to install and I don’t want any new Particle dependencies installed. Everything works exactly as I want it to with the correct DeviceOS and compiler versions. Here is the environment audit edited for privacy.

{
    "workspace": {
        "name": "[REDACTED]",
        "isWorkspace": false,
        "folders": []
    },
    "cli": {
        "binpath": "/home/kevin/.vscode/extensions/particle.particle-vscode-core-1.13.2/src/cli/bin/linux/amd64/particle",
        "ok": true,
        "version": "2.10.0",
        "installed": 1607744414717
    },
    "localCompiler": {
        "ok": true,
        "dependencies": [
            {
                "id": "deviceOS@2.0.0",
                "ok": true
            },
            {
                "id": "gcc-arm@9.2.1",
                "ok": true
            },
            {
                "id": "buildtools@1.1.1",
                "ok": true
            },
            {
                "id": "buildscripts@1.9.2",
                "ok": true
            },
            {
                "id": "openocd@0.11.2-adhoc6ea4372.0",
                "ok": true
            },
            {
                "id": "deviceOS@1.5.2",
                "ok": true
            },
            {
                "id": "gcc-arm@5.3.1",
                "ok": true
            },
            {
                "id": "deviceOS@1.5.1",
                "ok": true
            },
            {
                "id": "deviceOS@1.5.0",
                "ok": true
            }
        ]
    },
    "platform": {
        "os": "linux",
        "type": "Linux",
        "release": "5.8.0-7630-generic",
        "arch": "x64",
        "path": {
            "key": "PATH",
            "value": "[REDACTED]"
        },
        "homeDir": "/home/kevin",
        "particleDir": "/home/kevin/.particle",
        "localCompilerToolchainDir": "/home/kevin/.particle/toolchains"
    },
    "env": {
        "VSCODE_NLS_CONFIG": "{\"locale\":\"en-us\",\"availableLanguages\":{},\"_languagePackSupport\":true}",
        "VSCODE_NODE_CACHED_DATA_DIR": "/home/kevin/.config/Code/CachedData/ea3859d4ba2f3e577a159bc91e3074c5d85c0523",
        "VSCODE_IPC_HOOK": "/run/user/1000/vscode-830a5e2f-1.52.1-main.sock",
        "VSCODE_PID": "13438",
        "VSCODE_IPC_HOOK_EXTHOST": "/run/user/1000/vscode-ipc-157e5278-364f-4cd6-a687-755e713ab778.sock",
        "VSCODE_HANDLES_UNCAUGHT_ERRORS": "true",
        "VSCODE_LOG_STACK": "false",
    },
    "versions": {
        "node": "12.14.1",
        "v8": "8.3.110.13-electron.0",
        "uv": "1.33.1",
        "zlib": "1.2.11",
        "brotli": "1.0.7",
        "ares": "1.15.0",
        "modules": "80",
        "nghttp2": "1.40.0",
        "napi": "5",
        "llhttp": "2.0.1",
        "http_parser": "2.8.0",
        "openssl": "1.1.0",
        "cldr": "36.0",
        "icu": "65.1",
        "tz": "2020a",
        "unicode": "12.1",
        "electron": "9.3.5"
    },
    "vscode": {
        "appName": "Visual Studio Code",
        "appRoot": "/usr/share/code/resources/app",
        "machineId": "[REDACTED]",
        "sessionId": "313fa594-24f3-4200-a852-c84ea754e0d21610169680101",
        "version": "1.52.1"
    },
    "extensions": [
        {
            "id": "ms-vscode.js-debug",
            "version": "1.52.2"
        },
        {
            "id": "ms-vscode.js-debug-companion",
            "version": "1.0.8"
        },
        {
            "id": "ms-vscode.node-debug",
            "version": "1.44.15"
        },
        {
            "id": "ms-vscode.node-debug2",
            "version": "1.42.5"
        },
        {
            "id": "ms-vscode.references-view",
            "version": "0.0.74"
        },
        {
            "id": "ms-vscode.vscode-js-profile-table",
            "version": "0.0.11"
        },
        {
            "id": "dbaeumer.vscode-eslint",
            "version": "2.1.14"
        },
        {
            "id": "esbenp.prettier-vscode",
            "version": "5.8.0"
        },
        {
            "id": "espressif.esp-idf-extension",
            "version": "0.6.0"
        },
        {
            "id": "humao.rest-client",
            "version": "0.24.4"
        },
        {
            "id": "marus25.cortex-debug",
            "version": "0.3.7"
        },
        {
            "id": "ms-vscode.cpptools",
            "version": "1.1.3"
        },
        {
            "id": "octref.vetur",
            "version": "0.31.3"
        },
        {
            "id": "particle.particle-vscode-core",
            "version": "1.13.2"
        },
        {
            "id": "platformio.platformio-ide",
            "version": "2.2.1"
        },
        {
            "id": "sdras.vue-vscode-snippets",
            "version": "2.1.5"
        },
        {
            "id": "slevesque.vscode-hexdump",
            "version": "1.8.1"
        },
        {
            "id": "streetsidesoftware.code-spell-checker",
            "version": "1.10.2"
        },
        {
            "id": "syler.sass-indented",
            "version": "1.8.13"
        },
        {
            "id": "twxs.cmake",
            "version": "0.0.17"
        },
        {
            "id": "webfreak.debug",
            "version": "0.25.0"
        }
    ]
}

This message pops up whenever a new version of CLI gets released or a new device OS version becomes the new default (currently 2.0.1 which you are missing in your audit) hence you should allow the installation of these dependencies.
Although it won’t immediately affect local building it may affect other aspects of Workbench which rely on CLI to do the work (e.g. downloading/installing libraries, device management, …).

Recently there weren’t any changes in CLI that my have impacted you (e.g. making 2.0.1 the default device OS version, removal of Xenon support for that version, …) but making a habit to not install the latest version may sooner or later result in missing out on an update that may impact your workflow.

2 Likes

Good question… Thanks for asking as I keep ignoring it at times too. Glad to now have the answer!

I’m all for keeping toolsets current but it seems like the check for this should be triggered when the actual extension homepage is opened or a configured Particle project is opened. It’s current behavior seems to assume people don’t use VSCode for anything other than Particle dev which, in my case, is very far from reality. It is a very minor part of my dev work yet the “loudest” extension.

So I definitely understand now why it pops up but I’d offer a suggestion that the update checks not be so global to the VSCode environment.

I’d also offer a counter point to the always-on-the-latest mentality that seems to come up a lot with Particle (support once told me my DeviceOS version was “long in the tooth”). With product fleets deployed it’s not ideal to constantly update (and risk breaking) customers. I very thoughtfully transition to newer versions of the Device OS for my product only when the change log has a fix I need or critical security patch which isn’t super often. So, in my opinion, blindingly accepting every update that comes down the pipe is fine for maker projects but very bad practice for products.

1 Like

@nrobinson2000 offered a suggestion in a DM that might be useful to Particle devs. I’ll leave it here as something to possibly consider for making the extension less noisy.

There is a way to disable the Particle Workbench extension from creating that popup to install the latest dependencies but the modification will not persist when the Workbench extension is updated.

Essentially in the ~/.vscode/extensions/particle.particle-vscode-core-1.13.2/src/env-setup.js file you need to force the run() function to return before promptToInstallDependencies() is called.

This could be done by simply adding a return statement on line 62.

1 Like

I hear you. Maybe @m_m can chime in and maybe address a possible (less nuclear) solution to that side of the issue.

A setting similar to enabling verbose compiler output would be useful. For example:

Keep Compiler Dependencies Updated

This setting could be enabled by default and disabled by users who wish to stay with their currently installed dependencies.

Or better yet, as @sidwarkd mentioned, only prompt when a Particle project with project.properties is open.

2 Likes

great suggestions all, thanks :pray:

for now, your best option is to install the required updates and then the prompt will go away :+1: