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

No support for "reserved" keyword in enum #671

Open
DavidZemon opened this issue Apr 17, 2023 · 0 comments
Open

No support for "reserved" keyword in enum #671

DavidZemon opened this issue Apr 17, 2023 · 0 comments

Comments

@DavidZemon
Copy link

protobuf-codegen v3.2.0 appears to fail when using an enum with a reserved field - either reserved ID or reserved name. Both of the following enums cause a failure:

enum PackageId {
  reserved 8;

  unknownPackage = 0;
  alertCommands = 1;
  apduCommands = 2;
  channel = 3;
}
enum ProcId {
  reserved "fingerProcessNext";

  setupRequest = 0;
  tempKeyDelivery = 1;
}

It fails on PackageId first, and here's the error that it throws:

  codegen failed: parse and typecheck

  Caused by:
      0: using pure parser
      1: error in `/path/to/my/protos/commonDataTypes.proto`: at 8:12: While parsing enum field, expecting char `=`
      2: at 8:12: While parsing enum field, expecting char `=`
      3: While parsing enum field, expecting char `=`
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

Successfully merging a pull request may close this issue.

1 participant