You can already do this.  Get the File Descriptor Set of the .proto then
create its hash value.  We use the same technique in our dev environment.
On Jun 13, 2012 8:39 AM, "users ...." <moofis...@gmail.com> wrote:

> hi,
>
> This is actually  a little more complicated than just version.  There are
> times I actually want to process with an old proto file and ignore new
> fields added by some new development. This feature is one of the many that
> made Protobuf attractive to our development needs.  I think a better
> question would be is there an enhancement feature that could be implmented
> to verify the proto message was created from a specific proto file.  I'm
> guessing we could request that the .proto file be hashed and provide the
> abilitiy to compare the hashes?  Then the user could determine if they want
> to enforce strict versioning, throw warnings, etc?
>
> my $.02
>
> -Mike
> On Tuesday, June 12, 2012 2:27:28 AM UTC-7, DK wrote:
>
>> Hi,
>>
>> Is there any recommended way to version Protobuf files so that both
>> Client and Server can ensure they are using the same compiled Protobuf
>> classes?
>>
>> I'm guessing adding a version field to each message is the only option?
>>
>  --
> You received this message because you are subscribed to the Google Groups
> "Protocol Buffers" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/protobuf/-/kU3dU2DEh24J.
> To post to this group, send email to protobuf@googlegroups.com.
> To unsubscribe from this group, send email to
> protobuf+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/protobuf?hl=en.
>

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

Reply via email to