appnexus / pyrobuf

A Cython alternative to Google's Python Protobuf library
Other
554 stars 76 forks source link

No support for package name resolution in type name resolution #119

Open mjmdavis opened 5 years ago

mjmdavis commented 5 years ago

Pyrobuf does not support package resolution when resolving type names.

When processing a line like:

optional package.enumtype fieldname = 4;

the parser returns:

Exception: Unexpected character '.' on line 35: '    optional package.enumtype fieldname = 4;'

This looks like it could be an easyish fix.

First step would be adding a . to the regex here https://github.com/appnexus/pyrobuf/blob/master/pyrobuf/parse_proto.py#L23

Then would need to work out how to resolve the packages based on the field type strings.