Skip to content

Commit b50c49f

Browse files
committed
disable bad abi checker warning
1 parent ed06965 commit b50c49f

File tree

2 files changed

+15
-5
lines changed

2 files changed

+15
-5
lines changed

stdlib/public/Concurrency/Executor.swift

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,10 @@ import Swift
1616
@available(SwiftStdlib 5.1, *)
1717
public protocol Executor: AnyObject, Sendable {
1818

19-
@available(*, deprecated, message: "Implement 'enqueue(_: __owned Job)' instead")
20-
@available(SwiftStdlib 5.1, *)
19+
@available(macOS, introduced: 10.15, deprecated: 9999, message: "Implement 'enqueue(_: __owned Job)' instead")
20+
@available(iOS, introduced: 13.0, deprecated: 9999, message: "Implement 'enqueue(_: __owned Job)' instead")
21+
@available(watchOS, introduced: 6.0, deprecated: 9999, message: "Implement 'enqueue(_: __owned Job)' instead")
22+
@available(tvOS, introduced: 13.0, deprecated: 9999, message: "Implement 'enqueue(_: __owned Job)' instead")
2123
func enqueue(_ job: UnownedJob)
2224

2325
@available(SwiftStdlib 5.9, *)
@@ -32,7 +34,10 @@ public protocol SerialExecutor: Executor {
3234
// avoid drilling down to the base conformance just for the basic
3335
// work-scheduling operation.
3436
@_nonoverride
35-
@available(*, deprecated, message: "Implement 'enqueue_: __owned Job) instead")
37+
@available(macOS, introduced: 10.15, deprecated: 9999, message: "Implement 'enqueue(_: __owned Job)' instead")
38+
@available(iOS, introduced: 13.0, deprecated: 9999, message: "Implement 'enqueue(_: __owned Job)' instead")
39+
@available(watchOS, introduced: 6.0, deprecated: 9999, message: "Implement 'enqueue(_: __owned Job)' instead")
40+
@available(tvOS, introduced: 13.0, deprecated: 9999, message: "Implement 'enqueue(_: __owned Job)' instead")
3641
func enqueue(_ job: UnownedJob)
3742

3843
// This requirement is repeated here as a non-override so that we

test/api-digester/stability-concurrency-abi.test

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,13 @@ Protocol Actor has added inherited protocol AnyActor
6363
Protocol Actor has generic signature change from <Self : AnyObject, Self : Swift.Sendable> to <Self : _Concurrency.AnyActor>
6464
Struct CheckedContinuation has removed conformance to UnsafeSendable
6565

66-
// SerialExecutor gained `enqueue(_:) moveonly `Job`, protocol requirements got default implementations from
66+
// SerialExecutor gained `enqueue(_: __owned Job)`, protocol requirements got default implementations
6767
Func SerialExecutor.enqueue(_:) has been added as a protocol requirement
68-
// ABI checker seems confused,
68+
69+
// We deprecated `enqueue(_: UnownedJob)` and annotate it as such for all platforms,
70+
// while adding a new overload that accepts `Job` with new availability.
71+
// The ABI checker seems to be confused by this case.
72+
// rdar://106833284 (ABI checker confused with overload getting deprecated)
73+
Func Executor.enqueue(_:) is a new API without @available attribute
6974

7075
// *** DO NOT DISABLE OR XFAIL THIS TEST. *** (See comment above.)

0 commit comments

Comments
 (0)