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
ThemeService registers configuration late triggering change event #101226
Comments
The default value of the configuration is defined in the constructor (it uses the environment service). Modifying the default value of an existing configuration are problematic/not allowed. @sandy081 Any advice? Can the configuration service wait with sending out the event until all services have been created? |
💯 for that. Maybe risky but I am also for not sending change events while starting up and then send one combined event once things are initialised |
Configuration service is created in the very beginning with no dependencies on other services. So it is tricky deferring firing events until some lifecycle phase. @bpasero Is it possible to have lifecycle service along with initial services? |
You mean to depend on lifecycle service? Yes, why not? |
yeah, configuration service depending on lifecycle service. |
Yeah I think that might work, in the end not a lot of dependencies: vscode/src/vs/workbench/services/lifecycle/electron-sandbox/lifecycleService.ts Lines 27 to 32 in 0420349
This would mean we need to move lifecycle creation into the list of services we create eagerly. And probably need to move notification service as well. In general I am not a big fan of adding more services to the list of services we create manually and not via |
I can think of two options
Let me know which is the better option. |
Actually, 1. is not straight forward as the storage service is used inside notification service but both init in parallel with the config service... |
However, maybe we could simply introduce a new |
Is there a reason that this call is made from the constructor and not statically outside:
vscode/src/vs/workbench/services/themes/common/themeConfiguration.ts
Line 246 in b03f792
This triggers a
onDefaultConfigurationChange
event that clocks at16ms
on startup.//cc @jrieken @sandy081
The text was updated successfully, but these errors were encountered: