-
Notifications
You must be signed in to change notification settings - Fork 1.6k
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
There's no documentation for how to call a VM service extension method #25724
Comments
You invoke an extension in the same way you invoke any other service protocol RPC. You target a specific isolate by specifying an 'isolateId' as a parameter, like any other service protocol RPC. |
Does this mean extension RPCs can shadow built-in RPCs? |
@nex3 No, extensions have lowest priority and cannot replace existing RPCs. In other words, you can register a 'getObject' extension but it will never be called. |
Doesn't that mean that any new built-in RPC is now a breaking change, since it might step on an extension that worked in previous SDK versions? |
@nex3 We haven't gotten to the point where this is a practical problem. Perhaps we will require extensions to be namespaced or start with a specific prefix. |
@nex3 There is also the problem of two Dart libraries that register the same extension method name. |
Unfortuantely, changing the |
dart:developer
supports a means for developers to register extensions to the VM service, but there's no documentation in the service protocol for how those extension handlers should be invoked. TheregisterExtension
documentation says "users of extensions must always specify a target isolate", but there's no information about how to specify that or what RPC call to use.The text was updated successfully, but these errors were encountered: