go-capnp
go-capnp copied to clipboard
Import of external capnp files without Go imports
Hello,
This may be a bit of a thinking out loud, but here's my general question. It's also possible that I just didn't read the documentation well enough, so please feel free to point me in the right direction if there is already an answer for this.
Say I have a capnp definition from someone else - some standard file that is all of the types, interfaces, etc., that would be used in a set of APIs. Would it make sense for this tool & library to be able to take a capnp file, have other files imported, and have those other files not need Go package & import definitions? I.e. pull types from other files and almost have them added "inline," or something of that style.
For context, I'm working on a set of microservices that all need to communicate on the same API. For me, it's a pain if I have to create different variants of the same data for every language I use.
However, I'm also relatively new to CapNProto, so it's 100% possible I'm misunderstanding the point.
Thanks in advance!
Related, we've talked in the past about having the code generator try to infer package names & import paths, see e.g:
https://github.com/capnproto/go-capnproto2/issues/47