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
Load extension host after workbench is running and introduce phase #38323
Comments
@sandy081 problematic in settings/keybindings: Potentially dangerous (depends on usage): And then a lot in |
We should remove |
@jrieken yeah I had that thought as well, if we make it as an event it reduces the chance that someone would chain that promise up all the way to some critical code path. However, if we have an event, that would be an argument against adding it to the lifecycle service, because there we typically have promises. Problem I see is with the mode service things blocking on the extensions to be ready. Maybe @alexandrudima could chime in if that could also be event based and not blocking. |
Fixed it in Settings editor by removing the dependency on |
Re |
@bpasero |
@sandy081 well, the idea is to not join your promise on the extensions ready promise. So the event that you are looking for is still the same ("extensions ready") but you should simply update the editor when it happens instead of waiting for it before the editor is declaring to be loaded. ...I think all of this will be much easier to not do wrong once we replace the promise to be an event. |
Really, where? I'd copy from it
Doesn't exist but can be added |
@bpasero Not sure what you mean here. Settings editor is no longer depending on the extensions ready promise. Also it does not wait for any. It simply updates the editor with newly registered default settings by listening to the configuration change event. More details are here #38329. I would like to do the same for Keybindings editor. But I am missing an event when commands are registered. |
@sandy081 makes sense. I was just saying that as a workaround for now you could still react to the extensions loading promise. But in general if we ever want to support installing an extension without window reload then this would not be a good approach, so an event that is specific is always better 👍 |
Agreed. We just have specific events rather than general extensions loading promise. |
@sandy081 could you introduce a new event from |
Sure |
@sandy081 I still think we should then maybe go and check for each consumer if a more fine grained event would make sense and would be possible. That could come as a second step. |
Things pushed:
I was able to replace I did a check of all remaining users of |
I think we should try again to spawn the extension host only after the workbench is running. I remember @jrieken tried this but then we had clients that would prevent the restoring of editors from happening (via preferences editor).
We should replace
IExtensionService.onReady()
with aLifecyclePhase
that is always fired afterLifecyclePhase.Running
imho and then we have a consistent picture of phases.That means revisiting each user of
IExtensionService.onReady()
and making sure it is not blocking the startup. One challenge is that it is hard to prevent deadlocks from happening because we will always add new code that might cause it.Thoughts?
The text was updated successfully, but these errors were encountered: