protobuf-go/internal
Joe Tsai d56458e71b internal/cmd/generate-protos: generate test for testdata
Running "go build ./..." does not descend into testdata directories.
However, the testdata in this repository is source code that is
intended to build properly. We could rename the directory, but that does
not test whether the generated packages can initialize properly.

Thus, we generate a trivial test that simply blank imports all packages.

Doing this reveals that some of the generated files have incorrect imports,
leading to registration conflicts.

To avoid introducing a dependency on gRPC from our go.mod file, we put
the testdata directories in their own module. Also, we avoid running
internal/testprotos through the grpc plugin because the servie and method
definitions in that directory are more for testing proto file initialization
rather than testing grpc generation.

Change-Id: Iaa6a06449787a085200e31bc7606e3ac904d3180
Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/164917
Reviewed-by: Damien Neil <dneil@google.com>
2019-03-11 19:40:53 +00:00
..
cmd internal/cmd/generate-protos: generate test for testdata 2019-03-11 19:40:53 +00:00
descfield internal/cmd/generate-protos: generate internal descfield package 2019-03-02 23:16:45 +00:00
detrand internal/detrand: support disabling detrand 2018-11-29 07:49:45 +00:00
encoding internal/encoding/jsonx: copy internal/encoding/json 2019-03-02 00:23:28 +00:00
errors internal/errors: fix New in eliding prefix 2019-02-27 22:36:14 +00:00
fileinit internal/cmd/generate-protos: generate internal descfield package 2019-03-02 23:16:45 +00:00
flags
impl internal/impl: drop MessageType.(Unk|K)nownFieldsOf 2019-01-30 01:34:45 +00:00
legacy internal/fileinit: generate reflect data structures from raw descriptors 2019-01-30 01:33:46 +00:00
pragma
scalar internal/scalar: add scalar package for primitive wrappers 2018-11-28 07:06:11 +00:00
set
testprotos internal/cmd/generate-protos: generate test for testdata 2019-03-11 19:40:53 +00:00
typefmt reflect/protoreflect: add HasJSONName, ReservedRanges, and ReservedNames 2018-12-07 20:10:15 +00:00
value reflect: switch MessageType.New to return Message 2019-01-09 20:29:29 +00:00