Skip to content

ExProtobuf fails with gpb 4.13 #113

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
rbino opened this issue Jul 3, 2020 · 1 comment
Open

ExProtobuf fails with gpb 4.13 #113

rbino opened this issue Jul 3, 2020 · 1 comment

Comments

@rbino
Copy link

rbino commented Jul 3, 2020

Crash message:

== Compilation error in file lib/astarte_rpc/protocol/data_updater_plant.ex ==
** (CaseClauseError) no case clause matching: %Protobuf.Field{fnum: 1, name: :version, occurrence: :defaulty, opts: [], rnum: 2, type: :int32}
    lib/exprotobuf/define_message.ex:147: Protobuf.DefineMessage.define_trivial_typespec_fields/2
    lib/exprotobuf/define_message.ex:135: Protobuf.DefineMessage.define_trivial_typespec/1
    lib/exprotobuf/define_message.ex:54: Protobuf.DefineMessage.def_message/3
    lib/exprotobuf/builder.ex:135: anonymous fn/6 in Protobuf.Builder.generate/2
    (elixir 1.10.3) lib/enum.ex:2111: Enum."-reduce/3-lists^foldl/2-0-"/3
    lib/exprotobuf/builder.ex:82: Protobuf.Builder.generate/2
    (stdlib 3.13) erl_eval.erl:680: :erl_eval.do_apply/6
    (stdlib 3.13) erl_eval.erl:449: :erl_eval.expr/5

This also seems another instance of the same problem.

It seems that gpb 4.13 changed its internal structure and ExProtobuf does not handle the :defaulty occurrence.

I've opened #112 to fix the problem

matt-mazzucato added a commit to matt-mazzucato/astarte_core that referenced this issue Jul 20, 2020
Lock gpb to 4.12.0 due to the issue described here: bitwalker/exprotobuf#113

Signed-off-by: Mattia Mazzucato <[email protected]>
@tomas-abrahamsson
Copy link

I've pushed gpb 4.14.1 which I think might make exprotobuf work again.

Annopaolo added a commit to Annopaolo/astarte_core that referenced this issue Nov 14, 2022
Update exprotobuf and contextually unlock gpb, since
bitwalker/exprotobuf#113 was
solved in latest version.

Signed-off-by: Arnaldo Cesco <[email protected]>
Annopaolo added a commit to Annopaolo/astarte_core that referenced this issue Nov 14, 2022
- Update exprotobuf and contextually unlock gpb, since
bitwalker/exprotobuf#113 was
solved in latest version.

- Update excoveralls to support latest Elixir version
(see parroty/excoveralls#267).

Signed-off-by: Arnaldo Cesco <[email protected]>
Annopaolo added a commit to Annopaolo/astarte_rpc that referenced this issue Nov 14, 2022
- Update exprotobuf and contextually unlock gpb, since
bitwalker/exprotobuf#113 was
solved in latest version.

- Update excoveralls to support latest Elixir version
(see parroty/excoveralls#267).

Signed-off-by: Arnaldo Cesco <[email protected]>
Annopaolo added a commit to Annopaolo/astarte_rpc that referenced this issue Nov 14, 2022
- Update exprotobuf and contextually unlock gpb, since
bitwalker/exprotobuf#113 was
solved in latest version.

- Update excoveralls to support latest Elixir version
(see parroty/excoveralls#267).

Signed-off-by: Arnaldo Cesco <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants