Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Referencing a message from another proto file in an rpc causes missing imports in generated files #39

Open
@ebuxk

Description

When generating the below common.proto & game-broken.proto, Private/SGame/GameContext.cpp has compilation issues.

GameContext.cpp(19): Error C2665 : 'TURBOLINK_TO_GRPC': no overloaded function could convert all the argument types

I found 2 ways to work around this:

  1. Editing the generated files. Manually add the include for /SCommon/CommonMarshaling.h to /SGame/GameContext.cpp.
  2. Wrapping the Player message from common.proto with a message defined inside game.proto. See game-workaround.proto below.

common.proto

package common;
message Player {
 uint64 id = 1;
 string username = 2;
 string auth_key = 3;
}

game-broken.proto

package game;
import "common.proto";
service TestTurbo {
 rpc TestTurboFunc(common.Player) returns (common.Player);
}

game-workaround.proto

package game;
import "common.proto";
message TestTurboFuncMessage {
 common.Player player = 1;
}
service TestTurbo {
 rpc TestTurboFunc(TestTurboFuncMessage) returns (TestTurboFuncMessage);
}

Thank you for all your time and focus on turbolink. 👍

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /