Skip to content

Commit 38e79bc

Browse files
authored
Merge pull request #1449 from swiftlang/automerge/merge-main-2025-12-12_17-43
Merge `main` into `release/6.3`
2 parents 4b07525 + 5dbd8d7 commit 38e79bc

File tree

12 files changed

+76
-18
lines changed

12 files changed

+76
-18
lines changed

.github/dependabot.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"

.github/workflows/automerge.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ on:
1818
jobs:
1919
create_merge_pr:
2020
name: Create PR to merge main into release branch
21-
uses: swiftlang/github-workflows/.github/workflows/create_automerge_pr.yml@main
21+
uses: swiftlang/github-workflows/.github/workflows/create_automerge_pr.yml@0.0.3
2222
with:
2323
head_branch: main
2424
base_branch: release/6.3

.github/workflows/main_using_main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ concurrency:
1515
jobs:
1616
tests:
1717
name: Test
18-
uses: swiftlang/github-workflows/.github/workflows/swift_package_test.yml@main
18+
uses: swiftlang/github-workflows/.github/workflows/swift_package_test.yml@0.0.2
1919
with:
2020
linux_swift_versions: '["nightly-main"]'
2121
linux_os_versions: '["amazonlinux2", "jammy"]'

.github/workflows/main_using_release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ concurrency:
1515
jobs:
1616
tests:
1717
name: Test
18-
uses: swiftlang/github-workflows/.github/workflows/swift_package_test.yml@main
18+
uses: swiftlang/github-workflows/.github/workflows/swift_package_test.yml@0.0.2
1919
with:
2020
linux_swift_versions: '["nightly-6.2"]'
2121
linux_os_versions: '["amazonlinux2", "jammy"]'

.github/workflows/pull_request.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ concurrency:
1414
jobs:
1515
tests:
1616
name: Test
17-
uses: swiftlang/github-workflows/.github/workflows/swift_package_test.yml@main
17+
uses: swiftlang/github-workflows/.github/workflows/swift_package_test.yml@0.0.2
1818
with:
19-
linux_swift_versions: '["nightly-main", "nightly-6.2"]'
19+
linux_swift_versions: '["nightly-main", "nightly-6.3", "nightly-6.2"]'
2020
linux_os_versions: '["amazonlinux2", "jammy"]'
21-
windows_swift_versions: '["nightly-main", "nightly-6.2"]'
21+
windows_swift_versions: '["nightly-main", "nightly-6.3", "nightly-6.2"]'
2222
enable_macos_checks: true
2323
macos_exclude_xcode_versions: '[{"xcode_version": "16.2"}, {"xcode_version": "16.3"}, {"xcode_version": "16.4"}]'
2424
enable_ios_checks: true
@@ -27,7 +27,7 @@ jobs:
2727
enable_android_sdk_build: true
2828
soundness:
2929
name: Soundness
30-
uses: swiftlang/github-workflows/.github/workflows/soundness.yml@main
30+
uses: swiftlang/github-workflows/.github/workflows/soundness.yml@0.0.3
3131
with:
3232
license_header_check_project_name: "Swift"
3333
docs_check_enabled: false

