Mallow's Blog

Swift Source Compatibility – An introduction

Swift Source Compatibility:

Swift source compatibility is a community based platform where, the developers can add their projects. The primary aim is to check the compatibility of the project with the new swift releases. As soon as a new version of Swift is out, the projects added in Swift Source Compatibility build against latest version of swift. This is achieved by swift continuous integration which is a part of Swift Source compatibility. This will allow the swift compiler developers to understand the compatibility impact their changes have on real-world swift projects.

Test Suite:

  1. A new Swift source compatibility test suite as part of the effort to maintain source compatibility in future Swift releases.
  2. The source compatibility test suite is community driven, meaning open source project owners can submit their projects for inclusion in the suite. Instructions for adding open source projects to the test suite can be found in the Swift Source Compatibility section on Swift.org.

Advantages:

  1. Developers can now use Swift’s pull request testing system to test their changes against the source compatibility test suite, helping catch source compatibility regressions before they are merged.
  2. The goal is to have a strong source compatibility test suite containing thousands of projects

Acceptance Criteria:

To be accepted into the Swift source compatibility test suite, a project must:

  1. Target Linux, macOS, or iOS/tvOS/watchOS device
  2. Be an Xcode or Swift Package Manager project (Carthage and CocoaPods are currently unsupported but are being explored to be supported in the future)
  3. Support building on either Linux or macOS
  4. Be contained in a publicly accessible git repository
  5. Maintain a project branch that builds against Swift 3.0 compatibility mode and passes any unit tests
  6. Have maintainers who will commit to resolve issues in a timely manner
  7. Be compatible with the latest GM/Beta versions of Xcode and swiftpm
  8. Add value not already included in the suite
  9. Be licensed with one of the following permissive licenses:

-> BSD

-> MIT

-> Apache License, version 2.0

-> Eclipse Public License

-> Mozilla Public License (MPL) 1.1

-> MPL 2.0

-> CDDL

 

Note: Linux compatibility testing in continuous integration is not available yet, but Linux projects are being accepted now.

We have seen how Swift Source Compatibility community helps in keeping your project live. This is a huge help to majority of the projects to be up to date. You can view the current list of projects added in the library by the following this link. In the next blog we can see about how to create a project, maintaining a project and giving pull requests.

 


Arasuvel T,
iOS develeoper,
Mallow Technologies.

 

Leave a Comment

Your email address will not be published. Required fields are marked *