protobuf-go/internal
Joe Tsai 24ceb2b095 cmd/protoc-gen-go: generate descriptor and plugin with reflection
In CL/152020, we checked in pre-generated versions of descriptor and plugin.
This CL makes it such that they are generated by protoc-gen-go.

We modify protoc-gen-go to avoid reflection support by default
since the binary size increase is still an issue to investigate.
Reflection support is temporarily enabled by setting a special
PROTOC_GEN_GO_ENABLE_REFLECT environment variable.

Reflection support is always enabled for descriptor and plugin.
Furthermore, we change descriptor to depend on the protoapi package
instead of the proto package. The reason we do not switch to protoapi
for all generated protos is because we still depend on v1 proto
for the table-driven InternalMessageInfo type. Dropping it from descriptor
is semantically correct, but does incur slight performance cost.
It does not seem appropriate to drop it for all generated messages.

We could move InternalMessageInfo to protoapi, but the logic behind that
is significant.

Change-Id: I5c3fff7f6eab1a5a2399049d42fa6bf42d4c93f9
Reviewed-on: https://go-review.googlesource.com/c/152547
Reviewed-by: Damien Neil <dneil@google.com>
2018-12-06 17:47:27 +00:00
..
cmd internal/typefmt: move descriptor formatting logic to typefmt 2018-12-05 22:14:52 +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 internal/typefmt: move descriptor formatting logic to typefmt 2018-12-05 22:14:52 +00:00
pragma internal/pragma: package to statically enforce certain properties 2018-08-06 21:47:01 +00:00
protogen/goldentest cmd/protoc-gen-go: generate descriptor and plugin with reflection 2018-12-06 17:47:27 +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
typefmt internal/typefmt: move descriptor formatting logic to typefmt 2018-12-05 22:14:52 +00:00
value internal/impl: allow reflection on typed nil pointers 2018-12-03 19:36:32 +00:00