Sources/Testing/ABI/ABI.Record.swift

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,15 +70,26 @@ extension ABI.Record: Codable {
7070
init(from decoder: any Decoder) throws {
7171
let container = try decoder.container(keyedBy: CodingKeys.self)
7272

73-
let versionNumber = try container.decode(VersionNumber.self, forKey: .version)
74-
if versionNumber != V.versionNumber {
73+
func validateVersionNumber(_ versionNumber: VersionNumber) throws {
74+
if versionNumber == V.versionNumber {
75+
return
76+
}
77+
#if !hasFeature(Embedded)
78+
// Allow for alternate version numbers if they correspond to the expected
79+
// record version (e.g. "1.2.3" might map to `v1_2_0` without a problem.)
80+
if ABI.version(forVersionNumber: versionNumber) == V.self {
81+
return
82+
}
83+
#endif
7584
throw DecodingError.dataCorrupted(
7685
DecodingError.Context(
7786
codingPath: decoder.codingPath + CollectionOfOne(CodingKeys.version as any CodingKey),
7887
debugDescription: "Unexpected record version \(versionNumber) (expected \(V.versionNumber))."
7988
)
8089
)
8190
}
91+
let versionNumber = try container.decode(VersionNumber.self, forKey: .version)
92+
try validateVersionNumber(versionNumber)
8293

8394
switch try container.decode(String.self, forKey: .kind) {
8495
case "test":

Sources/Testing/ABI/ABI.swift

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ extension ABI {
4343
}
4444

4545
/// The current supported ABI version (ignoring any experimental versions.)
46-
typealias CurrentVersion = v0
46+
typealias CurrentVersion = v6_3
4747

4848
/// The highest defined and supported ABI version (including any experimental
4949
/// versions.)
@@ -55,10 +55,18 @@ extension ABI {
5555
/// - Parameters:
5656
/// - versionNumber: The ABI version number for which a concrete type is
5757
/// needed.
58+
/// - swiftCompilerVersion: The version number of the Swift compiler. This
59+
/// is used when `versionNumber` is greater than the highest known version
60+
/// to determine whether a version type can be returned. The default value
61+
/// is the version of the Swift compiler which was used to build the
62+
/// testing library.
5863
///
5964
/// - Returns: A type conforming to ``ABI/Version`` that represents the given
6065
/// ABI version, or `nil` if no such type exists.
61-
static func version(forVersionNumber versionNumber: VersionNumber = ABI.CurrentVersion.versionNumber) -> (any Version.Type)? {
66+
static func version(
67+
forVersionNumber versionNumber: VersionNumber,
68+
givenSwiftCompilerVersion swiftCompilerVersion: @autoclosure () -> VersionNumber = swiftCompilerVersion
69+
) -> (any Version.Type)? {
6270
if versionNumber > ABI.HighestVersion.versionNumber {
6371
// If the caller requested an ABI version higher than the current Swift
6472
// compiler version and it's not an ABI version we've explicitly defined,
@@ -71,7 +79,7 @@ extension ABI {
7179
// Note also that building an old version of Swift Testing with a newer
7280
// compiler may produce incorrect results here. We don't generally support
7381
// that configuration though.
74-
if versionNumber > swiftCompilerVersion {
82+
if versionNumber > swiftCompilerVersion() {
7583
return nil
7684
}
7785
}

Sources/Testing/Issues/KnownIssue.swift

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,13 @@ struct KnownIssueScope: Sendable {
7777
/// - sourceLocation: The source location to which the issue should be
7878
/// attributed.
7979
private func _matchError(_ error: any Error, in scope: KnownIssueScope, comment: Comment?, sourceLocation: SourceLocation) throws {
80+
// ExpectationFailedError is thrown by expectation checking functions to
81+
// indicate a condition evaluated to `false`. Those functions record their
82+
// own issue, so we don't need to create a new issue and attempt to match it.
83+
if error is ExpectationFailedError {
84+
return
85+
}
86+
8087
let sourceContext = SourceContext(backtrace: Backtrace(forFirstThrowOf: error), sourceLocation: sourceLocation)
8188
var issue = Issue(kind: .errorCaught(error), comments: [], sourceContext: sourceContext)
8289
if let context = scope.matcher(issue) {

Sources/Testing/Running/Runner.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ extension Runner {
7777
/// type at runtime, it may be better-suited for ``Configuration`` instead.
7878
private struct _Context: Sendable {
7979
/// A serializer used to reduce parallelism among test cases.
80-
var testCaseSerializer: Serializer?
80+
var testCaseSerializer: Serializer<Void>?
8181
}
8282

8383
/// Apply the custom scope for any test scope providers of the traits

Sources/Testing/Support/Serializer.swift

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,13 @@ var defaultParallelizationWidth: Int {
4242
/// items do not start running; they must wait until the suspended work item
4343
/// either returns or throws an error.
4444
///
45+
/// The generic type parameter `T` is unused. It avoids warnings when multiple
46+
/// copies of the testing library are loaded into a runner process on platforms
47+
/// which use the Objective-C runtime, due to non-generic actor types being
48+
/// implemented as classes there.
49+
///
4550
/// This type is not part of the public interface of the testing library.
46-
final actor Serializer {
51+
final actor Serializer<T> {
4752
/// The maximum number of work items that may run concurrently.
4853
nonisolated let maximumWidth: Int
4954

0 commit comments

Comments
 (0)