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

Dev Mode: Warn about missing defaults for unconfigured settings #43213

Closed
joaomoreno opened this issue Feb 8, 2018 · 4 comments
Closed

Dev Mode: Warn about missing defaults for unconfigured settings #43213

joaomoreno opened this issue Feb 8, 2018 · 4 comments
Assignees
Labels
config VS Code configuration, set up issues debt Code quality issues feature-request Request for new features or functionality *out-of-scope Posted issue is not in scope of VS Code

Comments

@joaomoreno
Copy link
Member

I have this setting update.enableWindowsBackgroundUpdates:

https://github.com/Microsoft/vscode/blob/master/src/vs/workbench/parts/update/electron-browser/update.contribution.ts#L62

When the user doesn't configure it, reading this value from the configuration service should return the default value. This works from the renderer process. It doesn't from the main process. Instead of getting the default false value, I get undefined.

Maybe regression?

@sandy081
Copy link
Member

sandy081 commented Feb 8, 2018

I think, the contribution is happening on the renderer side and not on main side. Hence you see undefined.

@sandy081 sandy081 added the config VS Code configuration, set up issues label Feb 8, 2018
@sandy081 sandy081 added this to the Backlog milestone Feb 8, 2018
@sandy081 sandy081 added the feature-request Request for new features or functionality label Feb 8, 2018
joaomoreno added a commit that referenced this issue Feb 8, 2018
@joaomoreno
Copy link
Member Author

joaomoreno commented Feb 8, 2018

Yes, I forgot that contributions are only required from the renderer side.

For my specific fix, I split my contributions into two: configuration (down in platform) and others (up in workbench).

But it took me way too long to figure this one out. I just wasn't expecting the config service not to have defaults. It would be great to have warnings when accessing unset configuration values, for which no default was ever specified. Renaming the issue.

@joaomoreno joaomoreno changed the title Storage service: Defaults are not being read in the main process Storage service: Warn about missing defaults for unconfigured settings Feb 8, 2018
@sandy081 sandy081 added debt Code quality issues and removed feature-request Request for new features or functionality labels Nov 16, 2020
@sandy081 sandy081 changed the title Storage service: Warn about missing defaults for unconfigured settings Dev Mode: Warn about missing defaults for unconfigured settings Dec 14, 2022
@sandy081 sandy081 added the feature-request Request for new features or functionality label Dec 14, 2022
@sandy081
Copy link
Member

One way to do is while accessing the value, check if the requested setting is registered or not. Obviously this should be done only in dev mode to not impact perf. But one problem is that at present, there are quite number of such unregistered settings that components are accessing. Hence, I think it is not worth doing this.

@sandy081 sandy081 added the *out-of-scope Posted issue is not in scope of VS Code label Jan 10, 2024
@VSCodeTriageBot
Copy link
Collaborator

We closed this issue because we don't plan to address it in the foreseeable future. If you disagree and feel that this issue is crucial: we are happy to listen and to reconsider.

If you wonder what we are up to, please see our roadmap and issue reporting guidelines.

Thanks for your understanding, and happy coding!

@VSCodeTriageBot VSCodeTriageBot closed this as not planned Won't fix, can't repro, duplicate, stale Jan 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
config VS Code configuration, set up issues debt Code quality issues feature-request Request for new features or functionality *out-of-scope Posted issue is not in scope of VS Code
Projects
None yet
Development

No branches or pull requests

4 participants