You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[error] -- Error: /Users/adamw/projects/magnolia/src/examples/test2.scala:25:2 ---------
[error] 25 | SchemaType.derived[Anchor]
[error] | ^^^^^^^^^^^^^^^^^^^^^^^^^^
[error] | method schemaForCaseClass is declared as erased, but is in fact used
[error] | This location contains code that was inlined from magnolia.scala:83
[error] | This location contains code that was inlined from magnolia.scala:94
[error] | This location contains code that was inlined from magnolia.scala:94
[error] | This location contains code that was inlined from magnolia.scala:94
[error] | This location contains code that was inlined from magnolia.scala:94
[error] | This location contains code that was inlined from magnolia.scala:94
[error] | This location contains code that was inlined from magnolia.scala:16
[error] | This location contains code that was inlined from magnolia.scala:149
[error] | This location contains code that was inlined from magnolia.scala:151
[error] | This location contains code that was inlined from test.scala:31
[error] | This location contains code that was inlined from magnolia.scala:83
[error] | This location contains code that was inlined from magnolia.scala:16
[error] | This location contains code that was inlined from magnolia.scala:149
[error] | This location contains code that was inlined from magnolia.scala:151
Removing any fields, or e.g. the schemaForArray implicit (which is even more weird) causes this code to compile
The text was updated successfully, but these errors were encountered:
Adding scalacOptions ++= Seq("-Xmax-inlines", "50") solves the problem, however I'll keep this open as the case classes involved aren't that complicated so this can come up pretty often. Maybe rewriting derivation using macros would help in reducing the inlining depth - what do you think @KacperFKorban ?
It might help, though I haven't worked on macrolia for a while.
The current implementation works for some cases, but I had problems with implementing isType and asType for objects.
Given the following derivation:
and the following test code:
I'm getting:
Removing any fields, or e.g. the
schemaForArray
implicit (which is even more weird) causes this code to compileThe text was updated successfully, but these errors were encountered: