From ce5ce56500e6de00e5660a6e6941bcf1907c2f82 Mon Sep 17 00:00:00 2001 From: Franz Busch Date: Thu, 21 Sep 2023 10:22:32 +0200 Subject: [PATCH] Remove `@_implementationOnly` usage # 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` --- .../AsyncAlgorithms/Buffer/BoundedBufferStateMachine.swift | 2 +- .../Buffer/UnboundedBufferStateMachine.swift | 2 +- Sources/AsyncAlgorithms/Channels/ChannelStateMachine.swift | 2 +- .../CombineLatest/CombineLatestStateMachine.swift | 2 +- Sources/AsyncAlgorithms/Locking.swift | 6 +++--- Sources/AsyncAlgorithms/Merge/AsyncMerge2Sequence.swift | 2 +- Sources/AsyncAlgorithms/Merge/AsyncMerge3Sequence.swift | 2 +- Sources/AsyncAlgorithms/Merge/MergeStateMachine.swift | 2 +- Sources/AsyncSequenceValidation/TaskDriver.swift | 4 ++-- 9 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Sources/AsyncAlgorithms/Buffer/BoundedBufferStateMachine.swift b/Sources/AsyncAlgorithms/Buffer/BoundedBufferStateMachine.swift index b863bc50..9ca7a993 100644 --- a/Sources/AsyncAlgorithms/Buffer/BoundedBufferStateMachine.swift +++ b/Sources/AsyncAlgorithms/Buffer/BoundedBufferStateMachine.swift @@ -9,7 +9,7 @@ // //===----------------------------------------------------------------------===// -@_implementationOnly import DequeModule +import DequeModule struct BoundedBufferStateMachine { typealias Element = Base.Element diff --git a/Sources/AsyncAlgorithms/Buffer/UnboundedBufferStateMachine.swift b/Sources/AsyncAlgorithms/Buffer/UnboundedBufferStateMachine.swift index a43c2023..de5d37ae 100644 --- a/Sources/AsyncAlgorithms/Buffer/UnboundedBufferStateMachine.swift +++ b/Sources/AsyncAlgorithms/Buffer/UnboundedBufferStateMachine.swift @@ -9,7 +9,7 @@ // //===----------------------------------------------------------------------===// -@_implementationOnly import DequeModule +import DequeModule struct UnboundedBufferStateMachine { typealias Element = Base.Element diff --git a/Sources/AsyncAlgorithms/Channels/ChannelStateMachine.swift b/Sources/AsyncAlgorithms/Channels/ChannelStateMachine.swift index e823e5f7..2c8b1b92 100644 --- a/Sources/AsyncAlgorithms/Channels/ChannelStateMachine.swift +++ b/Sources/AsyncAlgorithms/Channels/ChannelStateMachine.swift @@ -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 { } diff --git a/Sources/AsyncAlgorithms/CombineLatest/CombineLatestStateMachine.swift b/Sources/AsyncAlgorithms/CombineLatest/CombineLatestStateMachine.swift index 71d0507a..5217e8de 100644 --- a/Sources/AsyncAlgorithms/CombineLatest/CombineLatestStateMachine.swift +++ b/Sources/AsyncAlgorithms/CombineLatest/CombineLatestStateMachine.swift @@ -9,7 +9,7 @@ // //===----------------------------------------------------------------------===// -@_implementationOnly import DequeModule +import DequeModule /// State machine for combine latest struct CombineLatestStateMachine< diff --git a/Sources/AsyncAlgorithms/Locking.swift b/Sources/AsyncAlgorithms/Locking.swift index e1ed2626..952b13c8 100644 --- a/Sources/AsyncAlgorithms/Locking.swift +++ b/Sources/AsyncAlgorithms/Locking.swift @@ -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 { diff --git a/Sources/AsyncAlgorithms/Merge/AsyncMerge2Sequence.swift b/Sources/AsyncAlgorithms/Merge/AsyncMerge2Sequence.swift index 2de482c8..9f82ed98 100644 --- a/Sources/AsyncAlgorithms/Merge/AsyncMerge2Sequence.swift +++ b/Sources/AsyncAlgorithms/Merge/AsyncMerge2Sequence.swift @@ -9,7 +9,7 @@ // //===----------------------------------------------------------------------===// -@_implementationOnly import DequeModule +import DequeModule /// Creates an asynchronous sequence of elements from two underlying asynchronous sequences public func merge(_ base1: Base1, _ base2: Base2) -> AsyncMerge2Sequence diff --git a/Sources/AsyncAlgorithms/Merge/AsyncMerge3Sequence.swift b/Sources/AsyncAlgorithms/Merge/AsyncMerge3Sequence.swift index 8cafcd95..d5576694 100644 --- a/Sources/AsyncAlgorithms/Merge/AsyncMerge3Sequence.swift +++ b/Sources/AsyncAlgorithms/Merge/AsyncMerge3Sequence.swift @@ -9,7 +9,7 @@ // //===----------------------------------------------------------------------===// -@_implementationOnly import DequeModule +import DequeModule /// Creates an asynchronous sequence of elements from two underlying asynchronous sequences public func merge< diff --git a/Sources/AsyncAlgorithms/Merge/MergeStateMachine.swift b/Sources/AsyncAlgorithms/Merge/MergeStateMachine.swift index e3bb59e4..bb832ada 100644 --- a/Sources/AsyncAlgorithms/Merge/MergeStateMachine.swift +++ b/Sources/AsyncAlgorithms/Merge/MergeStateMachine.swift @@ -9,7 +9,7 @@ // //===----------------------------------------------------------------------===// -@_implementationOnly import DequeModule +import DequeModule /// The state machine for any of the `merge` operator. /// diff --git a/Sources/AsyncSequenceValidation/TaskDriver.swift b/Sources/AsyncSequenceValidation/TaskDriver.swift index 69c8fe5c..ed128193 100644 --- a/Sources/AsyncSequenceValidation/TaskDriver.swift +++ b/Sources/AsyncSequenceValidation/TaskDriver.swift @@ -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