protobuf-go/internal
Joe Tsai e1f8d50e17 reflect/protodesc: split descriptor related functionality from prototype
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>
2018-12-05 00:38:30 +00:00
..
cmd reflect/protodesc: split descriptor related functionality from prototype 2018-12-05 00:38:30 +00:00
detrand internal/detrand: support disabling detrand 2018-11-29 07:49:45 +00:00
encoding reflect/protodesc: split descriptor related functionality from prototype 2018-12-05 00:38:30 +00:00
errors internal/errors: initial commit 2018-08-02 18:28:47 +00:00
flags internal/flags: add package to control specialized functionality 2018-08-03 22:59:53 +00:00
impl reflect/protodesc: split descriptor related functionality from prototype 2018-12-05 00:38:30 +00:00
legacy reflect/protodesc: split descriptor related functionality from prototype 2018-12-05 00:38:30 +00:00
pragma internal/pragma: package to statically enforce certain properties 2018-08-06 21:47:01 +00:00
protogen/goldentest protogen: generate .meta file with code annotations 2018-10-16 17:22:41 +00:00
scalar internal/scalar: add scalar package for primitive wrappers 2018-11-28 07:06:11 +00:00
set internal/set: add set package for set data structures 2018-08-09 21:46:35 +00:00
testprotos/legacy internal/impl: fix legacy logic to know about the new XXX_OneofWrappers method 2018-11-29 08:04:36 +00:00
value internal/impl: allow reflection on typed nil pointers 2018-12-03 19:36:32 +00:00