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

Disambiguate swift method call #367

Closed
wants to merge 1 commit into from
Closed

Conversation

adamkaplan
Copy link
Collaborator

No description provided.

@adamkaplan adamkaplan requested review from damian-kolakowski and Vkt0r and removed request for damian-kolakowski February 18, 2019 20:50
@adamkaplan
Copy link
Collaborator Author

adamkaplan commented Feb 18, 2019

Test pass locally for iOS on Swift 4.0 and 4.2. Not sure how this didn't show up earlier – possibly due to my use of Xcode 10 beta vs release.

screenshot 2019-02-18 15 51 45

@adamkaplan
Copy link
Collaborator Author

After more research, not only does this issue only occur in the latest Beta Xcode 10.2 (10P82s), but the fix actually breaks non-beta Xcode 10.1 (10B61)!

Not sure what to do here, but it should not be merged just yet...

@stevenp
Copy link

stevenp commented Feb 26, 2019

It would be helpful if you could open an issue for this so that anyone searching for it can more easily find it. I spent quite a bit of time coming to the same fix and only stumbled upon your branch by accident.

@alanzeino
Copy link
Contributor

After more research, not only does this issue only occur in the latest Beta Xcode 10.2 (10P82s), but the fix actually breaks non-beta Xcode 10.1 (10B61)!

Not sure what to do here, but it should not be merged just yet...

I've been working on updating this library to 4.2 + Xcode 10.2, and 5.0 + Xcode 10.2. The answer is to conditionally compile the new code:

#if swift(>=4.2.2)
        return String(cString: UnsafePointer<UInt8>(strerror(errno)))
#else
        return String(cString: UnsafePointer(strerror(errno)))
#endif

This works because the new version of Swift 4.2 in Xcode 10.2 is 4.2.2.

@Vkt0r
Copy link
Member

Vkt0r commented Mar 1, 2019

@alanzeino That's a good catch 👍.

I've been working on updating this library to 4.2 + Xcode 10.2, and 5.0 + Xcode 10.2.

I can assume we can expect a draft PR soon then with the update 😅 ?

@platonsi
Copy link

platonsi commented Mar 1, 2019

Hello,

I actually opened an issue for this because I didn't find this PR (thanks @Vkt0r for referencing). In order to fix this you can simply remove the
UnsafePointer. You can see the discussion at the Apple Forum

@alanzeino
Copy link
Contributor

@alanzeino That's a good catch 👍.

I've been working on updating this library to 4.2 + Xcode 10.2, and 5.0 + Xcode 10.2.

I can assume we can expect a draft PR soon then with the update 😅 ?

I'm close, just got one issue to solve and I can PR it.

@alanzeino
Copy link
Contributor

In Xcode 10.2b4 this change isn't needed anymore.

@Vkt0r
Copy link
Member

Vkt0r commented Mar 26, 2019

Closing this in favor of #370.

@Vkt0r Vkt0r closed this Mar 26, 2019
@Vkt0r Vkt0r mentioned this pull request Mar 31, 2019
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.

5 participants