softwaremill / softwaremill/tapir
[BUG] Scala3 Schema.derived with recursive structures causes Deadlock with given keyword
Nobody has claimed this yet.
- Dominant language
- Scala
- Stars
- 1.5k
- Forks
- 468
- Avg merge
- 5h 37m
- Merged PRs (30d)
- 34
Description
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
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the minimized reproduction at the linked gist and inspect how Schema.derived handles the recursive structure with Scala 3.2.2 and Tapir 1.2.8. Confirm the runtime deadlock and compare the behavior with the reported implicit def workaround; done means recursive schema derivation completes without deadlocking.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- scala
- Domain
- backend-api-design
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100