Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
mrjerryjohns opened this issue Jul 16, 2019 · 0 comments

Comments

@mrjerryjohns
Copy link
Collaborator

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,
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant