-
Notifications
You must be signed in to change notification settings - Fork 222
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 3 Derive Macro Compiler Error #905
Comments
Additional notes: The code did compile previously under Scala 2.13 Debugging macros is beyond my current expertise. However, narrowing in closer to the issue, it appears to happen when mixing ObjectType and InputObjectType, where the input is a method-parameter. When I use an ObjectType inside and ObjectType, or an InputObjectType inside and InputObjectType it seems to compile just fine: ObjectType inside ObjectType (no errors)
InputObjectType inside InputObjectType (no errors)
|
update: This code has the same issue, and uses an id with a
However, I noticed that commenting out:
Appears to make the compiler error go away in this very tiny and limited code sample. Now, I can't do that in my production code. Commenting that line out in my prod code causes a bunch of other errors, and it's apparently being used to support FromInput. |
I'll have a look at this. |
I can confirm that the first example compiles if I remove
So it seems that issue is coming from a different resolution of implicits. |
I'm trying to check with semi-automatic derivation to better control which implicits are created:
It leads to the compilation error:
I've pushed the changes to https://github.com/sangria-graphql/sangria/tree/issue-905 if someone wants to re-use that. |
Thank you for starting the investigation! @yanns I might not be very useful in fixing the bug itself with code-changes (due to no macro experience), however I also encountered what appears to be the exact same issue in both my top-level Query and Mutation types, using
Since you are already started looking at the issue, I'll see if I can also extract this code into a reproducible, isolated, code-sample. |
Here is the second code sample, revolving around
|
I am taking a look at this right now, and I feel I am close to figuring this out. Slightly delaying implicit resolution in macro seems to make errors consistent between code with |
@jchyb Thank you! I believe this is the very last piece in order for me to finish converting my entire project over to Scala 3. |
Dependencies:
Code:
Error:
The text was updated successfully, but these errors were encountered: