-
Notifications
You must be signed in to change notification settings - Fork 730
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
Code generation throwing an error in 1.2.1 only #3071
Comments
Thanks for the bug! I'm trying to look into this. Would definitely be really helpful to have a reproduction case that I can debug. Let me know if you come up with anything to reproduce this. I'll keep looking as well. |
If you could maybe include a stack trace from where it fails, that might also be helpful. |
I'm definitely looking into that. Will add more details as I can figure it out. I ran it from the command line so don't have a stack trace but I'll see if I can get it. |
Okay, gotcha. Yeah to get a stack track you'd need to run it in Xcode for sure. |
@dafurman is also experiencing a similar issue, though it's in generation of operations, not mocks. I think I have some idea of what's going on in the code to cause this, but I can't reason through what sort of query shape would surface this. My assumption was that it would be impossible to get this range error (given a valid query definition). I'll keep thinking on this, but I think I'm going to need a repro to get much farther. If either of you are willing to privately send me your projects so I can run it locally and debug, that would also work. |
I will never be able to get the necessary legal stuff sorted to share the actual schema with you so I'm going to try to recreate it in a sample schema. I'll reply if/when I do. |
Haha, I definitely understand that. No worries. Thanks so much for working on reproducing this! |
@AnthonyMDev I managed to create a schema with the error reproducible. When you open the |
I say this probably once a day, but today I'm saying it to you! @tahirmt, you are my hero (for today)! 🤟 I'll check this out and work to get a fix up ASAP. Assuming this bug doesn't explode into some really difficult to fix issue, my current plan is to get this and one other bug fixed and release a patch by EOW (6/16) |
Happy to help! |
The cause of this bug has been identified and fix has been implemented! Writing some unit tests to ensure this does not regress in the future and then I'll have a PR up! Thanks so much @tahirmt! |
PR is in |
Thanks @AnthonyMDev for the quick fix! |
Couldn't have done it without you providing me the reproduction case! You rock @tahirmt! |
Summary
I'm getting this error during generation of mocks. in only 1.2.1. This works well in 1.2.0.
This is what the log looks like when it happens. For reference I'm calling
try ApolloCodegen.build(with: config)
from a swift tools package myself by importingApolloCodegenLib
.Version
1.2.1
Steps to reproduce the behavior
I'm still working on isolating a project where I can reproduce it.
Logs
Anything else?
The generated mock from 1.2.0 looks like this
Another thing to add is that this type does not add anything on top of the fields from the interface itself. All the fields that are part of this type are from the interface.
The text was updated successfully, but these errors were encountered: