Fix protoc parser

- Add service support
- Better support for filename casing
that looks sane to me but make sure you add a comment or two and test cases.


On Tue, Jun 10, 2014 at 7:17 PM, Tien Nguyen <notifications@github.com>
wrote:

> In src/python/pants/backend/codegen/tasks/protobuf_gen.py:
>
> > @@ -247,6 +237,18 @@ def bool_value():
> >                                                      types))
> >      return genfiles
> >
> > +def _update_record_type(match, type_depth, outer_types):
> > +  if match and type_depth < 2: # This takes care of the case where { } are on the same line.
> > +    _record_type(outer_types, match.group(2), match.group(1))
> > +
> > +def _update_depth(line, type_depth):
> > +  # We assume there is only at most 1 '{' and 1 '}' per line.
>
> so this is broken when type_depth is wrong, i.e multiple { } on the same
> line. in that case i think most likely we will see message about missing
> file anyways? Should I update this code to something like this:
> type_depth += uline.count('{') - uline.count('}')
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/pantsbuild/pants/pull/200/files#r13625656>.
>