Skip to content
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

Update to Swift 4.2, Adopt Hasher #164

Merged
merged 11 commits into from
Nov 8, 2018
Merged

Update to Swift 4.2, Adopt Hasher #164

merged 11 commits into from
Nov 8, 2018

Conversation

hyerra
Copy link
Contributor

@hyerra hyerra commented Oct 2, 2018

This PR updates the MapboxGeocoder to support Swift 4.2. Additionally, it adopts Hasher and resolves #146.

@hyerra
Copy link
Contributor Author

hyerra commented Oct 2, 2018

Hmm.. also not sure why the checks are failing. On my mac, everything builds properly. Is it due to the fact that I updated it to Swift 4.2 and the checks are configured for Swift 4.0?

@frederoni
Copy link
Contributor

It's because CI is on a Xcode 9 stack and Swift 4.0.

@hyerra
Copy link
Contributor Author

hyerra commented Oct 2, 2018

Great! I'll fix this when I get home.

@hyerra
Copy link
Contributor Author

hyerra commented Oct 3, 2018

How does this look @frederoni?

@frederoni
Copy link
Contributor

Sorry about the delay here.
Can you sync your fork and rebase your PR atop master? Or create a new PR if that's more convenient.
We weren't running tests using Xcode 10 before #165.

@hyerra
Copy link
Contributor Author

hyerra commented Oct 10, 2018

Done!

@frederoni
Copy link
Contributor

I forgot to enable forked PRs. 🙈 One more time. Just an empty commit or rebase.

@hyerra hyerra changed the base branch from master to fred/public-properties October 11, 2018 13:18
@hyerra hyerra changed the base branch from fred/public-properties to master October 11, 2018 13:18
@hyerra
Copy link
Contributor Author

hyerra commented Oct 11, 2018

No worries! Just to make sure is that what I was supposed to do?

@frederoni
Copy link
Contributor

It was supposed to start the CI bots but it looks like it didn't trigger. Just changing the target branch doesn't work. You need to amend an empty commit to change the commit SHA1 or rebase the PR.

@hyerra
Copy link
Contributor Author

hyerra commented Oct 11, 2018

I made a bogus commit.

@hyerra
Copy link
Contributor Author

hyerra commented Oct 11, 2018

It builds now!

@hyerra
Copy link
Contributor Author

hyerra commented Oct 12, 2018

Ok, so essentially this latest commit uses the synthesized hash if the swift version > 4.2 but it uses the old computed version if < 4.2.

@frederoni
Copy link
Contributor

Looking good 👍

@hyerra
Copy link
Contributor Author

hyerra commented Oct 12, 2018

Sweet! The only thing though is by using the synthesized hash, some properties that aren't necessary might be used in calculating the hash and explicitly declaring our own hash gets rid of that possibility and uses just the coordinates. It's not a major issue as it should be calculated just fine either way, but not sure if it made too much of a difference.

@frederoni
Copy link
Contributor

I think it's a good thing that the hash represents all properties including the coordinates and not just the identifier here.

@hyerra
Copy link
Contributor Author

hyerra commented Oct 12, 2018

Yeah, you have a point.

@frederoni frederoni requested a review from 1ec5 October 12, 2018 08:29
@hyerra
Copy link
Contributor Author

hyerra commented Oct 16, 2018

@1ec5, just to make sure you haven't missed the notification. Do you think you could check this out really quickly?

Copy link
Contributor

@1ec5 1ec5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great, thanks! Sorry for the delay; still digging out of post-trip notifications. 😅

@1ec5 1ec5 merged commit c5fcfe1 into mapbox:master Nov 8, 2018
@hyerra
Copy link
Contributor Author

hyerra commented Nov 9, 2018

Haha no worries!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Adopt Hasher
3 participants