amoraller / protobuf-net

Automatically exported from code.google.com/p/protobuf-net
Other
0 stars 0 forks source link

GetProto does not write the names and message types of subtypes in proto message for base class #310

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Please include an e-mail address if this might need a dialogue!
==============

What steps will reproduce the problem?
1. call GetProto on a type with derived types or base types

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

Here is the file generated, you can see that the message for the base class is 
missing the name and type of all derived classes:

package MyLib;

message Animal {
   optional int32 NumberOfLegs = 1 [default = 0];
   // the following represent sub-types; at most 1 should have a value
   optional   = 2;
   optional   = 3;
}
message Cat {
   repeated Animal AnimalsHunted = 1;
}
message Dog {
   optional string OwnerName = 1;
}

What version of the product are you using? On what operating system?
I am using revission 560 from trunk

Please provide any additional information below.

Original issue reported on code.google.com by Franches...@gmail.com on 2 Aug 2012 at 3:12

GoogleCodeExporter commented 9 years ago
I am also not seeing any proto message at all being created for Enums. Both of 
these things were working in an earlier revision.

Original comment by Franches...@gmail.com on 2 Aug 2012 at 4:22

GoogleCodeExporter commented 9 years ago
I tweaked Name vs GetSchemaTypeName - should be. Trivial fix from there. Will 
do later today.

Thanks for spotting / reporting.

Original comment by marc.gravell on 2 Aug 2012 at 5:34

GoogleCodeExporter commented 9 years ago
Fixed r561

Original comment by marc.gravell on 2 Aug 2012 at 7:14