lrascao / rebar3_gpb_plugin

A rebar3 plugin for automatically compiling .proto files using the gpb protobuf compiler
MIT License
54 stars 37 forks source link

is it a bug? #123

Closed gzkjh closed 4 years ago

gzkjh commented 4 years ago

rebar3_gpb_plugin version : 2.16.0 gpb version : 4.14.0

rebar3_gpb_compile:filter_included_proto/3 line 165 gpb_parse:fetch_imports/1 is removed, It will crash when I compile change to 'gpb_parse_old:fetch_imports/1' is OK.

and I have two .proto files : all.proto and stall.proto I set rebar.config the {gpb_opts, [ {f, ["all.proto"]} } It generates stall.erl and stall.hrl instead of all.erl and all.hrl

I see the code in rebar3_gpb_compile:is_wanted_proto/2 string:find(ProtoPath, WantedProto, trailing) Is this what you want? how can I generate all.erl and all.hrl ??

tomas-abrahamsson commented 4 years ago

Consider calling gpb_defs:fetch_imports/1 instead of gpb_parse_old. Things have indeed changed in 4.14.0, and I forgot to check for issues with rebar3_gpb_plugin. Sorry about that.

lrascao commented 4 years ago

2.16.1 has been pushed to hex that fixed this