tsloughter / grpcbox

Erlang grpc on chatterbox
Apache License 2.0
139 stars 62 forks source link

-spec incorrect for enum generated erlang code #93

Closed geib closed 2 years ago

geib commented 2 years ago

I have a .proto file with enum definitions, and when I generate the erlang code I find that the -spec definitions for fqbin_to_msg_name() and msg_name_to_fqbin() are swapped, see below snippet.

-spec msg_name_to_fqbin(_) -> no_return().
fqbin_to_msg_name(E) -> error({gpb_error, {badmsg, E}}).

-spec fqbin_to_msg_name(_) -> no_return().
msg_name_to_fqbin(E) -> error({gpb_error, {badmsg, E}}).
tsloughter commented 2 years ago

Thanks but this is an issue with the proto generator gpb, https://github.com/tomas-abrahamsson/gpb, that is used to generate the protobuf encode/decode module.

geib commented 2 years ago

Understood. Thanks.