Package 'swift-testing' is using Swift tools version 5.10.0

i’ve been following along the swift-testing package, and had been able to depend on it up to version 0.3.0.

but it looks like support for swift 5.9 was dropped in 0.4.0, and based on the commit message, it sounds like even swift 5.10 support is in doubt.

given that swift 5.10 has not been released yet, i found it odd that this package no longer supports any extant versions of swift. what was the rationale behind dropping support for 5.9?

2 Likes

This is discussed at here Update Getting Started docs to use Swift main branch features · Issue #126 · apple/swift-testing · GitHub

TLDR: swift-testing has no intend to support Swift 5.9 and Swift 5.10.

1 Like

It looks like the 5.10 compiler is supported, but since the SPM integration isn't in that version, there's the caveat that you have to provide your own scaffolding class (Getting started link).

That's an excellent question. swift-testing is an experimental package that relies on language and toolchain features that aren't available in Swift 5.9. The changes that we've made to Swift Package Manager to experimentally support swift-testing are not available in Swift 5.10 or earlier.

We use semantic versioning with our releases. Releases prior to 1.0 should be considered "unstable" with all aspects subject to change. In the case of swift-testing, this includes the minimum Swift version needed to use it.

We continue to include basic support for Swift 5.10 at this time because we recognize that not all developers are able to switch to Swift's unstable main branch just to use swift-testing. There are features in Swift 5.11 such as SwiftPM's GitInformation structure and the proposed low-level linkage control that we are adopting or looking to adopt. Because we'll be relying on these features, a minimum Swift version of 5.11 will be necessary in the near future.

4 Likes

i understand the motivation for requiring the experimental toolchain. but i think it’s important to note that making this a hard compilation requirement means even people using nightly toolchains will have a tough time using this package, because its API reference is built (on Swift Package Index, on Swiftinit, etc.) using a 5.9 compiler.

i noticed that the project’s README directs users to Swift Package Index, which (as far as i can tell) is unable to build docs for the latest swift-testing release. i would shamelessly plug Swiftinit as an alternative, but we are also in the same boat as Swift Package Index.

Sorry for the delay. :slight_smile:

We're aware SPI (and Swiftinit!) isn't able to produce documentation for swift-testing 0.4.0 right now. We view this as a temporary issue: the Swift project has branched for 5.10 and once the 5.10 toolchain is officially released, it's fair to expect Swift Package Index to start supporting it in short order.

3 Likes