-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
NoClassDefFoundError:
while executing macro expansion
#19601
Comments
Someone just mentioned this error on discord -- I said something about the scala 2 options for macro classloader, and they said they were on Scala 3. I don't remember which room. I'll follow up if I can. |
There is a cyclic dependency in the macro. This should have been caught by the macro expansion and reported as such.
|
There might have been a simplificaiton in the reproducer - in the original most of types are placed in multiple files:
|
If the classes are in the same file it might not compile. Now we detect the cycle correctly and suspend the compilation of that file. We could have two outcomes: (1) the non-suspended files are compiled and allow the compilation of the suspended file, or (2) there is a true cycle and the compilation fails, in this later case we need to split the files. |
When trying to reproduce and minimize OpenCB failure in zio/zio-prelude Open CB logs failing due to too restrictive cyclic macro dependency which is probably a regression (it works in previous version) I've stumbled upon other, possibly related issue.
Compiler version
All Scala 3 versions
Minimized code
Output (click arrow to expand)
The text was updated successfully, but these errors were encountered: