https://kotlinlang.org logo
#arrow
Title
# arrow
d

dimsuz

07/25/2022, 1:00 PM
This probably was discussed before, but as a first-time arrow-optics user (it's great, thanks!), I wish adding
@optics
would automatically generate
companion object
if it's missing. I'm almost sure that this wasn't done because of some KSP/kotlin plugin API limitation, but maybe there's an issue I can vote on for Kotlin team to make this possible some day?
s

simon.vergauwen

07/25/2022, 1:30 PM
Hey @dimsuz, This is indeed a limitation of KAPT/KSP and we cannot automatically add the
companion object
😞 "Soon" when Kotlin Compiler API becomes stable we can move away from KSP, and write a compiler plugin that removes this requirement of manually adding
companion object
.
d

dimsuz

07/25/2022, 2:10 PM
Hah, got it! 👍
6 Views