Skip to content

Multiple references to the same Command Response generates multiple similar enum definitions #9

@mrjerryjohns

Description

@mrjerryjohns

When there are multiple command requests referencing the same command response definition, it seems to cause WDLC to emit multiple similar definitions of the parameter list enumeration for the response.

E.g:

  message TestARequest {
    option (wdl.message_type) = COMMAND;
    option (wdl.command) = {
      id: 0x05,
      completion_event: "Response"
    };

    int32 a = 1;
  }

  message TestBRequest {
    option (wdl.message_type) = COMMAND;
    option (wdl.command) = {
      id: 0x06,
      completion_event: "Response"
    };

    int32 b = 1;
  }
  
  message Response {
    option (wdl.message_type) = RESPONSE_EVENT;

    int32 resp = 1;
  }

Generated C++ device code:

enum TestARequestParameters {
    kTestARequestParameter_A = 1,
};

enum TestBRequestParameters {
    kTestBRequestParameter_B = 1,
};

enum ResponseParameters {
    kResponseParameter_Resp = 1,
};

enum ResponseParameters {
    kResponseParameter_Resp = 1,
};

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions