-
Notifications
You must be signed in to change notification settings - Fork 150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Scala 2] Compile-time stackoverflow with lots of enum values #352
Comments
Nice! Do you kind posting the SO trace, maybe jot the whole thing but enough to see where its (probably) recursing ? It would be good to have to see if its a quick fix. Theres a PR to upgrade to Scala 3 that rewrites some of the macros , that im in the middle of (slowly) reviewing that may also solve this. |
|
I think this is happening because of typeclass implicit resolution in the macro, which... not really sure how to solve 🤔 . Unfortunately, I think increasing the stack size is the most practical way to address this, at least for the Scala 2 implementation. BTW, have you tried this in Scala 3? The macros are less dependent on implicit resolution. FWIW, I got your example to compile and work in Scala 3 in this Scastie. |
Hi,
I'm getting a stackoverflow with this enum definition. If i decrease the number of case classes it compiles file. If I increase the stack (Xss) to 1G it compiles but Is VERY Slow.
The text was updated successfully, but these errors were encountered: