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

Update extensionPaths when web extension host started #193849

Merged
merged 25 commits into from
Mar 15, 2024

Conversation

thegecko
Copy link
Contributor

@thegecko thegecko commented Sep 22, 2023

When in web-server mode, there are a few issues loading extensions from the backend which run in the web extensionHost when they offer task providers or debug providers. e.g.:

Screenshot 2023-09-22 at 22 29 08

Debugging this has shown this is due to a mismatch in extension IDs here (the loaded extension ID begins with nullExtensionDescription) and lack of registered debuggers found here.

These issues are both due to a race condition where the extensionPaths initially used for loading fake extensions in the web extensionHost don't get updated when the host is started properly.

The flow seems to be:

This PR adds an event for when the extensions are reloaded during the host start. This event is used to re-inject the updated extensionPaths. I'm pretty sure there's a better approach, so would be grateful of some support chaperoning this bug fix.

@thegecko
Copy link
Contributor Author

thegecko commented Jan 2, 2024

Please let me know if you need help reproducing this bug

@alexdima alexdima added this to the March 2024 milestone Mar 15, 2024
Copy link
Member

@alexdima alexdima left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@alexdima alexdima merged commit b7bfbef into microsoft:main Mar 15, 2024
6 checks passed
chen-ky pushed a commit to chen-ky/vscode that referenced this pull request Mar 18, 2024
* Invalidate and update extensionPaths on load

* Also update the `ExtensionPaths` search tree after startup because it applies an extension delta

* Cache realpath calls

---------

Co-authored-by: Alexandru Dima <[email protected]>
@microsoft microsoft locked and limited conversation to collaborators Jun 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants