Azure / logicapps

Azure Logic Apps labs, samples, and tools
MIT License
366 stars 302 forks source link

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

Open mindingdata opened 3 weeks ago

mindingdata commented 3 weeks ago

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 :

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

tbsuper commented 3 days ago

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.