Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
mindingdata opened this issue Sep 25, 2024 · 3 comments
Closed
Labels

Comments

@mindingdata
Copy link

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

@tbsuper
Copy link

tbsuper commented Oct 14, 2024

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.

Copy link

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

@github-actions github-actions bot added the stale label Nov 28, 2024
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants