protobuf-go/protogen
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
..
testdata/go_package protogen, cmd/protoc-gen-go: initial commit 2018-08-22 17:08:04 +00:00
names_test.go protogen: camel-case "Foo.bar" as "FooBar" instead of "Foo_Bar". 2018-10-16 16:18:01 +00:00
names.go protogen: camel-case "Foo.bar" as "FooBar" instead of "Foo_Bar". 2018-10-16 16:18:01 +00:00
protogen_test.go protogen: generate .meta file with code annotations 2018-10-16 17:22:41 +00:00
protogen.go protogen: generate .meta file with code annotations 2018-10-16 17:22:41 +00:00