protobuf-go/cmd/protoc-gen-go-grpc
Damien Neil 162c12703c protogen: generate .meta file with code annotations
When the generator parameter 'annotate_code' is provided, generate a .meta
file containing a GeneratedCodeInfo message describing the generated code's
relation to the source .proto file.

Annotations are added with (*protogen.GeneratedFile).Annotate, which takes the
name of a Go identifier (e.g., "SomeMessage" or "SomeMessage.GetField") and an
associated source location. The generator examines the generated AST to
determine source offsets for the symbols.

Change the []int32 "Path" in protogen types to a "Location", which also captures
the source file name.

Change-Id: Icd2340875831f40a1f91d495e3bd7ea381475c77
Reviewed-on: https://go-review.googlesource.com/c/139759
Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com>
2018-10-16 17:22:41 +00:00
..
internal_gengogrpc protogen: generate .meta file with code annotations 2018-10-16 17:22:41 +00:00
testdata/grpc cmd/protoc-gen-go-grpc: add deprecation comments 2018-09-28 21:55:39 +00:00
golden_test.go test.bash: do not run golden tests by default 2018-10-16 16:49:18 +00:00
main.go cmd/protoc-gen-go-grpc: add gRPC code generator 2018-09-27 19:32:34 +00:00