capnproto / go-capnp

Cap'n Proto library and code generator for Go

Home Page:https://capnproto.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

can't extract field of type anyPointer into a Go capnp.Client

CGamesPlay opened this issue · comments

The pogs module doesn't have seem to have support for anyPointer. When we have a known interface, we can deserialize into a capnp.Client object, however the module cannot deserialize anyPointer into anything.

I believe the fix is as simple as adding the anyPointer type to this line, but I'm not sure: https://github.com/capnproto/go-capnproto2/blob/master/pogs/extract.go#L397

Use case: my schema looks like this. My goal is to send a set of capabilities across the wire, but in a dynamic fashion. I have code working for this that doesn't use pogs, so I know the concept works.

struct Interface @0xaa6a48266712f6db {
  id @0 :UInt64;
  capability @1 :Capability;
}

SGTM, and agreed that would be the function that would be changed. Happy to review a PR for this.