Skip to content

Commit 829579f

Browse files
Undeprecated AsyncSequence erasing inits and methods (#57)
* Undeprecated AsyncSequence erasing inits and methods * Update ci.yml --------- Co-authored-by: Stephen Celis <[email protected]>
1 parent 0a250bb commit 829579f

File tree

3 files changed

+1
-48
lines changed

3 files changed

+1
-48
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -69,23 +69,6 @@ jobs:
6969
- name: Run tests
7070
run: wasmtime --dir . .build/debug/swift-concurrency-extrasPackageTests.wasm
7171

72-
windows:
73-
name: Windows
74-
strategy:
75-
matrix:
76-
os: [windows-latest]
77-
config: ['debug', 'release']
78-
runs-on: ${{ matrix.os }}
79-
steps:
80-
- uses: compnerd/gha-setup-swift@main
81-
with:
82-
branch: swift-6.0-release
83-
tag: 6.0-RELEASE
84-
85-
- uses: actions/checkout@v4
86-
- name: Run tests
87-
run: swift build -c ${{ matrix.config }}
88-
8972
android:
9073
name: Android (Swift 6.0.2)
9174
runs-on: ubuntu-22.04
@@ -128,4 +111,4 @@ jobs:
128111
with:
129112
api-level: 29
130113
arch: x86_64
131-
script: ~/test-toolchain.sh
114+
script: ~/test-toolchain.sh

Sources/ConcurrencyExtras/AsyncStream.swift

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,6 @@ extension AsyncStream {
5252
/// ```
5353
///
5454
/// - Parameter sequence: An async sequence.
55-
@available(iOS, deprecated: 18, message: "Use 'any AsyncSequence<Element, Never>', instead.")
56-
@available(macOS, deprecated: 15, message: "Use 'any AsyncSequence<Element, Never>', instead.")
57-
@available(tvOS, deprecated: 18, message: "Use 'any AsyncSequence<Element, Never>', instead.")
58-
@available(
59-
watchOS, deprecated: 11, message: "Use 'any AsyncSequence<Element, Never>', instead."
60-
)
6155
public init<S: AsyncSequence>(_ sequence: S) where S.Element == Element, S: Sendable {
6256
let lock = NSLock()
6357
let iterator = UncheckedBox<S.AsyncIterator?>(wrappedValue: nil)
@@ -92,14 +86,6 @@ extension AsyncStream {
9286
}
9387

9488
extension AsyncSequence {
95-
/// Erases this async sequence to an async stream that produces elements till this sequence
96-
/// terminates (or fails).
97-
@available(iOS, deprecated: 18, message: "Use 'any AsyncSequence<Element, Never>', instead.")
98-
@available(macOS, deprecated: 15, message: "Use 'any AsyncSequence<Element, Never>', instead.")
99-
@available(tvOS, deprecated: 18, message: "Use 'any AsyncSequence<Element, Never>', instead.")
100-
@available(
101-
watchOS, deprecated: 11, message: "Use 'any AsyncSequence<Element, Never>', instead."
102-
)
10389
public func eraseToStream() -> AsyncStream<Element> where Self: Sendable {
10490
AsyncStream(self)
10591
}

Sources/ConcurrencyExtras/AsyncThrowingStream.swift

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,6 @@ extension AsyncThrowingStream where Failure == Error {
55
/// terminates, rethrowing any failure.
66
///
77
/// - Parameter sequence: An async sequence.
8-
@available(iOS, deprecated: 18, message: "Use 'any AsyncSequence<Element, any Error>', instead.")
9-
@available(
10-
macOS, deprecated: 15, message: "Use 'any AsyncSequence<Element, any Error>', instead."
11-
)
12-
@available(tvOS, deprecated: 18, message: "Use 'any AsyncSequence<Element, any Error>', instead.")
13-
@available(
14-
watchOS, deprecated: 11, message: "Use 'any AsyncSequence<Element, any Error>', instead."
15-
)
168
public init<S: AsyncSequence>(_ sequence: S) where S.Element == Element, S: Sendable {
179
let lock = NSLock()
1810
let iterator = UncheckedBox<S.AsyncIterator?>(wrappedValue: nil)
@@ -51,14 +43,6 @@ extension AsyncThrowingStream where Failure == Error {
5143
extension AsyncSequence {
5244
/// Erases this async sequence to an async throwing stream that produces elements till this
5345
/// sequence terminates, rethrowing any error on failure.
54-
@available(iOS, deprecated: 18, message: "Use 'any AsyncSequence<Element, any Error>', instead.")
55-
@available(
56-
macOS, deprecated: 15, message: "Use 'any AsyncSequence<Element, any Error>', instead."
57-
)
58-
@available(tvOS, deprecated: 18, message: "Use 'any AsyncSequence<Element, any Error>', instead.")
59-
@available(
60-
watchOS, deprecated: 11, message: "Use 'any AsyncSequence<Element, any Error>', instead."
61-
)
6246
public func eraseToThrowingStream() -> AsyncThrowingStream<Element, Error> where Self: Sendable {
6347
AsyncThrowingStream(self)
6448
}

0 commit comments

Comments
 (0)