While I was working to add support for Forwards and Side Effects I ended up noticing that the gRPC client of the Elixir library that uses the Gun library had some errors when I tried to return a Stream mapped with the results of the requests to the user role as a return in calling a GenServer.
Error:
I was only able to solve the problem when I materialized the stream through an Enum.to_list() and returned a list instead of the Stream:
While this works for the moment and I keep this workaround for now I believe this approach is not the best approach to what we need to do.
The Elixir gRPC library is pretty bad to work with stream, its API is quite confusing and passive of errors in its use and from time to time I end up encountering these kinds of strange errors.
It is essential that we manage to work well with un-bounded streams (infinite streams) and we need to quickly find an alternative to this library. We recently forked this library and renamed it Falco, we need to speed up work on this version to resolve these issues
Describe the bug
While I was working to add support for Forwards and Side Effects I ended up noticing that the gRPC client of the Elixir library that uses the Gun library had some errors when I tried to return a Stream mapped with the results of the requests to the user role as a return in calling a GenServer.
Error:
I was only able to solve the problem when I materialized the stream through an Enum.to_list() and returned a list instead of the Stream:
While this works for the moment and I keep this workaround for now I believe this approach is not the best approach to what we need to do. The Elixir gRPC library is pretty bad to work with stream, its API is quite confusing and passive of errors in its use and from time to time I end up encountering these kinds of strange errors. It is essential that we manage to work well with un-bounded streams (infinite streams) and we need to quickly find an alternative to this library. We recently forked this library and renamed it Falco, we need to speed up work on this version to resolve these issues