Open browntarik opened 2 years ago
Have you tried application
scope?
No, mainly because we do not want settings to be overwritten on a workspace folder level if there is a multi-root scenario which has more than one folder added to the workspace. The setting should only be set per workspace. All folders in a workspace should have the same file path case sensitivity. Maybe a better example is machine-overridable, if machine overridable did not let the setting be overwritten on a workspace folder level, it would be a perfect scope for us because it also does not inherit user settings remotely
Here is a matrix of the logic we have found and why application, window and machine overridable scope does not cover our necessary case. If we are incorrect please let us know
So this setting shall be mutually exclusive for machine. If defined in local take it, If defined in remote take it. If defined in both, local wins?
Correct, because we do not want to inherit user settings on a remote machine as these could conflict potentially.
I think the issue here is that there are various scopes that do not have "don't inherit remotely" alternatives.
Consider a setting that involves a file system path. You may want to be able to override that setting at the workspace level and/or the workspace folder level. And a setting containing a (local) file path should never be inherited remotely.
@browntarik @Colengms thanks for opening this issue. Can you please explain your use case better. What settings are these? How exactly are you impacted as an extension? We would like to understand this better. Thanks
Hi @isidorn . In this case, the setting was a bool to override the default case sensitivity/insensitivity of our use of the file system, which we are technically unable to vary at the workspace folder level (in multi-root), but can (and should) vary at the workspace level (implicitly the workspace folder level, if not using multi-root). This setting was motivated by Windows users who open a folder on a case sensitive file share. As the setting relates to the file system, it's undesirable to inherit that setting in a remote (if they set it at the user level), as a remote would almost assuredly involve a completely different file system.
If we were technically able to support this on a workspace-folder level, we might have wanted to. The issue here is that there are no available scopes that would allow us to vary a setting at the workspace and not also inherit a user level value in a remote. For any file path or file system related setting that should be allowed to be varied at the workspace and/or workspace-folder level, it would almost assuredly be undesirable to automatically inherit in a remote.
Below is an updated copy of a table that helps us understand how the scopes work (they're confusing). Let us know if this is inaccurate.
My suggestion would be to complete the matrix in the table below, so all combinations that make sense have an available scope. (Ignoring language-overridable, and ignoring combinations with contradictory implications.) That would seem to leave the following combinations:
no, no, yes, yes (suggested by #131126 yes, no, no, yes (suggested by this issue)
<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns="http://www.w3.org/TR/REC-html40">
Our extension would like to introduce a setting that requires a window scope but also does not allow remote sessions to inherit user (local) settings. The current setting will allow users to override file path case sensitivity on Windows machines however we do not want to inherit this behavior if the user has opened a workspace on a remote machine as this could be breaking behavior. As a workaround, we are currently setting the scope of the setting to "machine-overridable" and just ignoring any setting changes at the folder level. Ideally, we could just have this setting as window scope where the user cannot change the setting at the folder level and the setting isn't inherited on remote machines.