Archived
This forum has been archived. Please start a new discussion on GitHub.
Ice 3.5.0 slice2cpp bug...
Quentin-
in Bug Reports
Hello,
Ice 3.5 slice compiler for C++ seems to have introduced a bug regarding protobuf usage.
The slice2java still correctly interprets metadata for a protobuf based sequence, however slice2cpp no longer does.
This can be most easily demonstrated using your sample at: ZeroC - Protocol Buffers - Download
Compiling Hello.ice from the java directory which contains:
["java:protobuf:tutorial.PersonPB.Person"] sequence<byte> Person;
slice2java Hello.ice
Result: success
Compiling Hello.ice from the cpp directory which contains:
["cpp:protobuf:tutorial::Person"] sequence<byte> Person;
slice2cpp Hello.ice
Result: failure
Detail:
demo/cpp/Hello.ice:19: warning: ignoring invalid metadata `cpp:protobuf:tutorial::Person'
This warning is a bit more serious as the proper code is not generated and therefore a compile will fail.
Cheers,
-Q
Ice 3.5 slice compiler for C++ seems to have introduced a bug regarding protobuf usage.
The slice2java still correctly interprets metadata for a protobuf based sequence, however slice2cpp no longer does.
This can be most easily demonstrated using your sample at: ZeroC - Protocol Buffers - Download
Compiling Hello.ice from the java directory which contains:
["java:protobuf:tutorial.PersonPB.Person"] sequence<byte> Person;
slice2java Hello.ice
Result: success
Compiling Hello.ice from the cpp directory which contains:
["cpp:protobuf:tutorial::Person"] sequence<byte> Person;
slice2cpp Hello.ice
Result: failure
Detail:
demo/cpp/Hello.ice:19: warning: ignoring invalid metadata `cpp:protobuf:tutorial::Person'
This warning is a bit more serious as the proper code is not generated and therefore a compile will fail.
Cheers,
-Q
0
Comments
-
Hello,
Are there any docs/examples that show how to change usage of protobuf when using C++ for 3.5? As I noted before the java usage is compatible with 3.4.2 but C++ changed, the examples at ZeroC Labs: Protocol Buffers / ZeroC - Protocol Buffers - Download haven't yet been updated but is there somewhere else I could look to get a clue as to what I must change?
Thanks,0 -
Hi,
I'm hoping to post the updated sample project today. Meanwhile, you can look at this page in the manual for details on substituting custom types for sequences. The manual omits some of the marshaling details, so I've attached a header file that includes the necessary code.
Regards,
Mark0
