Skip to content

Await notifyForVmServiceConnection when opening a VM service connection - #10086

Open
johnpryan wants to merge 1 commit into
masterfrom
await-vm-service-connection-notification
Open

johnpryan wants to merge 1 commit into
masterfrom
await-vm-service-connection-notification

Conversation

@johnpryan

Copy link
Copy Markdown
Contributor

Await notifyForVmServiceConnection when opening a VM service connection, so that the server finishes registering the connected app's root in DTD before ExtensionService requests api/serveAvailableExtensions.

This ensures that when DevTools is run from the CLI or standalone (without an IDE pre-populating DTD workspace roots), DTD's workspace roots already include the connected app's package root before ServiceManager.vmServiceOpened sets connectedState to true and triggers ExtensionService to refresh extensions. Without awaiting this call, api/serveAvailableExtensions can race ahead of api/notifyForVmServiceConnection and arrive at the server before the app's package root has been added to DTD's workspace roots.

@johnpryan
johnpryan requested a review from a team as a code owner November 12, 2026 00:40
@johnpryan
johnpryan requested review from srawlins and removed request for a team November 12, 2026 00:40

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request updates the ServiceConnectionManager in service_manager.dart to await the server.notifyForVmServiceConnection call instead of running it as an unawaited future. There are no review comments, and I have no feedback to provide.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants