Issue #215 - Make Swift Enums conform to Hashable#578
Merged
martijnwalraven merged 2 commits intoapollographql:masterfrom Sep 4, 2018
bclymer:master
Merged
Issue #215 - Make Swift Enums conform to Hashable#578martijnwalraven merged 2 commits intoapollographql:masterfrom bclymer:master
martijnwalraven merged 2 commits intoapollographql:masterfrom
bclymer:master
Conversation
|
@bclymer: Thank you for submitting a pull request! Before we can merge it, you'll need to sign the Meteor Contributor Agreement here: https://contribute.meteor.com/ |
Contributor
Author
|
@meteor-bot done. |
Contributor
|
Thanks, this definitely seems worth adding. I don't have any concerns about not supporting Xcode 9.2 and below, because all developers should be on the latest version to be able to submit apps to the store. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Makes
enums conform toHashable. The actual conformance is automatically synthesized by the Swift 4.1 compiler.Why
In response to apollographql/rover#215
Testing
In my local environment I was able to verify simply adding
Hashableworked as expected, and it could be used in external code as if it wasHashable. As long as CI's tests pass, this should be good to go.Problems
Swift 4.1 only exists in Xcode 9.3, and not 9.2 or below. From what I can see, Apollo still supports "Xcode 9 and Swift 4", so that will no longer be completely true. However, Swift 4.1 is a non-source-breaking change, and having
enums automatically implementHashableis a nice win.