Skip to content
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

Closed
nex3 opened this issue Feb 8, 2016 · 7 comments
Closed

There's no documentation for how to call a VM service extension method #25724

nex3 opened this issue Feb 8, 2016 · 7 comments
Assignees
Labels
area-observatory type-documentation A request to add or improve documentation

Comments

@nex3
Copy link
Member

nex3 commented Feb 8, 2016

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. The registerExtension 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.

@nex3 nex3 added type-documentation A request to add or improve documentation area-observatory labels Feb 8, 2016
@johnmccutchan
Copy link
Contributor

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.

@nex3
Copy link
Member Author

nex3 commented Feb 8, 2016

Does this mean extension RPCs can shadow built-in RPCs?

@johnmccutchan
Copy link
Contributor

@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.

@nex3
Copy link
Member Author

nex3 commented Feb 8, 2016

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?

@johnmccutchan
Copy link
Contributor

@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.

@johnmccutchan
Copy link
Contributor

@nex3 There is also the problem of two Dart libraries that register the same extension method name.

@nex3
Copy link
Member Author

nex3 commented Feb 8, 2016

Unfortuantely, changing the registerExtension() method call itself is also a breaking change at this point. But it would probably be good to add a note to its documentation saying something like "For compatibility across packages and future versions of the VM service protocol, extensions should begin with the name of the registering package followed by a period."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-observatory type-documentation A request to add or improve documentation
Projects
None yet
Development

No branches or pull requests

3 participants