Skip to content

[dwds] Remove reassemble extension invocation for restarter #2585

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

Closed
wants to merge 1 commit into from

Conversation

srujzs
Copy link
Contributor

@srujzs srujzs commented Jan 31, 2025

#2584

This can and should be done in Flutter tools using callServiceExtension.

@srujzs
Copy link
Contributor Author

srujzs commented Jan 31, 2025

Okay, I know I'm the one who opened this, but having Flutter tools invoke this might be the wrong approach for now.

To summarize:

  • This is where we call service extensions. We call without checking if there exists an extension with that name - this then leads to an unexpected error in the JS evaluation as DDC throws. Flutter tools could check for this, but we don't throw a specific error for it to catch. We should throw an RPCError with kind kMethodNotFound. The Flutter VM service wrapper indeed checks for this when invoking ext.flutter.reassemble already. This allows integration tests that don't register reassemble to pass.
  • We cache the present extension RPCs in a list in the initialization of the AppInspector. This list is added to over time as well. Information may become stale here.

Note that we check for the extension before we call it in the restarter. No such mechanism API exists with the VM service to query the list of extensions afaict.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant