Build our project that uses GRDB.
The Xcode Swift 5 migration warning to not appear.
The Xcode Swift 5 migration warning appeared.
GRDB flavor(s): GRDB
GRDB version: 4.1.1
Installation method: CocoaPods
Xcode version: 10.3
Swift version: 5.0
Platform(s) running GRDB: iOS
macOS version running Xcode: 10.14.6
CocoaPods appears to set the SWIFT_VERSION for the pod based on exactly what is in the swift_versions attribute in the podspec. SWIFT_VERSION = 5 is probably not technically correct, which is why Xcode complains. If I update the Pods project file manually to specify 5.0, then the warning goes away. This is likely because Swift doesn't really strictly follow semver, so 5 can't mean something like "latest version of Swift 5." Therefore, Xcode wants to know specifically which "marketing version" (i.e. 5.0 can mean latest patch version of 5.0 or whatever Apple decides "compatible with 5.0" means). The fix here is probably just to update the podspec to say 5.0 instead of 5.
Hello @benasher44,
Thanks for the investigation! Would you be happy checking your hypothesis, make sure it would not mess with the release of Swift 5.1 that is around the corner, and make a pull request? If not, I'll try to schedule this for the v4.2 release myself.
It won't mess with it. It means that this pod will have a SWIFT_VERSION set to 5.0, which will be compatible (has to be according to Apple) with 5.1. Once you verify that GRDB builds with Swift 5.1, you can add 5.1 to the list :)
So, I should not expect any PR, right?
Correct. This is normally an easy PR for me to open, but it's tricky with the legalities around open source contribution at my work (have to jump through some hoops for each open source repo– haven't done so for this one yet), and I currently don't have personal time to devote at the moment.
It can just be done with your regular release activities (i.e. at your convenience, if you feel it makes sense) in the next release :).
Edit: updated to improve tone and better explain why I won't be opening a PR
~All right @benasher44. For the record, I don't like when people assume my "regular activities" are focused on servicing their needs: your attitude is quite unpleasant.~
Edited due to context change
I apologize! I didn't mean to be unpleasant. I only meant to refer to your previous statement:
If not, I'll try to schedule this for the v4.2 release myself.
I only meant to say that doing this with your 4.2 release, as you suggested, sounded fine to me! By "regular activities," I merely meant at your convenience. If you couldn't fit it into v4.2, I wouldn't be disappointed (and even if I were, it doesn't matter :) ). There are no expectations here. I promise :)
So please share the conclusion of your investigation: this will spare my time.
Can I assume that this simple diff in the podspec would fix the issue?
- s.swift_versions = ['4.2', '5']
+ s.swift_versions = ['4.2', '5.0'] # and add '5.1' eventually
Exactly! That will do it 🙌
Thanks!
I also updated my earlier comment to attempt to make the tone not come across as short. I hope that helps :)
Upgraded to 4.2.0 and doubly confirmed that this is fixed. Thanks again!
Thanks @benasher44 :-)
Most helpful comment
I also updated my earlier comment to attempt to make the tone not come across as short. I hope that helps :)