Labels: Type-Defect Priority-Medium
New issue 513 by jgbai...@gmail.com: Leading comments droppped when using
The protoc compiler will write a FileDescriptorProto protocol buffer
describing its input files when given the --descriptor_set_out flag. If
--include_source_info is also given, then comments (and other information)
for each element will also be included.
However, any comments at the beginning of the file that are NOT attached to
an element will be dropped. I am working on a documentation generator for
Protocol Buffers, using the existing plugin infrastructure, and in many
cases the leading comments in the file act as an introduction. Therefore,
it's important to me that these comments show up in the FileDescriptorProto
provided by the compiler.
To reproduce the issue, I'll use descriptor.proto. Running the following
command puts 'descriptor.pb' in /tmp (assuming descriptor.proto is in the
protoc --include_source_info --descriptor_set_out=/tmp/descriptor.pb
descriptor.proto begins with these lines (v2.5.0):
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
And that text is missing from descriptor.pb
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
You received this message because you are subscribed to the Google Groups "Protocol
To unsubscribe from this group and stop receiving emails from it, send an email
To post to this group, send email to firstname.lastname@example.org.
Visit this group at http://groups.google.com/group/protobuf?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.