jedisct1 / swift-sodium

Safe and easy to use crypto for iOS and macOS
ISC License
519 stars 185 forks source link

CocoaPod spec out of date for XCode 10.2 #180

Closed chriskempke closed 5 years ago

chriskempke commented 5 years ago

So this is the same as issue #177, which was closed with "it's old code." But old or not, the current CocoaPod spec won't build in the current released version of XCode. As (I suspect) with many orgs using security code, we can't just set our podspec to grab the lastest from master all the time -- we need to be able to audit a specific version, and can't have third-party changes making it into our code without such an audit.

So we need a new release version and a CocoaPod spec to match for Xcode 10.2. Any chance of that happening soon?

jedisct1 commented 5 years ago

Can you fix the remaining issue?

https://github.com/jedisct1/swift-sodium/blob/adc2c117bedf186cb4cdcd64c5b93b7f1f55e185/Examples/CommonCode/Helpers.swift#L22

Rypac commented 5 years ago

Done: #181.

chriskempke commented 5 years ago

Wow, fast response. Is the intent that it should still compile in XCode 10.1, too? Because pointing my podspec at master using Xcode 10.1, I get:

/Users/vsts/agent/2.149.1/work/1/s/Pods/Sodium/Sodium/GenericHash.swift:25:17: cannot convert value of type 'OpaquePointer' to expected argument type 'UnsafeMutablePointer' (aka 'UnsafeMutablePointer')

/Users/vsts/agent/2.149.1/work/1/s/Pods/Sodium/Sodium/GenericHash.swift:133:13: cannot convert value of type 'OpaquePointer' to expected argument type 'UnsafeMutablePointer' (aka 'UnsafeMutablePointer')

/Users/vsts/agent/2.149.1/work/1/s/Pods/Sodium/Sodium/GenericHash.swift:147:13: cannot convert value of type 'OpaquePointer' to expected argument type 'UnsafeMutablePointer' (aka 'UnsafeMutablePointer')

Rypac commented 5 years ago

This version won't be pre-Xcode 10.2 compatible due to changes in Swift 5, mainly:

Swift no longer bridges C types which have alignment sizes > 16 bytes

Unless #if compiler(>=5) is used (as in #178), the next release will only be supported on Xcode 10.2.

jedisct1 commented 5 years ago

Now that Xcode 10.2 is not in beta any more, we probably shouldn't care about Xcode 10.1 any more.

jedisct1 commented 5 years ago

But the tests for iOS don't seem to be enough, as we also have to support macOS and watchOS.

chriskempke commented 5 years ago

My two cents: Personally, not supporting 10.1 any more doesn't matter, but if can easily support both with conditional compilation (there are only those three errors), it would probably help those that can't migrate their tools immediately on every new version - particularly users of cloud devops tools that don't set the upgrade schedule.

keefertaylor commented 5 years ago

I see that the fixed got merged, but a new release still needs to be cut for Carthage / Cocoapods support.

LMK if I can help out in that regard.