-
Notifications
You must be signed in to change notification settings - Fork 70
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
swift4 support #26
Comments
Please allow me to bump-up and add my voice to this request. This outstanding project (from a utility and educational perspective) hasn't worked due to the use of unsafeBitCast with Swift 4. I attempted to fix using Mike Ash's excellent article "Swift Unmanaged" (https://mikeash.com/pyblog/friday-qa-2017-08-11-swiftunmanaged.html) but without success this far. Thank you. |
@bradhilton Brad! Do you have any idea how to fix this? |
Mike Ash's August 2017 article "Swift Unmanaged" has a very clear paragraph at the onset: "The first task is converting a reference into the raw bytes for a void *, or converting the raw bytes of a void * back to a reference. Since Swift references are implemented as pointers, this is straightforward. It's really just a matter of getting the type system to cooperate. You can do this with unsafeBitCast, although I strongly recommend against it. If these details ever changed, you'd be in trouble, whereas Unmanaged will continue to work." … His article then goes on to explain how to use updated Swift and avoid UnsafeBitCast. I believe this article is the blueprint for addressing this issue in GraphQL. Mr. Palaguta's work appears outstanding however with the protocols and such, I wasn't clear enough given the time I had to see about replacing UnsafeBitCast with Mike Ash's tips. I believe it can be done. I thought I would ask Mr. Palaguta and did when the Issue opened because he knows his software best. I remain convinced the article I cite by Mr. Ash can be used to effect the requisite changes. |
@Igor-Palaguta @johntaschereau @paulofaria I'm going to push an new build of EDIT: Just pushed new build |
@Igor-Palaguta are you willing to send a PR updating |
Any progress here? Let me know what I can do to be helpful. |
@jseibert I believe the only thing needed it to pull the code from https://github.com/Zewo/Reflection and update GraphQL's |
@jseibert if you can send a PR that would be very helpful! 😊 |
@Igor-Palaguta I incorporated your changes as well. All tests now pass. |
fixed by #27 |
@paulofaria can we get a new release that ships this? |
@jseibert of course! sorry I forgot to release. |
released here: |
Wow, you're fast! Awesome, thanks! |
@paulofaria just opened a PR on Graphiti as well for you. |
Is the reason to keep those deprecated usage of String.characters around in the code base to maintain backward compatibility with Swift 3? |
Hello,
Thank you for great library! It works perfectly
Do you have in nearest plans migrate it to swift 4. With few fixes it can be compiled with swift4, but testIntrospectionCharacterKindQuery fails with EXC_BAD_ACCESS here:
GraphQL/Sources/GraphQL/Reflection/AnyExistentialContainer.swift
Line 15 in 045bae9
The text was updated successfully, but these errors were encountered: