Automatic and customizable compile time transformations between similar case classes and sealed traits/enums, essentially a thing that glues your code. Scala 3 only. Or is it duct 🤔
I ran into this macro expansion error while taking my very first steps with ducktape:
import scala.collection.immutable.SortedSet
import io.github.arainko.ducktape.to as convertTo
import io.github.arainko.ducktape.Transformer
final class MyClassA
final class MyClassB
given Transformer[MyClassA, MyClassB] = ???
val x: SortedSet[MyClassA] = ???
val y: SortedSet[MyClassB] = x.convertTo[SortedSet[MyClassB]]
Exception occurred while executing macro expansion.
java.util.NoSuchElementException: None.get
at scala.None$.get(Option.scala:627)
at scala.None$.get(Option.scala:626)
at io.github.arainko.ducktape.internal.PlanInterpreter$.recurse(PlanInterpreter.scala:120)
at io.github.arainko.ducktape.internal.PlanInterpreter$.run(PlanInterpreter.scala:12)
at io.github.arainko.ducktape.internal.TotalTransformations$.createTransformationBetween(TotalTransformations.scala:27)
at io.github.arainko.ducktape.internal.TotalTransformations$.inline$createTransformationBetween(TotalTransformations.scala:15)
I ran into this macro expansion error while taking my very first steps with ducktape:
https://scastie.scala-lang.org/XZGly8FpQSyEooMfm3Ex6g
Turns out that it was only a missing
Ordering
instance. It would be great if the error message could somehow be more helpful.