protoreflect icon indicating copy to clipboard operation
protoreflect copied to clipboard

Compatibility between protoprint and "google.golang.org/protobuf/reflect/protoreflect"

Open gonzojive opened this issue 5 years ago • 1 comments

Is it possible to use the protoprint library with the Google-authored protoreflect library?

(I'm curious about @jhump's general thoughts on the Google protoreflect library. protoprint is not provided by the Google library's functionality and is quite cool, so I'm most interested in using this part of the library.)

gonzojive avatar Mar 14 '20 01:03 gonzojive

@gonzojive, I've been thinking about creating a v2 of protoreflect that uses APIv2 for the main proto libraries.

In the meantime, you will need to use v1.4 of github.com/golang/protobuf as a compatibility mechanism -- e.g. getting the descriptors using the old APIs. If you aren't working with generated messages and have descriptors from the new API, then you'd need to write a converter that can extract all of the underlying descriptor proto messages and then create desc.FileDescriptors from them.

jhump avatar Mar 14 '20 15:03 jhump