rebar3_gpb_plugin icon indicating copy to clipboard operation
rebar3_gpb_plugin copied to clipboard

how to generalize the proto files path for umbrella projects

Open phani35 opened this issue 2 years ago • 2 comments

I have a umbrella project which has multiple OTP applications. I tried to integrate proto files repository as below for one of the application and it works fine . Now if I try to add appl2 in main top application 1 it will not detect the proto files as the path _build/default/lib/appl3 is not discoverable. Is it possible to generalize the {i, "_build/default/lib/appl3/proto"}, value so that it can be detected when appl2 in integrated in another application.

rebar.config of appl2

{deps, [ {appl3, {git, "https://<githuburl>/a/appl3.git", {branch, "master"}}} ]}. {gpb_opts, [ {i, "_build/default/lib/appl3/proto"}, {o_erl, "src"}, {o_hrl, "src"}, {strings_as_binaries, true}, type_specs, maps ]}.

rebar.config of top appl1

{deps, [ {appl2, {git, "https://<githuburl>/a/appl2.git", {branch, "master"}}} {appl3, {git, "https://<githuburl>/a/appl3.git", {branch, "master"}}} ]}.

phani35 avatar Mar 23 '22 12:03 phani35

are you able to put together a sample application here on github that i could try out?

lrascao avatar Mar 23 '22 22:03 lrascao

Hello, I will try to create a sample application https://github.com/phani35/erlapp1.git -- I am not sure this is working

Is it possible to mention multiple proto path as input eg:

{gpb_opts, [
  {i, "_build/default/lib/erlapp3/proto"},                % path/to/proto_dir
  {i, "_build/default/checkouts/erlapp4/proto"},                % path/to/proto_dir
  {module_name_suffix, "_pb"},
  {o_erl, "src"},
  {o_hrl, "include"},
  {strings_as_binaries, true},
  type_specs]}.

Thanks, Phani

phani35 avatar Mar 24 '22 14:03 phani35