valentiay / phobos

Efficient and expressive XML data-binding library for Scala
Apache License 2.0
20 stars 5 forks source link

Sample code causes stack overflow on Scala 3.5.1 #29

Open steffenlaursen opened 1 month ago

steffenlaursen commented 1 month ago

Your example code causes a stack overflow on Scala 3.5.1.

Replacing the implicit vals with givens fixes it.

Exception in thread "main" java.lang.StackOverflowError
    at PhobosTest$Journey$3$.<init>(PhobosTest.scala:23)
    at PhobosTest$.Journey$lzyINIT1$1(PhobosTest.scala:23)
    at PhobosTest$.PhobosTest$$$_$Journey$2(PhobosTest.scala:23)
    at PhobosTest$Journey$3$.<init>(PhobosTest.scala:24)
    at PhobosTest$.Journey$lzyINIT1$1(PhobosTest.scala:23)
    at PhobosTest$.PhobosTest$$$_$Journey$2(PhobosTest.scala:23)
    at PhobosTest$Journey$3$.<init>(PhobosTest.scala:24)
    at PhobosTest$.Journey$lzyINIT1$1(PhobosTest.scala:23)
    at PhobosTest$.PhobosTest$$$_$Journey$2(PhobosTest.scala:23)
    at PhobosTest$Journey$3$.<init>(PhobosTest.scala:24)
    at PhobosTest$.Journey$lzyINIT1$1(PhobosTest.scala:23)
    at PhobosTest$.PhobosTest$$$_$Journey$2(PhobosTest.scala:23)
    at PhobosTest$Journey$3$.<init>(PhobosTest.scala:24)
etc
valentiay commented 1 month ago

Hi! Could you please provide a full code sample (including build configuration) and info about phobos and java versions? With sbt console compilation fails, and I will fix that in the example, but I didn't manage to reproduce StackOverflowError both locally and in Scastie