tapir
tapir copied to clipboard
[BUG] Scala3 Schema.derived with recursive structures causes Deadlock with given keyword
Tapir version: 1.2.8
Scala version: 3.2.2
Describe the bug
When using Schema.derived on a recursive data structure, a deadlock is caused runtime. It compiles fine, but fails runtime.
How to reproduce?
Minimized example: https://gist.github.com/hamnis/eee66ef4189cca09b08505bb00d5406a
Additional information
Workaround, use implicit def for this
Yes, this is a known problem: https://tapir.softwaremill.com/en/latest/endpoint/schemas.html#derivation-for-recursive-types-in-scala3
Unfortunately I didn't write in the docs why this is the case. So probably worth investigating and properly documenting what is wrong.