Re: [protobuf] same message name in diffent .proto file, how can i fix it?
Use package. https://developers.google.com/protocol-buffers/docs/proto#packages On Wed, Jan 14, 2015 at 2:27 AM, you zhou zhyou...@gmail.com wrote: in my project, file name as module name, like that file(module):battle.proto message SyncMapReq{ } message SyncMapResp{ message Map map = 1; repeated Player player = 2; } message Player { required int32 x = 1; required int32 y = 2; required int32 speed = 3; required int32 hp = 4; } file(module): base.proto message LoadPlayerReq{ } message LoadPlayerResp{ required Player player = 1; } message Player { required string name = 1; required int32 level = 2; required int32 gold = 3; required int32 gem = 4; } how can i make it work? -- 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. For more options, visit https://groups.google.com/d/optout. -- 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. For more options, visit https://groups.google.com/d/optout.
[protobuf] same message name in diffent .proto file, how can i fix it?
in my project, file name as module name, like that file(module):battle.proto message SyncMapReq{ } message SyncMapResp{ message Map map = 1; repeated Player player = 2; } message Player { required int32 x = 1; required int32 y = 2; required int32 speed = 3; required int32 hp = 4; } file(module): base.proto message LoadPlayerReq{ } message LoadPlayerResp{ required Player player = 1; } message Player { required string name = 1; required int32 level = 2; required int32 gold = 3; required int32 gem = 4; } how can i make it work? -- 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. For more options, visit https://groups.google.com/d/optout.
[protobuf] protobuf-net sets defaults on proto messages
The protoc complaints when protobuf-net generates default for messages. Also, the following is viewed as invalid. Is there any setting I can use to make sure that the .proto generated is valid ? I tried IsRequired required bcl.Guid Key = 1 [default = ----]; Any help is appreciated, thanks Phil -- 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. For more options, visit https://groups.google.com/d/optout.
Re: [protobuf] Re: Protobuf Buffers v3.0.0-alpha-1
That sounds like a poor design decision, and one easily readded without breaking anything. If a field doesn't have an explicit default, you use 0 or whatever, thereby not breaking anyone not using them, but if an explicit default is provided that is used instead. I am using that feature as well. -- 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. For more options, visit https://groups.google.com/d/optout.