-
Notifications
You must be signed in to change notification settings - Fork 645
Flag machine specific configurations like paths as machine scoped #2576
Comments
I am guessing you mean "only from User and Workspace settings" on the same machine?
Does this mean that previously, settings were always read from the local machine, but the extension ran on the remote? |
Previously, Now that we have the new |
No. Machine scope settings will be read only from User settings.
Yes, since User Settings were respected always. Hence Machine scope is introduced to ignore them when defined in User Settings. It is always not suggested to make settings with path values to be customisable at workspace/folder level. Because these can be shared and so they do not make sense on a different machine. We understand that users main intention is to override them at workspace/folder level as they want different libraries or versions for a workspace but not to share them. So, we are thinking of introducing non sharable workspace/folder settings as a solution. Please go through following issues |
will this cover this use case? I have a HD monitor at work and an UHD monitor at home. I want 14pt font for the editor at home and 12pt font for the editor at work. |
331ed4c is a regression for us since it breaks our ability to provide those values in the workspace config. We bootstrap an installation of Go inside our workspace, so being able to provide We also provide a So, for now I'm recommending our developers downgrade to |
Yes, shared settings shouldn't contain paths that will vary on different machines, but this rule doesn't necessarily apply to every path setting and every workspace. As I described above we have some important exceptions. We know that the workspace-relative paths will be consistent for all developers in that workspace. Also, in a corporate environment it may be safe to make assumptions about common paths outside of the workspace, as we've done with As a maintainer of the workspace settings, I would prefer to be able to make this determination myself about what should go in the workspace settings. I know more about our setup than the author of the extensions we use, and want to be able to make that judgement about what settings are or are not safe to be shared. |
Agreed as an author and implementor of the setting you are the best to classify. If a setting is not machine scoped and can work across machines, this can be made window or resource scope even if it is a path. |
@sandy081 by "implementor of the setting" do you mean the extension author? What I was trying to say is the opposite. You've made the assumption that We were extremely happy when this extension added the ability for settings like The remote development features look exciting, but I'd really like to see these settings changed back to |
@ramya-rao-a what do you think in regards to this extension? I was directing my questions to @sandy081 since it seems like this is being given as general advice in order to help with the remote development, but I don't fully agree with the assumptions. However, as the extension owner it seems like the scoping decision here is up to you. I guess there is a trade-off though since this change does enable configurability on the remote host when using that feature, but as I've described above it presents a problem for workspaces like ours where we rely on the ability to configure these in the workspace settings. Although it also seems like maybe I should open a general ticket for VSCode about how the |
331ed4c is a regression for me too. I have a gopath inside of my repo. I use workspace settings to set my gopath. Now, I get |
@mgood Please update your opinion in this issue - microsoft/vscode#73985 |
@sandy081 We can't have existing users' scenarios breaking in order to support remote scenarios. I have shipped an update to the Go extension to mark only Not having Will keep this issue open to react to conclusions in microsoft/vscode#73985 |
Please revert |
#1589 is the PR that shows some of users having the need to have different goroot values per workspace @aaronjheng Can you elaborate on what your use case is and why you would need to have different goroot values for different workspaces |
Usually I have projects that can not use the update-to-date go version. So I often have two or more versions of go installed for different project at the same time. Setting |
Thanks @aaronjheng |
@ramya-rao-a thanks for all your help here. However, it looks like the intended change of For additional context we include Since we were already doing this as part of our general build process, we include the Thanks for your help on this. The remote dev feature seems interesting, and I'm looking forward to trying it out. But thanks for prioritizing our existing setups. |
Adding my two cents about this issue. We also have some assumptions at work about VSCode. In fact, our
@ramya-rao-a please release a new version with |
@ramya-rao-a: Is this still an issue or can this be closed now? |
We can close this as I don't intend to make any changes here. But the original concern @sandy081 brought up is relevant when we debug issues reported by folks using remote set ups he has described. |
By setting them machine-overridable, client user values can be ignored in remote settings and the remote side can pick up the right value. I think go.alternateTools should be machine-overridable as well but will get to it next time. Manually tested by 1) setting go.gopath in user settings, vsce package, connecting to the remote host, sideloading vsix (do it after connecting, so the remote host can pick up the vsix), and checking the GOPATH with "Go: Current GOPATH" and also, by reinstalling all tools. 2) setting go.gopath in workspace settings and checking it's still doable. Fixes microsoft#2981 Updates microsoft#2576 Change-Id: I3390355d186280c13353d210adb51edfa3858032
By setting them machine-overridable, client user values can be ignored in remote settings and the remote side can pick up the right value. I think go.alternateTools should be machine-overridable as well but will get to it next time. Manually tested by 1) setting go.gopath in user settings, vsce package, connecting to the remote host, sideloading vsix (do it after connecting, so the remote host can pick up the vsix), and checking the GOPATH with "Go: Current GOPATH" and also, by reinstalling all tools. 2) setting go.gopath in workspace settings and checking it's still doable. Fixes microsoft/vscode-go#2981 Updates microsoft/vscode-go#2576 Change-Id: I3390355d186280c13353d210adb51edfa3858032 Change-Id: I3390355d186280c13353d210adb51edfa3858032 GitHub-Last-Rev: 0463b84 GitHub-Pull-Request: #175 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/236539 Reviewed-by: Rebecca Stambler <[email protected]>
Hi all - I recently merged a cl that changes the path related settings to be As described in #2981 (comment) the change is now available through our nightly build of this extension. Please try it and test whether this breaks your existing settings. Report any issues or concerns in https://github.com/golang/vscode-go. Thanks!! |
I am developer from VS Code and we introduced Machine Scope for configurations in 1.34 which will help in remote set ups.
I would like to encourage extension authors to adopt to machine scope if you have any settings that you think they are scoped to machine like
go.gopath
For example, If you have settings that allow users to customize an executable path that exists on the machine in which extension is running, then you can tag such settings as
machine
scoped. This will let VS Code to read this setting from the location where the extension is running.If the extension is running remotely in a remote set up, then this will help the extension not to read paths configured in local machine user settings and bail as the paths not exist in the remote machine.
Note that machine scoped settings are overridable only in user or remote settings.
The text was updated successfully, but these errors were encountered: