Hello everyone. We are thinking about starting to ...
# arrow
q
Hello everyone. We are thinking about starting to incorporate the Arrow Optics DSL into a substantial (100k+ loc) project. We have two questions: 1. Is there a plan or roadmap for supporting the K2/FIR compiler for Optics DSL? We are concerned about becoming heavily invested in the generated optics but unable to update our compiler or language version due to lack of support. 2. Could a tool be built for generating Kotlin source code for Optics DSL properties in case we need to "back out" of using the compiler plugin (similar to https://projectlombok.org/features/delombok)? This would give us peace of mind in the case that we cannot continue to use the plugin, we would not need to invest a huge effort in manually writing the optics. This in particular would make it much easier for me to sell Optics DSL to the team. 😉 Thanks for working on this great project!
r
Hi @Quantum64, The optics DSL plugin will be supported until the lang provides an alternative for deep immutable access that allows composition. The current KSP version based on codegen will be rewritten to FIR and may not do codegen in the same way. This is part of our plans for 2022 as soon as the FIR extension is available. The codegen option should still be present in any case since library authors may want to export optics generated as part of the public apis for users that do not use the plugin.
q
Ah, it's great to hear that there is a codegen option. I wasn't sure how the plugin works.