protobuf icon indicating copy to clipboard operation
protobuf copied to clipboard

Doesn't work on windows

Open nichita-pasecinic opened this issue 1 year ago • 1 comments

The library should be OS agnostic, but there are issues with decoding (when generating with protoc -I priv/protos --elixir_out=plugins=grpc:./lib/ priv/protos/helloworld.proto)

Even for provided helloworld example

Error trace

** (Protobuf.DecodeError) insufficient data decoding field proto_file, expected <<10, 16, 104, 101, 108, 108, 111, 119, 111, 114, 108, 100, 46, 112, 114, 111, 116, 111, 18, 10, 104, 101, 108, 108, 111, 119, 111, 114, 108, 100, 34, 34, 10, 12, 72, 101, 108, 108, 111, 82, 101, 113, 117, 101, 115, 116, 18, 18, 10, 4, ...>> to be at least 753 bytes
    (protobuf 0.11.0) lib/protobuf/decoder.ex:164: Protobuf.Decoder.decode_delimited/4
    (protobuf 0.11.0) lib/protobuf/decoder.ex:17: Protobuf.Decoder.decode/2
    (protobuf 0.11.0) lib/protobuf/protoc/cli.ex:47: Protobuf.Protoc.CLI.main/1
    (elixir 1.14.0) lib/kernel/cli.ex:131: anonymous fn/3 in Kernel.CLI.exec_fun/2
--elixir_out: protoc-gen-elixir: Plugin failed with status code 1.

It relates to - https://github.com/elixir-protobuf/protobuf/issues/279, I don't know why it was closed, it is clearly a bug for Windows OS and it should work on all OSs

nichita-pasecinic avatar Sep 10 '22 14:09 nichita-pasecinic

From the last discussion, the library has few bugs on windows like https://github.com/elixir-protobuf/protobuf/issues/280 and the maintainer conclude that we should tackle all of it.

See discussion in https://github.com/elixir-protobuf/protobuf/issues/279#issuecomment-1160130633 for more details.

wingyplus avatar Sep 11 '22 02:09 wingyplus