protobuf icon indicating copy to clipboard operation
protobuf copied to clipboard

lib/elixirpb/pb_extension.pb.ex is missing in the package

Open sekiyama58 opened this issue 1 year ago • 0 comments

lib/elixirpb/pb_extension.pb.ex is missing in the 0.11.0 or 0.12.0 packages. Due to lacking the extension, the decoder fails to read FileOptions from descriptor_set. Instead, it is put into __unknown_fields__ , like:

  %Google.Protobuf.FileDescriptorProto{
    name: "model/test.proto",
...
    options: %Google.Protobuf.FileOptions{
      java_package: nil,
      ...
      uninterpreted_option: [],
      __pb_extensions__: %{},
      __unknown_fields__: [
        {1047, 2, <<10, 16, 72, ...>>}
      ]
    }, ...

Expected result (this is returned if the library is directly loaded from the local repository path checked out from GitHub):

  %Google.Protobuf.FileDescriptorProto{
    name: "model/test.proto",
...
    options: %Google.Protobuf.FileOptions{
      java_package: nil,
      ...
      uninterpreted_option: [],
      __pb_extensions__: %{
        {Elixirpb.PbExtension, :file} => %Elixirpb.FileOptions{
          module_prefix: "TestModulePrefix",
          __unknown_fields__: []
        }
      },
      __unknown_fields__: []
    }, ...

sekiyama58 avatar Feb 06 '24 03:02 sekiyama58