Skip to content

ExProtobuf fails with gpb 4.13 #113

@rbino

Description

@rbino

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions