protobuf-go/cmd/protoc-gen-go/testdata
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
..
annotations cmd/protoc-gen-go: enforce init order within packages 2019-03-10 22:19:14 +00:00
comments cmd/protoc-gen-go: enforce init order within packages 2019-03-10 22:19:14 +00:00
extensions cmd/protoc-gen-go: enforce init order within packages 2019-03-10 22:19:14 +00:00
fieldnames cmd/protoc-gen-go: enforce init order within packages 2019-03-10 22:19:14 +00:00
import_public cmd/protoc-gen-go: enforce init order within packages 2019-03-10 22:19:14 +00:00
imports internal/cmd/generate-protos: generate test for testdata 2019-03-11 19:40:53 +00:00
issue780_oneof_conflict cmd/protoc-gen-go: enforce init order within packages 2019-03-10 22:19:14 +00:00
nopackage cmd/protoc-gen-go: enforce init order within packages 2019-03-10 22:19:14 +00:00
proto2 cmd/protoc-gen-go: enforce init order within packages 2019-03-10 22:19:14 +00:00
proto3 cmd/protoc-gen-go: enforce init order within packages 2019-03-10 22:19:14 +00:00
gen_test.go internal/cmd/generate-protos: generate test for testdata 2019-03-11 19:40:53 +00:00
go.mod internal/cmd/generate-protos: generate test for testdata 2019-03-11 19:40:53 +00:00
go.sum internal/cmd/generate-protos: generate test for testdata 2019-03-11 19:40:53 +00:00