Closed Xiaobin0860 closed 5 years ago
syntax = "proto3"; //012345678901 message Test { }
elixir --version Erlang/OTP 20 [erts-9.3] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:10] Elixir 1.7.2 (compiled with Erlang/OTP 19) protoc.exe --version libprotoc 3.6.1
%Google.Protobuf.SourceCodeInfo.Location{leading_comments: "0123456789", leading_detached_comments: [], path: [0, 4], span: [1, 4, 0, 2], trailing_comments: nil} 48 6 0 ** (Protobuf.DecodeError) Google.Protobuf.SourceCodeInfo.Location: wrong wire_type for leading_detached_comments: got 0, want 2 lib/protobuf/decoder.ex:36: Protobuf.Decoder.do_decode/3 lib/protobuf/decoder.ex:74: Protobuf.Decoder.put_field/5 lib/protobuf/decoder.ex:31: Protobuf.Decoder.do_decode/3 lib/protobuf/decoder.ex:74: Protobuf.Decoder.put_field/5 lib/protobuf/decoder.ex:31: Protobuf.Decoder.do_decode/3 lib/protobuf/decoder.ex:74: Protobuf.Decoder.put_field/5 lib/protobuf/decoder.ex:31: Protobuf.Decoder.do_decode/3 lib/protobuf/protoc/cli.ex:8: Protobuf.Protoc.CLI.main/1 --elixir_out: protoc-gen-elixir: Plugin failed with status code 1.
It seems a bug. Thank you for reporting!
It seems not a bug in protobuf-elixir. The error shows what Elixir gets is wrong.