Repository navigation
fix(exthost): show activation failures as VS Code does - #55
Merged
Merged
Conversation
An extension that fails to activate usually says why itself and then rejects activate() with no reason. golang.go without Go installed shows its own "Failed to find the go binary" message, and CodeBridge added "Activating extension 'golang.go' failed: undefined." on top. VS Code's release build only logs such failures and notifies only when a dependency is missing. Do the same. Refs #54
With the notification gone, a failure was visible only in the log. VS Code's release build marks such an extension in the Extensions view and shows the error under its runtime status. Do the same on the VS Code Extensions page: the row says "Activation failed" and the details give the host's reason, for as long as the project's host runs. Refs #54
BartvHelvert
force-pushed
the
fix/activation-failure-notice
branch
from
November 4, 2026 23:04
855cece to
973493a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this changes
When an extension failed to activate, CodeBridge always showed an error notification with the host's message. Extensions usually explain the failure themselves and then reject
activate()without a reason. golang.go without Go installed shows its own "Failed to find the "go" binary" message, and CodeBridge added "Activating extension 'golang.go' failed: undefined." on top of it.This now does what VS Code's release build does (
MainThreadExtensionService.$onExtensionActivationErrorand the Extensions view's runtime status):How the page gets the failures:
HostedActivationFailures, a new project service, keeps the failures the project's host reports and clears them when the host stops, as VS Code's status lasts until a reload.MarketplaceApi.activationFailures(projectId)streams them to the page, which updates while it's open.BackendRequests.watchis the generic form of the existingwatchExtensions.Fixes #54
How it was tested
ExtensionActivationsTest: one new test checks that a plain failure doesn't notify the user, and the missing-dependency test checks that it does.:shared:test --tests '*ExtensionActivationsTest'passed (6 tests).SplitModeActivationFailureTest(new UI test) installs a new fixture,activation-failure-extension, whoseactivate()throws, then opens one of its files. In the split-mode client it checks the "Activation failed" mark on the row and the reason in the details. It passed in WSL (1 test, 0 failures).Checklist
docs/is updated where behaviour changed,docs/status.mdespecially.Third-party material keeps its notice and is listed inNone added.NOTICE.md.