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

On launch, the palette should still work while loading #324

Open
joadoumie opened this issue Jan 13, 2025 · 0 comments
Open

On launch, the palette should still work while loading #324

joadoumie opened this issue Jan 13, 2025 · 0 comments
Labels
Issue-Bug Something isn't working

Comments

@joadoumie
Copy link
Collaborator

Hit this on main (release build). The machine I built on does have a bunch of old extensions; however, we shouldn't hang for whatever reason on launch.

image

@joadoumie joadoumie added the Issue-Bug Something isn't working label Jan 13, 2025
zadjii-msft added a commit that referenced this issue Jan 28, 2025
Closes #370 

The DevHome code was great for "I need something that can lookup extensions and enumerate all of them".

However, the DevHome code is a very blunt hammer when it comes to extensions. The only thing it tracks is "packages changed", and if it gets one of those, it just blows away all the extensions and rebuilds them. Yikes. 

This PR changes `ExtensionService` to be a scalpel. We'll keep `_installedExtensions` fresh. When we get a package install, we'll add only that package's extension to our cache, and let the `TopLevelCommandManager` know. Similarly for updates and uninstalls. 

That way, we can exactly change the top-level list as needed, rather than bluntly forcing all the extensions to reload. 

In the middle of all this, I fixed a bug where uninstalling an extension, then reloading would just fail to load extensions. This is because the old code would clear out the **whole** list of extensions when _one_ was uninstalled. That created a race where we'd be parsing the new list of all the extensions (from the reload), get an uninstall event, clear the list, then InvalidOperation as the list of extensions was modified during enumeration. 

There's a bunch more locking in here. This might drive-by #324 but hard to be sure. 

Related to #89
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant