Skip to content

Issue #215 - Make Swift Enums conform to Hashable#578

Merged
martijnwalraven merged 2 commits intoapollographql:masterfrom
bclymer:master
Sep 4, 2018
Merged

Issue #215 - Make Swift Enums conform to Hashable#578
martijnwalraven merged 2 commits intoapollographql:masterfrom
bclymer:master

Conversation

@bclymer
Copy link
Copy Markdown
Contributor

@bclymer bclymer commented Sep 4, 2018

What

Makes enums conform to Hashable. 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 Hashable worked as expected, and it could be used in external code as if it was Hashable. 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 implement Hashable is a nice win.

  • feature
  • blocking
  • docs

@apollo-cla
Copy link
Copy Markdown

@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/

@ghost ghost added the 🎉 feature New addition or enhancement to existing solutions label Sep 4, 2018
@bclymer
Copy link
Copy Markdown
Contributor Author

bclymer commented Sep 4, 2018

@meteor-bot done.

@martijnwalraven
Copy link
Copy Markdown
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.

@martijnwalraven martijnwalraven merged commit 8d4e0ac into apollographql:master Sep 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🎉 feature New addition or enhancement to existing solutions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants