thriftpy
thriftpy copied to clipboard
Parser doesn't handle circular dependencies
Thrift includes support for circular dependencies - although the python thrift generation doesn't yet support this feature. When trying to load thrift files with cyclic dependencies, the parser bombs out with a thriftpy.parser.exc.ThriftParserError
e.g:
struct TFoo {
1. required string a_string,
2: optional TBar bar,
}
struct TBar {
1: required i32 some_id,
2: required TFoo foo,
}
It's a known defect, thanks for reporting, I will try to fix it in the future.
I tried to fix it in thriftpy2, go to https://github.com/Thriftpy/thriftpy2/pull/21 and get more informations, hope to see your feedback, thanks.