Status: New
Owner: [email protected]
Labels: Type-Defect Priority-Medium

New issue 595 by [email protected]: Descriptor->DebugString() does not print extensions to MessageOptions or FieldOptions
http://code.google.com/p/protobuf/issues/detail?id=595

What steps will reproduce the problem?
1. Compile a .proto file with custom extensions to MessageOptions and/or or FieldOptions, e.g. network_ack.proto:

**********************************************************
import "goby/common/protobuf/option_extensions.proto";
import "dccl/protobuf/option_extensions.proto";

package goby.acomms.protobuf;

message NetworkAck
{
  option (dccl.msg).id = 6;
  option (dccl.msg).max_bytes = 32;

  required int32 message_src = 1 [(dccl.field).min = -1,
                                  (dccl.field).max = 30,
                                  (dccl.field).in_head = true];
  required int32 message_dest = 2 [(dccl.field).min = -1,
                                   (dccl.field).max = 30,
                                   (dccl.field).in_head = true];
  optional uint64 message_time = 3 [(dccl.field).codec = "_time",
                                    (dccl.field).in_head = true];

  required int32 message_dccl_id = 4 [(dccl.field).min = 0,
                                      (dccl.field).max = 0x7FFF];

  required int32 ack_src = 10 [(dccl.field).min = -1,
                               (dccl.field).max = 30,
                               (dccl.field).in_head = true];

}
**********************************************************

2. Write out the DebugString() for that descriptor:
std::cout << goby::acomms::protobuf::NetworkAck::descriptor()->file()->DebugString();

What is the expected output? What do you see instead?
The expected output is the input .proto file (above) including the custom extensions. What I see instead is the input .proto file without the custom extensions:

**********************************************************
syntax = "proto2";

import "goby/common/protobuf/option_extensions.proto";
import "dccl/protobuf/option_extensions.proto";
package goby.acomms.protobuf;

message NetworkAck {
  required int32 message_src = 1;
  required int32 message_dest = 2;
  optional uint64 message_time = 3;
  required int32 message_dccl_id = 4;
  required int32 ack_src = 10;
}
**********************************************************

What version of the product are you using? On what operating system?
2.4.1, Ubuntu Linux 12.04


--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to