mirror of
https://github.com/protocolbuffers/protobuf-go.git
synced 2025-01-01 03:14:16 +00:00
e1f8d50e17
In order to generate descriptor.proto, the generated code would want to depend on the prototype package to construct the reflection data structures. However, this is a problem since descriptor itself is one of the dependencies for prototype. To break this dependency, we do the following: * Avoid using concrete *descriptorpb.XOptions messages in the public API, and instead just use protoreflect.ProtoMessage. We do lose some type safety here as a result. * Use protobuf reflection to interpret the Options message. * Split out NewFileFromDescriptorProto into a separate protodesc package since constructing protobuf reflection from the descriptor proto obviously depends on the descriptor protos themselves. As part of this CL, we check in a pre-generated version of descriptor and plugin that supports protobuf reflection natively and switchover all usages of those protos to the new definitions. These files were generated by protoc-gen-go from CL/150074, but hand-modified to remove dependencies on the v1 proto runtime. Change-Id: I81e03c42eeab480b03764e2fcbe1aae0e058fc57 Reviewed-on: https://go-review.googlesource.com/c/152020 Reviewed-by: Damien Neil <dneil@google.com>
8 lines
233 B
Modula-2
8 lines
233 B
Modula-2
module github.com/golang/protobuf/v2
|
|
|
|
require (
|
|
github.com/golang/protobuf v1.2.1-0.20181130223505-8f3966804431
|
|
github.com/google/go-cmp v0.2.1-0.20181101181452-745b8ec83783
|
|
golang.org/x/tools v0.0.0-20180928181343-b3c0be4c978b
|
|
)
|