What are the best ways to get started with Arrow M...
# arrow-meta
m
What are the best ways to get started with Arrow Meta? I’ve gone over some medium articles but they’re all outdated and have old versions of the API
r
Hi @Milse113 meta is currently only useful as programatic API to backend IR or if you want to use any of the existing compiler extension points. When FIR K2 is released stable we will come up with a new api for the AST and docs for it. What we have now is available just through api docs such as https://arrow-kt.io/docs/meta/apidocs/arrow-meta/arrow.meta.dsl.codegen.ir/-ir-syntax/
m
I see… I’m looking for a compiler plugin library that essentially lets me write a preprocessor. I’ve looked into alternatives such as kapt and ksp but they cant modify files. Do you know of more mature/ergonomic libraries for this?
I might be XY problem-ing here, I’ll ask about my specific use-case in a generalized channel just in case
r
There isn’t one to my knowledge that allows mutations of declaration bodies in place in the same file. That is actually usually not recommended as it throws off line numbers and makes the editor out of sync with the compiled file. Normally the approach recommended is either source code gen like KSP in separate files or going with backend IR for cases where you want to change bodies and expressions that are not part of the frontend declarations.