Closed pallix closed 5 years ago
Serializable.serialize does not work when using inject. I have created a project (https://github.com/pallix/exprotobuf_not_serializing) that illustrates the problem:
Serializable.serialize
inject
iex(2)> alias Protobuf.Serializable Protobuf.Serializable iex(2)> ExprotobufNotSerializing.Hello.new(id: 1, content: [0]) |> Serializable.serialize() ** (ErlangError) Erlang error: {:error, {:no_such_key, {:msg, ExprotobufNotSerializing.Hello}, [{{:msg, :Hello}, [{:field, :id, 1, 2, :uint32, :optional, []}, {:field, :content, 2, 3, :bytes, :optional, []}]}]}} (gpb) src/gpb.erl:1286: :gpb.keyfetch/2 (gpb) src/gpb.erl:665: :gpb.encode_msg/2 iex(2)> ExprotobufNotSerializing.HelloOk.Hello.new(id: 1, content: [0]) |> Serializable.serialize() <<8, 1, 18, 1, 0>> iex(3)>
I am using exprotobuf version 1.2.9.
exprotobuf
1.2.9
Serializable.serialize
does not work when usinginject
. I have created a project (https://github.com/pallix/exprotobuf_not_serializing) that illustrates the problem:I am using
exprotobuf
version1.2.9
.