Greetings!

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.

Would you accept a patch that preserves these comments? I have made the 
changes locally and would be glad to submit it.

Justin

p.s. To reproduce the issue, I'll use descriptor.proto. Running the 
following command puts 'descriptor.pb' in /tmp (assuming descriptor.proto 
is in the current directory):

protoc --include_source_info --descriptor_set_out=/tmp/descriptor.pb 
descriptor.proto 

descriptor.proto begins with these lines (v2.5.0):

// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
// http://code.google.com/p/protobuf/

And that text is missing from descriptor.pb


-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to protobuf+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at http://groups.google.com/group/protobuf?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to