mlot / nanopb

Automatically exported from code.google.com/p/nanopb
zlib License
0 stars 0 forks source link

Fix cyclic message support #130

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create proto file with two messages referring each other:

message Foobar1
{
        optional Foobar2 abc = 1;
}

message Foobar2
{
        optional Foobar1 def = 1;
}

2. Create options file:

* type:FT_CALLBACK

3. Try to compile. Gives error:
AssertionError: A cyclic dependency exists amongst {'Foobar2': 
set(['Foobar1']), 'Foobar1': set(['Foobar2'])}

What is the expected output? What do you see instead?

Nanopb should generate callback fields without problem.
For pointer fields it needs to generate forward declaration

Original issue reported on code.google.com by Petteri.Aimonen on 20 Aug 2014 at 2:16

GoogleCodeExporter commented 9 years ago
This issue was updated by revision df7234fd8b87.

Original comment by Petteri.Aimonen on 28 Aug 2014 at 6:25

GoogleCodeExporter commented 9 years ago
Fix released in nanopb-0.3.1

Original comment by Petteri.Aimonen on 11 Sep 2014 at 5:13