@optics data class test( 1,2,...23) { companion object }
[ERROR] Iso generation is supported for data classes with up to 22 constructor parameters.
@optics data class test( 1,2,...23) { companion object }
[ERROR] Iso generation is supported for data classes with up to 22 constructor parameters.
bodduluri,
In Arrow-kt we only support automatic generation for
Iso
up to22 parameters
. The reason for this is that Arrow only hasTuple3
->Tuple22
defined.Pair
andTriple
from Kotlin Std are also used.The example you shared
data class test( 1,2,...23)
has 23 parameters, so Arrow cannot generate the desiredIso
.You can still automatically genrate
Lens
andOptional
for yourdata class
by specifying@optics(arrow.optics.OpticsTarget.Lens, arrow.optics.OpticsTarget.Optional)
.