as part of the on-going simplification for Arrow 2...
# arrow
a
as part of the on-going simplification for Arrow 2.0, we’ve pruned the big hierarchy of optics to the Main Four: Lens (for fields), Prism (for sealed hierarchies of classes), Optionals (for focusing on 0 or 1 elements, also the parent of both Lens and Prism), and Traversal (for any amounf of foci, so it can be used on list and such) however, we want to ensure that this change doesn’t break builds in disastrous ways. If you’re using Arrow Optics, it would help a lot if you tried the
2.0-SNAPSHOT
version, which is available in the snapshots repository
Copy code
maven("<https://oss.sonatype.org/content/repositories/snapshots>")
any further feedback about this change is welcome
🙌 1
s
Prism (for sealed classes) ?
p
case classes? scala 👀
c
i have this error
Symbol is declared in module 'jdk.compiler' which does not export package 'com.sun.tools.javac.jvm'
, but i don´t know if i do something wrong haha
i am using this
Copy code
id 'org.jetbrains.kotlin.jvm' version '1.8.0-RC' apply false
   id 'com.google.devtools.ksp' version '1.8.0-RC-1.0.8' apply(false)
should i use old versions like 1.7.20?
s
There is probably a broken change in the compiler from 1.7.x and 1.8.x so I assume 1.7.x KSP won't work with 1.8.x
c
the problem was that I added this class import
com.sun.tools.javac.jvm.Items
instead of my own 🥲
t
Builds work fine (rip Iso) the only issue we have is
Copy code
@optics
data class Foo(
  val bar: Bar?
){
 companion object
}

@optics
data class Bar(
  val baz: String
){
  companion object
}

...
Foo.bar.baz.set(foo, "")
this does not generate the
.baz
correctly. It seems that generation of optics on nullable properties broke.
s
What version are you on? @Alejandro Serrano Mena just changed it in
2.0.0
. It became
Foo.bar.notNull.baz.set(foo, "")
t
2.0.0-SNAPSHOT
. Let me quickly check
you're correct. Works fine, it was just different syntax 🙂