Hi, another (simpler) question this time... I just stumbled upon Arrow Meta which looks interesting. I want to make a façade for flutter pigeon. Pigeon only allows a small set of class/service definitions created in dart. I would want to define said service definitions in Kotlin and make a Gradle plugin/task to generate dart classes. Using Arrow Meta, what would be the right way to do this? Just create a low-level converter which maps elements one by one? Or is there a better pattern for this?
b
Big Chungus
12/23/2021, 11:35 PM
Arrow meta is too overpowered for this. I'd recommend writing a #ksp processor instead.
g
Gillian Buijs
12/24/2021, 9:53 AM
Thanks, I will look into that! I understand arrow meta is a bit much for a simple thing like this, but I do intent to do a lot more with it. My end goal is to make a transpiler to be able to create flutter apps with kotlin. Someone else recently started a similiar effort (check out Dotlin github).
b
Big Chungus
12/24/2021, 9:55 AM
I got that, but in any case, you will only be generating new code, as opposed to modifying kotlin IR for existing code. Because of that, you'll have much better time with KSP as opposed to arrow meta or raw compiler plugin due to greatly reduced and simplified API surface.