From 6360ca0344f058fb048c5597447f3d44f0329296 Mon Sep 17 00:00:00 2001 From: Franz Busch Date: Wed, 27 Sep 2023 16:19:00 +0100 Subject: [PATCH] Remove `@_implementationOnly` usage (#294) # 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 b863bc5..9ca7a99 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 a43c202..de5d37a 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 e823e5f..2c8b1b9 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 71d0507..5217e8d 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 e1ed262..952b13c 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 2de482c..9f82ed9 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 8cafcd9..d557669 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 e3bb59e..bb832ad 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 69c8fe5..ed12819 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