Skip to content

Migrate to the connected app service #208

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

Merged
merged 9 commits into from
Jun 30, 2025
Merged

Migrate to the connected app service #208

merged 9 commits into from
Jun 30, 2025

Conversation

jakemac53
Copy link
Contributor

Closes #198

This does drop all support for connecting to apps on SDKs that don't have this service, and I bumped the min SDK accordingly.

@jakemac53 jakemac53 requested a review from kenzieschmoll June 30, 2025 17:03
@github-actions github-actions bot added type-infra A repository infrastructure change or enhancement package:dart_mcp_server labels Jun 30, 2025
Copy link

PR Health

Changelog Entry ✔️
Package Changed Files

Changes to files need to be accounted for in their respective changelogs.

@jakemac53 jakemac53 requested a review from kenzieschmoll June 30, 2025 19:57
@jakemac53 jakemac53 merged commit 38734ff into main Jun 30, 2025
24 checks passed
@jakemac53 jakemac53 deleted the connected-app-service branch June 30, 2025 20:45

Future<void> _listenForConnectedAppServiceEvents() async {
final dtd = _dtd!;
dtd.onVmServiceUpdate().listen((e) async {
Copy link
Contributor

Choose a reason for hiding this comment

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

do we need to cancel these listeners in some dispose method?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We could, but it's not necessary. We keep listening as long as the DTD instance itself is still alive. If that does shut down, this stream will be closed.

@@ -807,10 +796,10 @@ class _AppErrorsListener {
final StreamController<String> _errorsController;

/// The listener for Flutter.Error vm service extension events.
final StreamSubscription<Event> _extensionEventsListener;
final StreamSubscription<Event>? _extensionEventsListener;
Copy link
Contributor

Choose a reason for hiding this comment

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

where are these stream subscriptions set?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just normally via the constructor - they aren't late, just nullable. They are created as a part of the forVmService static method which passes them into the constructor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autosubmit package:dart_mcp_server type-infra A repository infrastructure change or enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Get VM service URIs from the ConnectedAppService on DTD instead of the EditorService
2 participants