elixir-grpc / grpc

An Elixir implementation of gRPC
https://hex.pm/packages/grpc
Apache License 2.0
1.39k stars 212 forks source link

How to use this elixir-grpc in a erlang project, do you have an example? #313

Closed tclugao closed 1 year ago

tclugao commented 1 year ago

Describe the question as the title, we also want to introduce the "elixir-grpc" to an Erlang project (using rebar3 as deps management), do you have a example?

Versions:

following are my tryout for add deps in erlang rebar3.config file

{grpc,                 {git, "git@github.com:elixir-grpc/grpc.git"},                   {branch, "master"}},
{protobuf,          {git, "git@github.com:tigertext/protobuf.git",            {branch, "lugao_v1"}}},  

protubuf is forked from protobuf repo and there no code to modify comapred to protobuf v0.10.0,

and then when I run rebar3 as test shell, report the following error: ===> Failed to boot grpc for reason {"no such file or directory", "grpc.app"} ===> Failed to boot eex for reason {"no such file or directory", "eex.app"}

polvalente commented 1 year ago

Unfortunately I am not familiar with rebar3 to help with this. I'm gonna leave the issue open in the hope that someone else can chime in. Perhaps try asking in Erlang channels about pulling Elixir dependencies in general for Erlang projects?

However, I should point out that you might need to include some Elixir source code in your project due to the heavy usage of macros in the normal interface for this lib.

tclugao commented 1 year ago

thank you! I have solved the problem, the rebar plugin rebar_mix have bug and I have fixed in my branch! erlang toolchain is so poor, lol, please close this issue at your convenience!