Open ikhoon opened 2 years ago
by the way i added kotlin support in thrift some time ago, could benefit from that once libthrift and compiler 0.17.0 is released in Q3 2022
It looks to support Kotlin Coroutines. Awesome! ❤️ https://github.com/apache/thrift/blob/master/compiler/cpp/src/thrift/generate/t_kotlin_generator.cc#L1393
It looks to support Kotlin Coroutines. Awesome! ❤️ https://github.com/apache/thrift/blob/master/compiler/cpp/src/thrift/generate/t_kotlin_generator.cc#L1393
yes i intended to only support suspend functions, but then (for the default implementation) delegate to jdk8 bridge for suspend function <=> async client operations, so that the generated code can still work with the existing Java libthrift library alone, i.e. there's no libthrift-kotlin library.
i can see that in armeria the thrift client is actually not based on the default implementation but rather via dynamic proxy and delegate in order to work upon HTTP protocol, so ideally this can be done similarly for kotlin
If Kotlin dependency is added to an optional dependency, we can provide Kotlin-specific extension methods and DSL for each module. For example: