Skip to content

Commit e12e243

Browse files
authored
Delete sidecar DocC files. (#979)
This PR deletes the sidecar DocC files we've created that include custom availability annotations for Swift and Xcode and/or deprecation summaries. The latest DocC builds allow us to specify this metadata directly on Swift symbols. Also add Xcode 16.3 availability for symbols added in Swift 6.1. ### Checklist: - [x] Code and documentation should follow the style of the [Style Guide](https://github.com/apple/swift-testing/blob/main/Documentation/StyleGuide.md). - [x] If public symbols are renamed or modified, DocC references should be updated.
1 parent a7b5435 commit e12e243

13 files changed

+78
-166
lines changed

Sources/Testing/Expectations/Expectation+Macro.swift

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,23 @@ public macro require<R>(
375375
/// ``expect(throws:_:sourceLocation:performing:)-1hfms`` instead. If the thrown
376376
/// error need only equal another instance of [`Error`](https://developer.apple.com/documentation/swift/error),
377377
/// use ``expect(throws:_:sourceLocation:performing:)-7du1h`` instead.
378+
///
379+
/// @Metadata {
380+
/// @Available(Swift, introduced: 6.0)
381+
/// @Available(Xcode, introduced: 16.0)
382+
/// }
383+
///
384+
/// @DeprecationSummary { <!-- Warning when compiling DocC: rdar://141785948 -->
385+
/// Examine the result of ``expect(throws:_:sourceLocation:performing:)-7du1h``
386+
/// or ``expect(throws:_:sourceLocation:performing:)-1hfms`` instead:
387+
///
388+
/// ```swift
389+
/// let error = #expect(throws: FoodTruckError.self) {
390+
/// ...
391+
/// }
392+
/// #expect(error?.napkinCount == 0)
393+
/// ```
394+
/// }
378395
@available(swift, deprecated: 100000.0, message: "Examine the result of '#expect(throws:)' instead.")
379396
@discardableResult
380397
@freestanding(expression) public macro expect<R>(
@@ -427,6 +444,23 @@ public macro require<R>(
427444
///
428445
/// If `expression` should _never_ throw, simply invoke the code without using
429446
/// this macro. The test will then fail if an error is thrown.
447+
///
448+
/// @Metadata {
449+
/// @Available(Swift, introduced: 6.0)
450+
/// @Available(Xcode, introduced: 16.0)
451+
/// }
452+
///
453+
/// @DeprecationSummary { <!-- Warning when compiling DocC: rdar://141785948 -->
454+
/// Examine the result of ``expect(throws:_:sourceLocation:performing:)-7du1h``
455+
/// or ``expect(throws:_:sourceLocation:performing:)-1hfms`` instead:
456+
///
457+
/// ```swift
458+
/// let error = try #require(throws: FoodTruckError.self) {
459+
/// ...
460+
/// }
461+
/// #expect(error.napkinCount == 0)
462+
/// ```
463+
/// }
430464
@available(swift, deprecated: 100000.0, message: "Examine the result of '#require(throws:)' instead.")
431465
@discardableResult
432466
@freestanding(expression) public macro require<R>(

Sources/Testing/Issues/Confirmation.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,11 @@ public func confirmation<R>(
161161
///
162162
/// If an exact count is expected, use
163163
/// ``confirmation(_:expectedCount:isolation:sourceLocation:_:)-5mqz2`` instead.
164+
///
165+
/// @Metadata {
166+
/// @Available(Swift, introduced: 6.1)
167+
/// @Available(Xcode, introduced: 16.3)
168+
/// }
164169
public func confirmation<R>(
165170
_ comment: Comment? = nil,
166171
expectedCount: some RangeExpression<Int> & Sequence<Int> & Sendable,

Sources/Testing/Testing.docc/AvailabilityStubs/ExpectComplexThrows.md

Lines changed: 0 additions & 28 deletions
This file was deleted.

Sources/Testing/Testing.docc/AvailabilityStubs/Issues/Confirmation.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

Sources/Testing/Testing.docc/AvailabilityStubs/RequireComplexThrows.md

Lines changed: 0 additions & 28 deletions
This file was deleted.

Sources/Testing/Testing.docc/AvailabilityStubs/Traits/SuiteTrait-scopeProvider-default-implementation-Self.md

Lines changed: 0 additions & 15 deletions
This file was deleted.

Sources/Testing/Testing.docc/AvailabilityStubs/Traits/TestScopeProvider.md

Lines changed: 0 additions & 15 deletions
This file was deleted.

Sources/Testing/Testing.docc/AvailabilityStubs/Traits/TestScoping-provideScope.md

Lines changed: 0 additions & 15 deletions
This file was deleted.

Sources/Testing/Testing.docc/AvailabilityStubs/Traits/TestScoping.md

Lines changed: 0 additions & 15 deletions
This file was deleted.

Sources/Testing/Testing.docc/AvailabilityStubs/Traits/Trait-scopeProvider-default-implementation-Never.md

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)