Closed joesonw closed 1 year ago
@joesonw, they are in the FileDescriptorProto
: https://github.com/protocolbuffers/protobuf-go/blob/v1.30.0/types/descriptorpb/descriptor.pb.go#L751-L755
This representation is a little bit of a challenge to use. You have to build up a path of tag numbers and indexes that represents the traversal within the FileDescriptorProto
to the element of interest. These comments in google/protobuf/descriptor.proto
describe it a little bit, with some examples: https://github.com/protocolbuffers/protobuf/blob/v23.0/src/google/protobuf/descriptor.proto#L907-L930
I'm using
parser.ParseFilesButDoNotLink
to merge files that have circular references (thus unlinked).But how do I get sourceCodeInfos from
descriptorpb
structures?