cui-liqiang / protoc-gen-as3

Automatically exported from code.google.com/p/protoc-gen-as3
BSD 2-Clause "Simplified" License
0 stars 0 forks source link

IOError(value + " is invalid for " + enumTypeDescription.@name) thrown when this not expected #36

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. client & server have the same protocol.
2. 1 new token added to enum. server updated to use new protocol.
3. server send message to the client(with old api) with value set to new token 
from enum.
4. IOError(value + " is invalid for " + enumTypeDescription.@name) thrown on 
message.toString()

What is the expected output? What do you see instead?
no Error thrown

What version of the product are you using? On what operating system?
2.4.1

Please provide any additional information below.

Original issue reported on code.google.com by siarhei....@gmail.com on 26 Nov 2012 at 10:18

GoogleCodeExporter commented 9 years ago
 Error: 2 is invalid for com.{removed}::{removed}
    at com.netease.protobuf::TextFormat$/printEnum()[C:\Users\Atry\Documents\lalala\game\race-for-the-woolen\protoc-gen-as3\src\as3\com\netease\protobuf\TextFormat.as:47]
    at com.netease.protobuf::TextFormat$/printValue()[C:\Users\Atry\Documents\lalala\game\race-for-the-woolen\protoc-gen-as3\src\as3\com\netease\protobuf\TextFormat.as:285]
    at com.netease.protobuf::TextFormat$/printMessageFields()[C:\Users\Atry\Documents\lalala\game\race-for-the-woolen\protoc-gen-as3\src\as3\com\netease\protobuf\TextFormat.as:200]
    at com.netease.protobuf::TextFormat$/printToUTFBytes()[C:\Users\Atry\Documents\lalala\game\race-for-the-woolen\protoc-gen-as3\src\as3\com\netease\protobuf\TextFormat.as:315]
    at com.netease.protobuf::TextFormat$/printToString()[C:\Users\Atry\Documents\lalala\game\race-for-the-woolen\protoc-gen-as3\src\as3\com\netease\protobuf\TextFormat.as:327]
    at com.netease.protobuf::Message/toString()[C:\Users\Atry\Documents\lalala\game\race-for-the-woolen\protoc-gen-as3\src\as3\com\netease\protobuf\Message.as:209]

Original comment by siarhei....@gmail.com on 26 Nov 2012 at 10:30

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
TextFormat are not backward compatible. It's a limitation from the format per 
se. Don't use TextFormat when you change proto.

Original comment by pop.atry@gmail.com on 26 Nov 2012 at 3:23

GoogleCodeExporter commented 9 years ago
bad news for me. Its means that i cannot log messages.
I do:
r.mergeFrom( payload );
log.debug( r.toString() );

any workaround?

Original comment by siarhei....@gmail.com on 26 Nov 2012 at 4:19

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
What if you put the equivalent code in Java?

Original comment by pop.atry@gmail.com on 27 Nov 2012 at 12:05

GoogleCodeExporter commented 9 years ago

Original comment by pop.atry@gmail.com on 27 Nov 2012 at 12:05