Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8531841
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T09:34:42+00:00 2026-06-11T09:34:42+00:00

I am working on a project that uses google proto buffers for internal data

  • 0

I am working on a project that uses google proto buffers for internal data exchanges. It works fine as advertised, however it doesn’t works as expected for messages with repeated fields in them. Here is an example:

Sample test.proto file:

message Test {
    optional string t = 1;
}

message Tests {
    repeated Test testsList = 1;
}

Generate erlang code:

1> protobuffs_compile:scan_file("test.proto").
=INFO REPORT==== 14-Sep-2012::16:38:25 ===
Writing header file to "test_pb.hrl"

=INFO REPORT==== 14-Sep-2012::16:38:25 ===
Writing beam file to "test_pb.beam"
ok

Generated test_pb.hrl:

-ifndef(TEST_PB_H).
-define(TEST_PB_H, true).
-record(test, {
    t
}).
-endif.

-ifndef(TESTS_PB_H).
-define(TESTS_PB_H, true).
-record(tests, {
    testslist = []
}).
-endif.

Encode:

5> test_pb:encode_tests({tests, [{test, <<"t">>}]}).
<<10,3,10,1,116>>

Decode:

6> test_pb:decode_tests(<<10,3,10,1,116>>).
{[{test,"t"}],undefined}

As in the above example, decoding doesn’t give back the expected record tuple:

{tests, [{test, <<"t">>}]}

Has someone faced a similar issue before? Where am I missing the trick?
Any pointers and help will be greatly appreciated.

For versioning info, deps line from my rebar.config:

{protobuffs, "0.7.0", {git, "git://github.com/basho/erlang_protobuffs.git", {tag, "0.7.0"}}}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T09:34:44+00:00Added an answer on June 11, 2026 at 9:34 am

    Just for an update.

    0.7.0, 0.6.0 and HEAD were all giving me the same problem as described above.

    After discussion on #riak IRC, I realized we need to use stable release marked by this commit hash: e0f5f6ea4c3dcb4e7b824496d2b48333fbd5a8c8 which solves the above issue.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on a project that uses Linq2SQL for data access. The project is
I am currently working on a project that uses a Google Earth API library
I am working on a project that uses VFW. I have done Google searches
I'm working on a project that uses several languages: SQL for querying a database
I'm working on a project that uses the new CSS3 transform:rotate(180deg) feature. Every modern
I am working on a project that uses Java Swing. The default look and
I'm working on a project that uses dependency injection via Ninject. So far, it
We use Subversion locally, and we're working on a project that uses a fork
I am working with a C# project that uses the dll, Microsoft.Dynamics.AX.ManagedInterop to work
I'm currently working on a JavaScript project that uses the HTML5 canvas as a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.