Skip to content

Update extensionPaths when web extension host started - #193849

Merged
Alexandru Dima (alexdima) merged 25 commits into
microsoft:mainfrom
thegecko:fix-web-extension-loading
Mar 15, 2024
Merged

Alexandru Dima (alexdima) merged 25 commits into
microsoft:mainfrom
thegecko:fix-web-extension-loading

Conversation

@thegecko

@thegecko Rob Moran (thegecko) commented Sep 22, 2023 •

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Contributor Author

Please let me know if you need help reproducing this bug

@alexdima Alexandru Dima (alexdima) added this to the March 2024 milestone Mar 15, 2024

@alexdima Alexandru Dima (alexdima) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you!

@alexdima
Alexandru Dima (alexdima) merged commit b7bfbef into microsoft:main Mar 15, 2024
Chen Kang Yang (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 <alexdima@microsoft.com>
@microsoft 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