Skip to content

parser: doesn't support repeated option value #1329

@zonyitoo

Description

@zonyitoo

protobuf.js version: 5.0.3

message MessageWithRepeatedOption {
    optional int32 value = 1 [(customized_option) = { in: [1, 2, 3] }];
}

We call it with pbjs.main (command line API).

Error: Error: no such Type or Enum 'mmgameauthadminweb.AddSubAuthSetResponse' in Type .mmgameauthadmindbmq.AddSubAuthSetResponse
    at Object.<anonymous> (/Users/littledu/WGFE/weadmin/backend/dist/helpers/apiManage/descGenerator.js:339:27)
    at step (/Users/littledu/WGFE/weadmin/backend/dist/helpers/apiManage/descGenerator.js:43:23)
    at Object.throw (/Users/littledu/WGFE/weadmin/backend/dist/helpers/apiManage/descGenerator.js:24:53)
    at rejected (/Users/littledu/WGFE/weadmin/backend/dist/helpers/apiManage/descGenerator.js:16:65)

The stacktrace isn't very useful. But after deleted in: [1, 2, 3] in .proto file, everything worked Ok.

Related code: https://github.com/protobufjs/protobuf.js/blob/master/src/parse.js#L556-L577 . It seems that parser doesn't handle [ and ].

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