logicapps icon indicating copy to clipboard operation
logicapps copied to clipboard

VS Code extension makes use of user settings to write workspace settings

Open mindingdata opened this issue 1 year ago • 1 comments

Describe the Bug

After installing the Logic Apps (Standard) extension in VS Code. I noticed it was writing the following to my .vscode/settings.json file (aka my Workspace settings shared with all developers on the project).

"terminal.integrated.env.windows": {
      "PATH": "C:\\Users\\MyName\\.azurelogicapps\\dependencies\\DotNetSDK;${env:PATH}"
  },
  "omnisharp.dotNetCliPaths": [
      "C:\\Users\\MyName\\.azurelogicapps\\dependencies\\DotNetSDK"
  ]

This obviously won't work for other developers that utilize my project as "MyName" is not their name.

If I remove these settings, next time I reopen VS Code, these get written back to the workspace file. I'll note that theoretically that's fine and won't stop a user because it will update their name into there. But then the GIT is noisy as all hell because the file is constantly getting changed.

What I found was that if I edited the extensions USER settings, specifically the autoRuntimeDependenciesPath, it would write a useable path for all.

e.g. In my user settings if I put :

    "azureLogicAppsStandard.autoRuntimeDependenciesPath" : "%userprofile%\\.azurelogicapps\\dependencies",

Or in the GUI :

image

However, what I found was this :

  • If I write the "azureLogicAppsStandard.autoRuntimeDependenciesPath" setting in the workspace settings (.vscode/settings.json), it is more or less ignored and says it is overwritten by user settings.
  • If I delete the user settings, e.g. I open the settings json file for my user, and delete the "azureLogicAppsStandard.autoRuntimeDependenciesPath" setting in there (Which you would assume would then default back to the workspace), when I reopen VSCode, it forcibly writes these settings all back to that file which then overrides the workspace file anyway.

The only solution is that in the README of my project, I say after installing the extension please update your user settings "azureLogicAppsStandard.autoRuntimeDependenciesPath" to use the %userprofile% which is often missed.

Ideally what I think should happen is when the extension loads, it should check the workspace settings. If there is a workspace setting, do not forcibly overwrite it in the user settings (Because why would we?)

Plan Type

Standard

Steps to Reproduce the Bug or Issue

Install VS Code Extension for Logic Apps Standard

Workflow JSON

No response

Screenshots or Videos

No response

Additional context

No response

mindingdata avatar Sep 25 '24 18:09 mindingdata

Also having this issue.

In addition the user settings are being set automatically even after clearing them, which ends up overriding the settings that we have set in our workspace.

If the extension must pre-load the users settings, maybe the --extensions-dir setting should be honored. We often set this because in corporate environments executables are sometimes not allowed in user locations.

tbsuper avatar Oct 14 '24 21:10 tbsuper

This issue is stale because it has been open for 45 days with no activity.

github-actions[bot] avatar Nov 28 '24 22:11 github-actions[bot]

This issue was closed because it has been inactive for 14 days since being marked as stale.

github-actions[bot] avatar Dec 12 '24 22:12 github-actions[bot]

This is still happening, please don't ignore issues like this.

TWolversonReply avatar Oct 23 '25 18:10 TWolversonReply