Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Extensions #27

Open
Jud opened this Issue · 0 comments

1 participant

@Jud

Extensions don't seem to work. For example, here is my base.proto:

message Request {
  enum RequestType {
    // Let us know you are a player
    AUTH  = 1;

    // These apply to `channels`
    JOIN  = 2;
    LEAVE = 3;

    // This is a passthrough type
    // Pocket will pass this to the server listeners
    // for decoding
    MESSAGE = 4;
  }

  message Auth {
    optional string key = 1;
    optional string verifier = 2;
  }

  message Channel {
    optional string name = 1;
  }

  required RequestType request_type = 1;

  optional Channel channel = 2;
  optional Auth auth = 4;

  extensions 100 to 199;
}

When I try to extend in extension.proto:

import "base.proto";

extend Request {
  required string name = 100;
}

Loading extension.proto and encoding anything always results in blank messages being encoded, causing the decode to fail since required fields are missing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.