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

Allow vrdev.buildTools.defaultVersion to be overridden by .vscode/settings.json #154

Closed
Indy-rbo opened this issue Jul 22, 2024 · 14 comments · Fixed by #156
Closed

Allow vrdev.buildTools.defaultVersion to be overridden by .vscode/settings.json #154

Indy-rbo opened this issue Jul 22, 2024 · 14 comments · Fixed by #156

Comments

@Indy-rbo
Copy link

Description

In #10 the setting vrdev.buildTools.defaultVersion was added with the scope of application.

"scope": "application"

I would like this scope to be set to something which allows it to be overridden in .vscode/settings.json (like workspace?). So that all team members have it set to the same version.

It currently shows the following message when I want to override it:

image

@VenelinBakalov
Copy link
Collaborator

Hi @Indy-rbo , could you double check if this is not somehow related to another configuration of VS Code?
With the current implementation you should be able to change the setting both from the settings.json and the UI configuration of the extension:
image

image

@Indy-rbo
Copy link
Author

Hi @VenelinBakalov !

Sorry this isn't an issue with setting it in my personal settings.json, but in the /.vscode/settings.json, which is a location to have project settings which will override personal user settings:

image

Using the setting in that file will show the behavior in my screenshot :)

@VenelinBakalov
Copy link
Collaborator

Oh, got it, I understand now, thanks for the clarification

@VenelinBakalov
Copy link
Collaborator

From what I see there should be an option to change the scope to "window" which relates to the UI tab -> Workspace settings. But I am not sure if this will do the job for your case.

@VenelinBakalov
Copy link
Collaborator

This is what I am referring to:
User settings - Settings that apply globally to any instance of VS Code you open.
Workspace settings - Settings stored inside your workspace and only apply when the workspace is opened.

https://code.visualstudio.com/docs/getstarted/settings

@VenelinBakalov
Copy link
Collaborator

If we change the scope to Window, the result is that you have the default setting set up on your workspace with the option to override it with user setting:
image

image

But if you change it for one Workspace (or one instance on VS code) it will not affect other instances that you open before or after that.

@Indy-rbo
Copy link
Author

Indy-rbo commented Jul 31, 2024

I'm not sure if the last part about not affecting other instances is a big downside?

Looking at https://code.visualstudio.com/api/references/contribution-points#Configuration-property-schema (and scrolling down to the scope header) also shows the scope resource with the description: Resource settings, which apply to files and folders, and can be configured in all settings levels, even folder settings.

Or even machine-overridable - Machine specific settings that can be overridden by workspace or folder settings.

I'm not well versed in VSCode extensions, but I've seen other extensions use this scope which worked for us. I can't recommend what scope would be the best, as long as I could override it in the workspace 😅

@VenelinBakalov
Copy link
Collaborator

Hmm will try those to see how they behave. Regarding the window scope, on my side this is fine, my question was more in the direction whether that would work for you?
If you have the time, change the scope locally to "window", run "gulp package" to package the extension, install the packaged snapshot version manually from Install from VSIX option, reload the window and test if that option works well for your case. I will check the other suggested scope options.
image

@VenelinBakalov
Copy link
Collaborator

I tried the different settings suggested, machine-overridable and resource truly seem the most flexible - you have both user and workspace settings plus the option for local file that takes highest precedence. Once you start removing those options one by one, the next in line takes precedence (removing the local file, leaving the UI setting empty, removing the setting from the users settings.json and so on).

@Indy-rbo
Copy link
Author

Yes I agree that resource is likely the most fitting scope. This direction would work for us :)

@Indy-rbo
Copy link
Author

Indy-rbo commented Aug 5, 2024

Hi @VenelinBakalov thanks again for fixing this so quickly!
We'd like to use this. Could you possibly give an indication as to when this extension update gets released? :)

@VenelinBakalov
Copy link
Collaborator

Hi @Indy-rbo , since you need this feature we should be able to release this week. I will keep you posted.

@VenelinBakalov
Copy link
Collaborator

Everything went fine, 2.5.5 is now available in the marketplace: https://marketplace.visualstudio.com/manage/publishers/vmware-pscoe
Setting should now be available with the new scope :) thanks for the help with this one!

@Indy-rbo
Copy link
Author

Indy-rbo commented Aug 6, 2024

Happy to help. Thanks for the quick release as well!

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