Dgeodjo / nanopb

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

Warnings for bad fields in options file #105

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Describe the requested feature:

It would be nice if one got some warning when using field names in the options 
file not present in the proto. I just when almost crazy trying to figure out 
why the options I set had no effect, then I realized I was using a "package" 
and that needed to be included in the options line as well.

In what situation would the feature be useful:

Original issue reported on code.google.com by augustbe...@gmail.com on 11 Feb 2014 at 11:50

GoogleCodeExporter commented 9 years ago
Yes, this is a good idea.

Should also augment the --verbose option so that it prints to stderr so that it 
will work with the protoc plugin. It will print all the parsed options and 
message names that have to be used, like this:

petteri@oddish:~$ cat test.proto 
message MyMessage {
   repeated int32 member = 1;
}

petteri@oddish:~$ protoc -otest.pb test.proto

petteri@oddish:~$ python nanopb/generator/nanopb_generator.py -v test.pb
Reading options from test.options
Options for test.pb:
Options for MyMessage:
Options for MyMessage.member:
Writing to test.pb.h and test.pb.c

Original comment by Petteri.Aimonen on 11 Feb 2014 at 2:07

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

Original comment by Petteri.Aimonen on 12 Feb 2014 at 5:22

GoogleCodeExporter commented 9 years ago
Fix released in nanopb-0.2.6

Original comment by Petteri.Aimonen on 15 Feb 2014 at 3:00