Skip to content

Remove remaining Swift 5.10 support. #467

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jun 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .spi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ metadata:
authors: Apple Inc.
builder:
configs:
- swift_version: 5.10
scheme: Testing
- swift_version: 6.0
documentation_targets: [Testing]
scheme: Testing
23 changes: 17 additions & 6 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version: 5.10
// swift-tools-version: 6.0

//
// This source file is part of the Swift.org open source project
Expand Down Expand Up @@ -33,7 +33,7 @@ let package = Package(
],

dependencies: [
.package(url: "https://github.com/apple/swift-syntax.git", from: Version(stringLiteral: Context.environment["SWT_SWIFT_SYNTAX_VERSION"] ?? "600.0.0-latest")),
.package(url: "https://github.com/apple/swift-syntax.git", from: "600.0.0-latest"),
],

targets: [
Expand Down Expand Up @@ -121,7 +121,6 @@ extension Array where Element == PackageDescription.SwiftSetting {
.unsafeFlags(["-require-explicit-sendable"]),
.enableExperimentalFeature("StrictConcurrency"),
.enableUpcomingFeature("ExistentialAny"),
.enableUpcomingFeature("InferSendableFromCaptures"),

.enableExperimentalFeature("AccessLevelOnImport"),
.enableUpcomingFeature("InternalImportsByDefault"),
Expand Down Expand Up @@ -155,8 +154,20 @@ extension Array where Element == PackageDescription.CXXSetting {
/// Settings intended to be applied to every C++ target in this package.
/// Analogous to project-level build settings in an Xcode project.
static var packageSettings: Self {
[
.define("_SWT_TESTING_LIBRARY_VERSION", to: #""unknown (Swift 5.10 toolchain)""#),
]
var result = Self()

// Capture the testing library's version as a C++ string constant.
if let git = Context.gitInformation {
let testingLibraryVersion = if let tag = git.currentTag {
tag
} else if git.hasUncommittedChanges {
"\(git.currentCommit) (modified)"
} else {
git.currentCommit
}
result.append(.define("_SWT_TESTING_LIBRARY_VERSION", to: #""\#(testingLibraryVersion)""#))
}

return result
}
}
173 changes: 0 additions & 173 deletions [email protected]

This file was deleted.

18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,15 +93,15 @@ very best ideas, from anywhere, can help shape the future of testing in Swift.
The table below describes the current level of support that Swift Testing has
for various platforms:

| **Platform** | **CI Status (5.10)** | **CI Status (6.0)** | **CI Status (main)** | **Support Status** |
|---|:-:|:-:|:-:|---|
| **macOS** | [![Build Status](https://ci.swift.org/buildStatus/icon?job=swift-testing-main-swift-5.10-macos)](https://ci.swift.org/job/swift-testing-main-swift-5.10-macos/) | [![Build Status](https://ci.swift.org/buildStatus/icon?job=swift-testing-main-swift-6.0-macos)](https://ci.swift.org/job/swift-testing-main-swift-6.0-macos/) | [![Build Status](https://ci.swift.org/buildStatus/icon?job=swift-testing-main-swift-main-macos)](https://ci.swift.org/view/Swift%20Packages/job/swift-testing-main-swift-main-macos/) | Supported |
| **iOS** | | | | Supported |
| **watchOS** | | | | Supported |
| **tvOS** | | | | Supported |
| **visionOS** | | | | Supported |
| **Ubuntu 22.04** | [![Build Status](https://ci.swift.org/buildStatus/icon?job=swift-testing-main-swift-5.10-linux)](https://ci.swift.org/job/swift-testing-main-swift-5.10-linux/) | [![Build Status](https://ci.swift.org/buildStatus/icon?job=swift-testing-main-swift-6.0-linux)](https://ci.swift.org/job/swift-testing-main-swift-6.0-linux/) | [![Build Status](https://ci.swift.org/buildStatus/icon?job=swift-testing-main-swift-main-linux)](https://ci.swift.org/view/Swift%20Packages/job/swift-testing-main-swift-main-linux/) | Supported |
| **Windows** | [![Build Status](https://ci-external.swift.org/buildStatus/icon?job=swift-testing-main-swift-5.10-windows)](https://ci-external.swift.org/job/swift-testing-main-swift-5.10-windows/) | | [![Build Status](https://ci-external.swift.org/buildStatus/icon?job=swift-testing-main-swift-main-windows)](https://ci-external.swift.org/job/swift-testing-main-swift-main-windows/) | Supported |
| **Platform** | **CI Status (6.0)** | **CI Status (main)** | **Support Status** |
|---|:-:|:-:|---|
| **macOS** | [![Build Status](https://ci.swift.org/buildStatus/icon?job=swift-testing-main-swift-6.0-macos)](https://ci.swift.org/job/swift-testing-main-swift-6.0-macos/) | [![Build Status](https://ci.swift.org/buildStatus/icon?job=swift-testing-main-swift-main-macos)](https://ci.swift.org/view/Swift%20Packages/job/swift-testing-main-swift-main-macos/) | Supported |
| **iOS** | | | Supported |
| **watchOS** | | | Supported |
| **tvOS** | | | Supported |
| **visionOS** | | | Supported |
| **Ubuntu 22.04** | [![Build Status](https://ci.swift.org/buildStatus/icon?job=swift-testing-main-swift-6.0-linux)](https://ci.swift.org/job/swift-testing-main-swift-6.0-linux/) | [![Build Status](https://ci.swift.org/buildStatus/icon?job=swift-testing-main-swift-main-linux)](https://ci.swift.org/view/Swift%20Packages/job/swift-testing-main-swift-main-linux/) | Supported |
| **Windows** | | [![Build Status](https://ci-external.swift.org/buildStatus/icon?job=swift-testing-main-swift-main-windows)](https://ci-external.swift.org/job/swift-testing-main-swift-main-windows/) | Supported |

### Works with XCTest

Expand Down
2 changes: 0 additions & 2 deletions Sources/Testing/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ add_library(Testing
EntryPoints/ABIv0/Encoded/ABIv0.EncodedTest.swift
EntryPoints/EntryPoint.swift
EntryPoints/SwiftPMEntryPoint.swift
EntryPoints/XCTestScaffold.swift
Events/Clock.swift
Events/Event.swift
Events/Recorder/Event.ConsoleOutputRecorder.swift
Expand Down Expand Up @@ -61,7 +60,6 @@ add_library(Testing
Support/Additions/CommandLineAdditions.swift
Support/Additions/NumericAdditions.swift
Support/Additions/ResultAdditions.swift
Support/Additions/StringAdditions.swift
Support/CartesianProduct.swift
Support/CError.swift
Support/Environment.swift
Expand Down
11 changes: 2 additions & 9 deletions Sources/Testing/EntryPoints/EntryPoint.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ private import _TestingInternals
/// External callers cannot call this function directly. The can use
/// ``copyABIEntryPoint_v0()`` to get a reference to an ABI-stable version of
/// this function.
func entryPoint(passing args: consuming __CommandLineArguments_v0?, eventHandler: Event.Handler?) async -> CInt {
func entryPoint(passing args: __CommandLineArguments_v0?, eventHandler: Event.Handler?) async -> CInt {
let exitCode = Locked(rawValue: EXIT_SUCCESS)

do {
Expand Down Expand Up @@ -239,12 +239,6 @@ public struct __CommandLineArguments_v0: Sendable {

/// The value of the `--repeat-until` argument.
public var repeatUntil: String?

/// The identifier of the `XCTestCase` instance hosting the testing library,
/// if ``XCTestScaffold`` is being used.
///
/// This property is not ABI and will be removed with ``XCTestScaffold``.
var xcTestCaseHostIdentifier: String?
}

extension __CommandLineArguments_v0: Codable {
Expand All @@ -264,7 +258,6 @@ extension __CommandLineArguments_v0: Codable {
case skip
case repetitions
case repeatUntil
case xcTestCaseHostIdentifier
}
}

Expand Down Expand Up @@ -471,7 +464,7 @@ public func configurationForEntryPoint(from args: __CommandLineArguments_v0) thr

#if !SWT_NO_EXIT_TESTS
// Enable exit test handling via __swiftPMEntryPoint().
configuration.exitTestHandler = ExitTest.handlerForEntryPoint(forXCTestCaseIdentifiedBy: args.xcTestCaseHostIdentifier)
configuration.exitTestHandler = ExitTest.handlerForEntryPoint()
#endif

return configuration
Expand Down
Loading