facebookarchive / swift

An annotation-based Java library for creating Thrift serializable types and services.
Apache License 2.0
900 stars 297 forks source link

Recursive types updates #294

Closed andrewcox closed 8 years ago

andrewcox commented 8 years ago

Fixes:

swift2thrift was generating the swift.recursive_reference based on whether the ThriftTypeReference for the field was a recursive vs normal reference. change to use the more deterministic value of the 'isRecursive' property from the @ThriftField annotation

also realized that this would allow us to generate recursive cycles without optional anywhere, so added the requirement that isRecursive=TRUE be used in conjunction with requiredness=OPTIONAL

alandau commented 8 years ago

lgtm