Morning guys, I know...it's sunday...but I'm deali...
# arrow
n
Morning guys, I know...it's sunday...but I'm dealing with optics/lenses and I'm kinda stuck. I have a multi module project and for some reason I cannot access the optics companion generated code from one module to another. By building my own lenses though everything works fine:
Copy code
@optics
data class SalesProductLine(val id: Int, val products: ListK<SalesProduct>) {companion object}

vs

val productLineLens: Lens<SalesProductLine, ListK<SalesProduct>> =
        Lens(
                get = { pl -> pl.salesProducts },
                set = { pl: SalesProductLine, products -> pl.copy(salesProducts = products )}
        )

productLineLens.every(ListK.each()) ... ....
What could it be the reason for not having the code generated by the optics annotation?