thriftpy icon indicating copy to clipboard operation
thriftpy copied to clipboard

Parser doesn't handle circular dependencies

Open sicklydove opened this issue 8 years ago • 2 comments

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,
}

sicklydove avatar Feb 22 '17 15:02 sicklydove

It's a known defect, thanks for reporting, I will try to fix it in the future.

ethe avatar Sep 26 '18 13:09 ethe

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.

ethe avatar Dec 09 '18 16:12 ethe