Skip to content

Commit 1fc0361

Browse files
committed
Merge branch 'main' into jgrynspan/1371-section-used-attributes
2 parents 10006e9 + 1d3961a commit 1fc0361

24 files changed

+329
-174
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: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# In the first period after creating a new release branch, we often want to
2+
# continue including all changes from `main` into the release branch. This
3+
# workflow automatically creates a PR to merge main into the release branch on a
4+
# set schedule, and it can also be invoked manually.
5+
#
6+
# Later in the release cycle we generally stop this practice to avoid landing
7+
# risky changes. To disable the workflow when ready, follow the steps described
8+
# in https://docs.github.com/en/actions/managing-workflow-runs-and-deployments/managing-workflow-runs/disabling-and-enabling-a-workflow
9+
10+
name: Create PR to merge main into release branch
11+
12+
permissions:
13+
contents: read
14+
on:
15+
schedule:
16+
- cron: '0 9 * * MON'
17+
workflow_dispatch:
18+
jobs:
19+
create_merge_pr:
20+
name: Create PR to merge main into release branch
21+
uses: swiftlang/github-workflows/.github/workflows/create_automerge_pr.yml@0.0.3
22+
with:
23+
head_branch: main
24+
base_branch: release/6.3
25+
permissions:
26+
contents: write
27+
pull-requests: write
28+
# Ensure that we don't run this on a schedule in a fork
29+
if: (github.event_name == 'schedule' && github.repository == 'swiftlang/swift-testing') || (github.event_name != 'schedule')

.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

README.md

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -106,14 +106,23 @@ Swift.
106106
The table below describes the current level of support that Swift Testing has
107107
for various platforms:
108108

109-
| **Platform** | **Support Status** |
110-
|-|-|
111-
| Apple platforms | Supported |
112-
| Linux | Supported |
113-
| Windows | Supported |
114-
| FreeBSD, OpenBSD | Experimental |
115-
| Wasm | Experimental |
116-
| Android | Experimental |
109+
| **Platform** | **Support Status** | **Qualification[^1]** |
110+
| ---------------- | ------------------ | ---------------------- |
111+
| Apple platforms | Supported | Automated |
112+
| Linux | Supported | Automated |
113+
| Windows | Supported | Automated |
114+
| Wasm | Experimental | Automated (Build Only) |
115+
| Android | Experimental | Automated (Build Only) |
116+
| FreeBSD, OpenBSD | Experimental | Manual |
117+
118+
[^1]:
119+
Most platforms have "Automated" qualification, where continuous integration
120+
automatically verifies that the project builds and passes all tests. This
121+
ensures that any changes meet our highest quality standards, so it is our
122+
goal for all supported platforms.
123+
124+
Presently, some platforms rely on manual test ("Automated (Build Only)"
125+
qualification) or manual build and test ("Manual" qualification).
117126

118127
### Works with XCTest
119128

@@ -127,7 +136,7 @@ Detailed documentation for Swift Testing can be found on the
127136
[Swift Package Index](https://swiftpackageindex.com/swiftlang/swift-testing/main/documentation/testing).
128137
There, you can delve into comprehensive guides, tutorials, and API references to
129138
make the most out of this package. Swift Testing is included with the Swift 6
130-
toolchain and Xcode 16. You do not need to add it as a package dependency to
139+
toolchain and Xcode 16. You do not need to add it as a package dependency to
131140
your Swift package or Xcode project.
132141

133142
> [!IMPORTANT]
@@ -136,5 +145,5 @@ your Swift package or Xcode project.
136145
> repository requires a recent **main-branch development snapshot** toolchain.
137146
138147
Other documentation resources for this project can be found in the
139-
[README](https://github.com/swiftlang/swift-testing/blob/main/Documentation/README.md)
148+
[README](https://github.com/swiftlang/swift-testing/blob/main/Documentation/README.md)
140149
of the `Documentation/` subdirectory.

Sources/Overlays/_Testing_WinSDK/Attachments/AttachableImageFormat+CLSID.swift

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -195,9 +195,6 @@ extension AttachableImageFormat {
195195
/// @Metadata {
196196
/// @Available(Swift, introduced: 6.3)
197197
/// }
198-
#if compiler(>=6.3) && !SWT_FIXED_84466
199-
@_spi(_)
200-
#endif
201198
public var encoderCLSID: CLSID {
202199
kind.encoderCLSID
203200
}
@@ -223,9 +220,6 @@ extension AttachableImageFormat {
223220
/// @Metadata {
224221
/// @Available(Swift, introduced: 6.3)
225222
/// }
226-
#if compiler(>=6.3) && !SWT_FIXED_84466
227-
@_spi(_)
228-
#endif
229223
public init(encoderCLSID: CLSID, encodingQuality: Float = 1.0) {
230224
let encoderCLSID = CLSID.Wrapper(encoderCLSID)
231225
let kind: Kind = if encoderCLSID == CLSID.Wrapper(CLSID_WICPngEncoder) {

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/Attachments/Attachment.swift

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,6 @@ private import _TestingInternals
1919
/// record the attachment, call ``Attachment/record(_:sourceLocation:)``.
2020
/// Alternatively, pass your attachable value directly to ``Attachment/record(_:named:sourceLocation:)``.
2121
///
22-
/// By default, the testing library saves your attachments as soon as you call
23-
/// ``Attachment/record(_:sourceLocation:)`` or
24-
/// ``Attachment/record(_:named:sourceLocation:)``. You can access saved
25-
/// attachments after your tests finish running:
26-
///
27-
/// - When using Xcode, you can access attachments from the test report.
28-
/// - When using Visual Studio Code, the testing library saves attachments to
29-
/// `.build/attachments` by default. Visual Studio Code reports the paths to
30-
/// individual attachments in its Tests Results panel.
31-
/// - When using Swift Package Manager's `swift test` command, you can pass the
32-
/// `--attachments-path` option. The testing library saves attachments to the
33-
/// specified directory.
34-
///
3522
/// @Metadata {
3623
/// @Available(Swift, introduced: 6.2)
3724
/// @Available(Xcode, introduced: 26.0)
@@ -104,7 +91,8 @@ public struct Attachment<AttachableValue> where AttachableValue: Attachable & ~C
10491
///
10592
/// The value of this property is used when recording issues associated with
10693
/// the attachment.
107-
var sourceLocation: SourceLocation
94+
@_spi(ForToolsIntegrationOnly)
95+
public internal(set) var sourceLocation: SourceLocation
10896
}
10997

11098
extension Attachment: Sendable where AttachableValue: Sendable {}

0 commit comments

Comments
 (0)