Skip to content

Commit 593327a

Browse files
authored
Mark XCTestScaffold to-be-deprecated. (#159)
Currently, the documentation for `XCTestScaffold` has a "warning" callout to indicate that it is a temporary interface. This PR replaces the callout with a formal deprecation attribute so that the type and its members show as deprecated in our documentation. They are marked as deprecated in Swift 100000.0, which is a "magic" version number used in Apple's SDK to indicate "to-be-deprecated" status.
1 parent 2c11f6d commit 593327a

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

Sources/Testing/Running/XCTestScaffold.swift

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -86,13 +86,14 @@ extension XCTIssue {
8686
/// A type providing temporary tools for integrating the testing library and
8787
/// the XCTest framework.
8888
///
89-
/// - Warning: This type is provided temporarily to aid in integrating the
90-
/// testing library with existing tools such as Swift Package Manager. It
91-
/// will be removed in a future release.
92-
///
9389
/// ## See Also
9490
///
9591
/// - <doc:TemporaryGettingStarted>
92+
#if SWIFT_PM_SUPPORTS_SWIFT_TESTING
93+
@available(*, deprecated, message: "This version of Swift Package Manager supports running swift-testing tests directly. This type will be removed in a future release.")
94+
#else
95+
@available(swift, deprecated: 100000.0, message: "This type is provided temporarily to aid in integrating the testing library with existing tools such as Swift Package Manager. It will be removed in a future release.")
96+
#endif
9697
public enum XCTestScaffold: Sendable {
9798
/// Run all tests found in the current process and write output to the
9899
/// standard error stream.
@@ -105,10 +106,6 @@ public enum XCTestScaffold: Sendable {
105106
/// The format of the output is not meant to be machine-readable and is
106107
/// subject to change.
107108
///
108-
/// - Warning: This function is provided temporarily to aid in integrating the
109-
/// testing library with existing tools such as Swift Package Manager. It
110-
/// will be removed in a future release.
111-
///
112109
/// ### Filtering tests
113110
///
114111
/// This function does not support the `--filter` argument passed to
@@ -167,7 +164,9 @@ public enum XCTestScaffold: Sendable {
167164
///
168165
/// - <doc:TemporaryGettingStarted>
169166
#if SWIFT_PM_SUPPORTS_SWIFT_TESTING
170-
@available(*, deprecated, message: "This version of Swift Package Manager supports running swift-testing tests directly. This function has no effect.")
167+
@available(*, deprecated, message: "This version of Swift Package Manager supports running swift-testing tests directly. This function has no effect and will be removed in a future release.")
168+
#else
169+
@available(swift, deprecated: 100000.0, message: "This function is provided temporarily to aid in integrating the testing library with existing tools such as Swift Package Manager. It will be removed in a future release.")
171170
#endif
172171
public static func runAllTests(hostedBy testCase: XCTestCase) async {
173172
#if SWIFT_PM_SUPPORTS_SWIFT_TESTING

0 commit comments

Comments
 (0)