protobuf-go/cmd/protoc-gen-go
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_gengo protogen: generate .meta file with code annotations 2018-10-16 17:22:41 +00:00
testdata protogen: generate .meta file with code annotations 2018-10-16 17:22:41 +00:00
golden_test.go protogen: generate .meta file with code annotations 2018-10-16 17:22:41 +00:00
main.go protogen: add an option to rewrite import paths 2018-09-28 21:19:59 +00:00