Home Bug Reports

Ice 3.5.0 slice2cpp bug...

Quentin-Quentin- Member Quentin NarferaoOrganization: PersonalProject: Java server, C++ client application, web.
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

Comments

  • mesmes CaliforniaAdministrators, ZeroC Staff Mark SpruiellOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    Hi,

    Welcome to the forum, and thanks for bringing this to our attention.

    Regards,
    Mark
  • Quentin-Quentin- Member Quentin NarferaoOrganization: PersonalProject: Java server, C++ client application, web.
    Hi

    Thanks,

    Any thoughts on a fix (timeframe, workaround)?

    -Q
  • mesmes CaliforniaAdministrators, ZeroC Staff Mark SpruiellOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    The C++ code in our Protocol Buffers example needs updating for compatibility with Ice 3.5. We'll update the project in the next day or so.

    Mark
  • Quentin-Quentin- Member Quentin NarferaoOrganization: PersonalProject: Java server, C++ client application, web.
    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,
  • mesmes CaliforniaAdministrators, ZeroC Staff Mark SpruiellOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    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,
    Mark
Sign In or Register to comment.