Skip to content

Commit

Permalink
Remove @_implementationOnly usage (#294)
Browse files Browse the repository at this point in the history
# Motivation
We added `@_implementationOnly` a little while ago to hide the dependency on the `DequeModule`. However, with recent compilers this produces a warning since `@_implementationOnly` is only intended to be used in resilient libraries.

# Modification
This PR removes the usage of `@_implementationOnly`
  • Loading branch information
FranzBusch authored Sep 27, 2023
1 parent 0a3866d commit 6360ca0
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
//
//===----------------------------------------------------------------------===//

@_implementationOnly import DequeModule
import DequeModule

struct BoundedBufferStateMachine<Base: AsyncSequence> {
typealias Element = Base.Element
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
//
//===----------------------------------------------------------------------===//

@_implementationOnly import DequeModule
import DequeModule

struct UnboundedBufferStateMachine<Base: AsyncSequence> {
typealias Element = Base.Element
Expand Down
2 changes: 1 addition & 1 deletion Sources/AsyncAlgorithms/Channels/ChannelStateMachine.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// See https://swift.org/LICENSE.txt for license information
//
//===----------------------------------------------------------------------===//
@_implementationOnly import OrderedCollections
import OrderedCollections

// NOTE: this is only marked as unchecked since the swift-collections tag is before auditing for Sendable
extension OrderedSet: @unchecked Sendable where Element: Sendable { }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
//
//===----------------------------------------------------------------------===//

@_implementationOnly import DequeModule
import DequeModule

/// State machine for combine latest
struct CombineLatestStateMachine<
Expand Down
6 changes: 3 additions & 3 deletions Sources/AsyncAlgorithms/Locking.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
//===----------------------------------------------------------------------===//

#if canImport(Darwin)
@_implementationOnly import Darwin
import Darwin
#elseif canImport(Glibc)
@_implementationOnly import Glibc
import Glibc
#elseif canImport(WinSDK)
@_implementationOnly import WinSDK
import WinSDK
#endif

internal struct Lock {
Expand Down
2 changes: 1 addition & 1 deletion Sources/AsyncAlgorithms/Merge/AsyncMerge2Sequence.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
//
//===----------------------------------------------------------------------===//

@_implementationOnly import DequeModule
import DequeModule

/// Creates an asynchronous sequence of elements from two underlying asynchronous sequences
public func merge<Base1: AsyncSequence, Base2: AsyncSequence>(_ base1: Base1, _ base2: Base2) -> AsyncMerge2Sequence<Base1, Base2>
Expand Down
2 changes: 1 addition & 1 deletion Sources/AsyncAlgorithms/Merge/AsyncMerge3Sequence.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
//
//===----------------------------------------------------------------------===//

@_implementationOnly import DequeModule
import DequeModule

/// Creates an asynchronous sequence of elements from two underlying asynchronous sequences
public func merge<
Expand Down
2 changes: 1 addition & 1 deletion Sources/AsyncAlgorithms/Merge/MergeStateMachine.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
//
//===----------------------------------------------------------------------===//

@_implementationOnly import DequeModule
import DequeModule

/// The state machine for any of the `merge` operator.
///
Expand Down
4 changes: 2 additions & 2 deletions Sources/AsyncSequenceValidation/TaskDriver.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
import _CAsyncSequenceValidationSupport

#if canImport(Darwin)
@_implementationOnly import Darwin
import Darwin
#elseif canImport(Glibc)
@_implementationOnly import Glibc
import Glibc
#elseif canImport(WinSDK)
#error("TODO: Port TaskDriver threading to windows")
#endif
Expand Down

0 comments on commit 6360ca0

Please sign in to comment.