Requiring Swift 5.1

With the release of Alamofire 5, Alamofire has shifted its minimum requirements to Swift 5 and macOS 10.12, iOS 10, tvOS 10, and watchOS 3. While the OS requirements won't be changing any time soon, the flexibility to adopt new Swift version may be valuable moving forward, despite technically violating the semver requirement limiting such a change to major versions only. So, we'd like to adopt Swift 5.1 for the next minor version of Alamofire.

Adopting Swift 5.1 should allow us to better support things like Catalyst (anyone building Alamofire 5 using older Swift versions will already have a persistent warning about the platform not being recognized), as well as internally use features like implicit returns and property wrappers. Additionally, since Xcode 10.2 and 11 both require Mojave, there's no major macOS version bump required, which is often a source of pain for these upgrades. Finally, adopting Xcode 11+ simplifies our testing and support going forward.

So, we'd like to know if there are any strong feelings one way or another on this change. I have a branch up at feature/swift-5.1 if anyone would like to check out the changes we've been able to make, including refactoring our Protector class used for thread-safe access to values into a proper @propertyWrapper, and the nice readability improvements that's made.

2 Likes