tapir
tapir copied to clipboard
[BUG] method `schemaForCaseClass` is declared as erased, but is in fact used
Tapir version: 0.19.1+
Scala version: 3.1.0
Describe the bug
What is the problem? mysterious compile errors
method isValueClass is declared as erased, but is in fact used
method isObject is declared as erased, but is in fact used
method schemaForCaseClass is declared as erased, but is in fact used
method anns is declared as erased, but is in fact used
method typeInfo is declared as erased, but is in fact used
method typeAnns is declared as erased, but is in fact used
method getParams is declared as erased, but is in fact used
method summon is declared as erased, but is in fact used
How to reproduce?
Maybe you can provide code to reproduce the problem? https://scastie.scala-lang.org/Fy5fl0keRXWtP8i5bSCymA
Additional information
If reduce field numbe of case class StandardAreaInfo or TwinNode by 1,for example, comment country:String or city:String, or realSceneID:UUID or coverImage:Option[String] , the errors disappears
I have the same Problem: Tapir version: 0.18.3 Scala version: 3.1.0
To a certain point I could work around this problem with
scalacOptions ++= Seq(
"-Xmax-inlines",
"50" // is declared as erased, but is in fact used
)
Compiling gets really slow though.
I got this from here https://github.com/lampepfl/dotty/issues/13044
Maybe this is related.
Same issue here, however I worked around it by using Schema.derived[T]
See https://github.com/softwaremill/magnolia/issues/374 - a bit minimized, but still mysterious
@Centaur your particular problem is solved by bumping max-inlines as @pme123 suggested (thanks!). Question remains, can we do something in magnolia about it, or maybe Scala should bump the inlining limit. These classes aren't that complicated