facebookarchive / swift

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

Allow extending multiple ThriftServices to compose a service #171

Closed andrewcox closed 10 years ago

andrewcox commented 10 years ago

When swift2thrift was implemented, we added a restriction that a @ThriftService class cannot extend multiple @ThriftService classes, ever. This was because if we find this pattern in Swift classes, we cannot generate code for it in Thrift IDL, because that language doesn't support it.

However we only need to disallow swift2thrift codegen for this. We can still allow this pattern in swift, as long as you separate the @ThriftServices you intend to export via swift2thrift into interface classes, and only compose them in an implementation @ThriftService class that you don't intend to export via swift2thrift.