From 8c70edf0d88abf8b3bd8ed6b2427680ff71cb988 Mon Sep 17 00:00:00 2001 From: Tony Parker Date: Mon, 14 Oct 2024 13:16:17 -0700 Subject: [PATCH] Use internal import instead of implementationOnly import [#5108] --- Sources/Foundation/Bridging.swift | 2 +- Sources/Foundation/Bundle.swift | 2 +- Sources/Foundation/DateComponents.swift | 2 +- Sources/Foundation/DateFormatter.swift | 2 +- Sources/Foundation/DateInterval.swift | 2 +- Sources/Foundation/DateIntervalFormatter.swift | 2 +- Sources/Foundation/Dictionary.swift | 2 +- Sources/Foundation/FileHandle.swift | 2 +- Sources/Foundation/FileManager+POSIX.swift | 4 ++-- Sources/Foundation/FileManager+Win32.swift | 2 +- Sources/Foundation/FileManager.swift | 2 +- Sources/Foundation/Host.swift | 2 +- Sources/Foundation/ISO8601DateFormatter.swift | 2 +- Sources/Foundation/JSONSerialization.swift | 2 +- Sources/Foundation/Measurement.swift | 2 +- Sources/Foundation/NSArray.swift | 2 +- Sources/Foundation/NSAttributedString.swift | 2 +- Sources/Foundation/NSCFArray.swift | 2 +- Sources/Foundation/NSCFBoolean.swift | 2 +- Sources/Foundation/NSCFCharacterSet.swift | 2 +- Sources/Foundation/NSCFDictionary.swift | 2 +- Sources/Foundation/NSCFSet.swift | 2 +- Sources/Foundation/NSCFString.swift | 2 +- Sources/Foundation/NSCalendar.swift | 2 +- Sources/Foundation/NSCharacterSet.swift | 2 +- Sources/Foundation/NSConcreteValue.swift | 2 +- Sources/Foundation/NSData.swift | 2 +- Sources/Foundation/NSDate.swift | 2 +- Sources/Foundation/NSDateComponents.swift | 2 +- Sources/Foundation/NSDictionary.swift | 2 +- Sources/Foundation/NSError.swift | 2 +- Sources/Foundation/NSKeyedArchiver.swift | 2 +- Sources/Foundation/NSKeyedArchiverHelpers.swift | 2 +- Sources/Foundation/NSKeyedCoderOldStyleArray.swift | 2 +- Sources/Foundation/NSKeyedUnarchiver.swift | 2 +- Sources/Foundation/NSLocale.swift | 2 +- Sources/Foundation/NSLock.swift | 2 +- Sources/Foundation/NSLog.swift | 2 +- Sources/Foundation/NSNumber.swift | 2 +- Sources/Foundation/NSObjCRuntime.swift | 2 +- Sources/Foundation/NSObject.swift | 2 +- Sources/Foundation/NSPathUtilities.swift | 2 +- Sources/Foundation/NSRange.swift | 2 +- Sources/Foundation/NSRegularExpression.swift | 2 +- Sources/Foundation/NSSet.swift | 2 +- Sources/Foundation/NSSortDescriptor.swift | 2 +- Sources/Foundation/NSString.swift | 2 +- Sources/Foundation/NSSwiftRuntime.swift | 2 +- Sources/Foundation/NSTextCheckingResult.swift | 2 +- Sources/Foundation/NSTimeZone.swift | 2 +- Sources/Foundation/NSURL.swift | 2 +- Sources/Foundation/NSURLComponents.swift | 2 +- Sources/Foundation/NSUUID.swift | 2 +- Sources/Foundation/NotificationQueue.swift | 2 +- Sources/Foundation/NumberFormatter.swift | 2 +- Sources/Foundation/Port.swift | 2 +- Sources/Foundation/Process.swift | 2 +- Sources/Foundation/ProcessInfo.swift | 2 +- Sources/Foundation/PropertyListSerialization.swift | 2 +- Sources/Foundation/RunLoop.swift | 2 +- Sources/Foundation/Set.swift | 2 +- Sources/Foundation/Stream.swift | 2 +- Sources/Foundation/String.swift | 2 +- Sources/Foundation/Thread.swift | 2 +- Sources/Foundation/Timer.swift | 2 +- Sources/Foundation/UserDefaults.swift | 2 +- Sources/FoundationNetworking/URLSession/BodySource.swift | 2 +- .../URLSession/HTTP/HTTPURLProtocol.swift | 2 +- .../URLSession/WebSocket/WebSocketURLProtocol.swift | 2 +- .../FoundationNetworking/URLSession/libcurl/EasyHandle.swift | 2 +- .../FoundationNetworking/URLSession/libcurl/MultiHandle.swift | 2 +- .../URLSession/libcurl/libcurlHelpers.swift | 2 +- Sources/FoundationXML/XMLDTD.swift | 2 +- Sources/FoundationXML/XMLDTDNode.swift | 2 +- Sources/FoundationXML/XMLDocument.swift | 2 +- Sources/FoundationXML/XMLElement.swift | 2 +- Sources/FoundationXML/XMLNode.swift | 2 +- Sources/FoundationXML/XMLParser.swift | 2 +- Sources/XCTest/Public/Asynchronous/XCTWaiter.swift | 2 +- 79 files changed, 80 insertions(+), 80 deletions(-) diff --git a/Sources/Foundation/Bridging.swift b/Sources/Foundation/Bridging.swift index 2a4eba95f6..c58d939acd 100644 --- a/Sources/Foundation/Bridging.swift +++ b/Sources/Foundation/Bridging.swift @@ -10,7 +10,7 @@ // //===----------------------------------------------------------------------===// -@_implementationOnly import CoreFoundation +internal import CoreFoundation #if canImport(ObjectiveC) import ObjectiveC diff --git a/Sources/Foundation/Bundle.swift b/Sources/Foundation/Bundle.swift index ac5cca3342..890831cb9c 100644 --- a/Sources/Foundation/Bundle.swift +++ b/Sources/Foundation/Bundle.swift @@ -7,7 +7,7 @@ // See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors // -@_implementationOnly import CoreFoundation +internal import CoreFoundation @_silgen_name("swift_getTypeContextDescriptor") private func _getTypeContextDescriptor(of cls: AnyClass) -> UnsafeRawPointer diff --git a/Sources/Foundation/DateComponents.swift b/Sources/Foundation/DateComponents.swift index 95865d25bb..fe8ac01064 100644 --- a/Sources/Foundation/DateComponents.swift +++ b/Sources/Foundation/DateComponents.swift @@ -10,7 +10,7 @@ // //===----------------------------------------------------------------------===// -@_implementationOnly import CoreFoundation +internal import CoreFoundation extension DateComponents : ReferenceConvertible { public typealias ReferenceType = NSDateComponents diff --git a/Sources/Foundation/DateFormatter.swift b/Sources/Foundation/DateFormatter.swift index 760e776dae..dd1e021aa4 100644 --- a/Sources/Foundation/DateFormatter.swift +++ b/Sources/Foundation/DateFormatter.swift @@ -7,7 +7,7 @@ // See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors // -@_implementationOnly import CoreFoundation +internal import CoreFoundation @_spi(SwiftCorelibsFoundation) import FoundationEssentials internal import Synchronization diff --git a/Sources/Foundation/DateInterval.swift b/Sources/Foundation/DateInterval.swift index e84833d3bb..c0e8d26cee 100644 --- a/Sources/Foundation/DateInterval.swift +++ b/Sources/Foundation/DateInterval.swift @@ -10,7 +10,7 @@ // //===----------------------------------------------------------------------===// -@_implementationOnly import CoreFoundation +internal import CoreFoundation extension DateInterval : _ObjectiveCBridgeable { public static func _isBridgedToObjectiveC() -> Bool { diff --git a/Sources/Foundation/DateIntervalFormatter.swift b/Sources/Foundation/DateIntervalFormatter.swift index c6a837ee83..557f710077 100644 --- a/Sources/Foundation/DateIntervalFormatter.swift +++ b/Sources/Foundation/DateIntervalFormatter.swift @@ -7,7 +7,7 @@ // See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors // -@_implementationOnly import CoreFoundation +internal import CoreFoundation internal let kCFDateIntervalFormatterNoStyle = CFDateIntervalFormatterStyle.noStyle internal let kCFDateIntervalFormatterShortStyle = CFDateIntervalFormatterStyle.shortStyle diff --git a/Sources/Foundation/Dictionary.swift b/Sources/Foundation/Dictionary.swift index fa0b5079bf..a331176ae7 100644 --- a/Sources/Foundation/Dictionary.swift +++ b/Sources/Foundation/Dictionary.swift @@ -7,7 +7,7 @@ // See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors // -@_implementationOnly import CoreFoundation +internal import CoreFoundation extension Dictionary : _ObjectiveCBridgeable { diff --git a/Sources/Foundation/FileHandle.swift b/Sources/Foundation/FileHandle.swift index b07c49acca..e4c5a4ed4f 100644 --- a/Sources/Foundation/FileHandle.swift +++ b/Sources/Foundation/FileHandle.swift @@ -7,7 +7,7 @@ // See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors // -@_implementationOnly import CoreFoundation +internal import CoreFoundation #if canImport(Dispatch) import Dispatch #endif diff --git a/Sources/Foundation/FileManager+POSIX.swift b/Sources/Foundation/FileManager+POSIX.swift index e89b3bf633..ce9bb974a8 100644 --- a/Sources/Foundation/FileManager+POSIX.swift +++ b/Sources/Foundation/FileManager+POSIX.swift @@ -13,7 +13,7 @@ internal func &(left: UInt32, right: mode_t) -> mode_t { } #endif -@_implementationOnly import CoreFoundation +internal import CoreFoundation internal import Synchronization #if os(WASI) @@ -32,7 +32,7 @@ internal var O_WRONLY: Int32 { _getConst_O_WRONLY() } fileprivate let previousStatxFailed = Mutex(false) #endif -@_implementationOnly import CoreFoundation +internal import CoreFoundation extension FileManager { internal func _mountedVolumeURLs(includingResourceValuesForKeys propertyKeys: [URLResourceKey]?, options: VolumeEnumerationOptions = []) -> [URL]? { diff --git a/Sources/Foundation/FileManager+Win32.swift b/Sources/Foundation/FileManager+Win32.swift index c4d2ceaff9..5fa68379ce 100644 --- a/Sources/Foundation/FileManager+Win32.swift +++ b/Sources/Foundation/FileManager+Win32.swift @@ -7,7 +7,7 @@ // See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors // -@_implementationOnly import CoreFoundation +internal import CoreFoundation #if os(Windows) import let WinSDK.INVALID_FILE_ATTRIBUTES diff --git a/Sources/Foundation/FileManager.swift b/Sources/Foundation/FileManager.swift index 5a68934853..4044615556 100644 --- a/Sources/Foundation/FileManager.swift +++ b/Sources/Foundation/FileManager.swift @@ -13,7 +13,7 @@ fileprivate let SF_IMMUTABLE: Int32 = 1 fileprivate let UF_HIDDEN: Int32 = 1 #endif -@_implementationOnly import CoreFoundation +internal import CoreFoundation #if os(Windows) import CRT import WinSDK diff --git a/Sources/Foundation/Host.swift b/Sources/Foundation/Host.swift index 6c4f5291f6..5646a161d2 100644 --- a/Sources/Foundation/Host.swift +++ b/Sources/Foundation/Host.swift @@ -7,7 +7,7 @@ // See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors // -@_implementationOnly import CoreFoundation +internal import CoreFoundation #if os(Windows) import WinSDK #endif diff --git a/Sources/Foundation/ISO8601DateFormatter.swift b/Sources/Foundation/ISO8601DateFormatter.swift index 6afe9da8ca..0b0411f04f 100644 --- a/Sources/Foundation/ISO8601DateFormatter.swift +++ b/Sources/Foundation/ISO8601DateFormatter.swift @@ -7,7 +7,7 @@ // See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors // -@_implementationOnly import CoreFoundation +internal import CoreFoundation extension ISO8601DateFormatter { diff --git a/Sources/Foundation/JSONSerialization.swift b/Sources/Foundation/JSONSerialization.swift index dd9e73d1bb..8676f9b69f 100644 --- a/Sources/Foundation/JSONSerialization.swift +++ b/Sources/Foundation/JSONSerialization.swift @@ -10,7 +10,7 @@ // //===----------------------------------------------------------------------===// -@_implementationOnly import CoreFoundation +internal import CoreFoundation extension JSONSerialization { public struct ReadingOptions : OptionSet, Sendable { diff --git a/Sources/Foundation/Measurement.swift b/Sources/Foundation/Measurement.swift index 4865f2cf99..0e8be0f48a 100644 --- a/Sources/Foundation/Measurement.swift +++ b/Sources/Foundation/Measurement.swift @@ -11,7 +11,7 @@ //===----------------------------------------------------------------------===// #if DEPLOYMENT_RUNTIME_SWIFT -@_implementationOnly import CoreFoundation +internal import CoreFoundation #else @_exported import Foundation // Clang module import _SwiftCoreFoundationOverlayShims diff --git a/Sources/Foundation/NSArray.swift b/Sources/Foundation/NSArray.swift index 5d4699e3c2..d2980c0007 100644 --- a/Sources/Foundation/NSArray.swift +++ b/Sources/Foundation/NSArray.swift @@ -7,7 +7,7 @@ // See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors // -@_implementationOnly import CoreFoundation +internal import CoreFoundation @available(*, unavailable) extension NSArray : @unchecked Sendable { } diff --git a/Sources/Foundation/NSAttributedString.swift b/Sources/Foundation/NSAttributedString.swift index c83818d720..6a4fcea59a 100644 --- a/Sources/Foundation/NSAttributedString.swift +++ b/Sources/Foundation/NSAttributedString.swift @@ -7,7 +7,7 @@ // See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors // -@_implementationOnly import CoreFoundation +internal import CoreFoundation extension NSAttributedString { public struct Key: RawRepresentable, Equatable, Hashable, Sendable { diff --git a/Sources/Foundation/NSCFArray.swift b/Sources/Foundation/NSCFArray.swift index fb94518e4a..1cfa877210 100644 --- a/Sources/Foundation/NSCFArray.swift +++ b/Sources/Foundation/NSCFArray.swift @@ -8,7 +8,7 @@ // -@_implementationOnly import CoreFoundation +internal import CoreFoundation internal final class _NSCFArray : NSMutableArray { deinit { diff --git a/Sources/Foundation/NSCFBoolean.swift b/Sources/Foundation/NSCFBoolean.swift index c54cca02a2..1a4d1a5702 100644 --- a/Sources/Foundation/NSCFBoolean.swift +++ b/Sources/Foundation/NSCFBoolean.swift @@ -8,7 +8,7 @@ // -@_implementationOnly import CoreFoundation +internal import CoreFoundation internal class __NSCFBoolean : NSNumber, @unchecked Sendable { override var hash: Int { diff --git a/Sources/Foundation/NSCFCharacterSet.swift b/Sources/Foundation/NSCFCharacterSet.swift index bff3e8a00c..c4cff28749 100644 --- a/Sources/Foundation/NSCFCharacterSet.swift +++ b/Sources/Foundation/NSCFCharacterSet.swift @@ -6,7 +6,7 @@ // Copyright © 2016 Apple. All rights reserved. // -@_implementationOnly import CoreFoundation +internal import CoreFoundation internal class _NSCFCharacterSet : NSMutableCharacterSet { diff --git a/Sources/Foundation/NSCFDictionary.swift b/Sources/Foundation/NSCFDictionary.swift index 4d7269f588..9b171d461b 100644 --- a/Sources/Foundation/NSCFDictionary.swift +++ b/Sources/Foundation/NSCFDictionary.swift @@ -8,7 +8,7 @@ // -@_implementationOnly import CoreFoundation +internal import CoreFoundation internal final class _NSCFDictionary : NSMutableDictionary { deinit { diff --git a/Sources/Foundation/NSCFSet.swift b/Sources/Foundation/NSCFSet.swift index 6b90fd71d7..7e4dc5b079 100644 --- a/Sources/Foundation/NSCFSet.swift +++ b/Sources/Foundation/NSCFSet.swift @@ -8,7 +8,7 @@ // -@_implementationOnly import CoreFoundation +internal import CoreFoundation internal final class _NSCFSet : NSMutableSet { deinit { diff --git a/Sources/Foundation/NSCFString.swift b/Sources/Foundation/NSCFString.swift index 40ee579f42..986e0bf465 100644 --- a/Sources/Foundation/NSCFString.swift +++ b/Sources/Foundation/NSCFString.swift @@ -8,7 +8,7 @@ // -@_implementationOnly import CoreFoundation +internal import CoreFoundation @usableFromInline internal class _NSCFString : NSMutableString { diff --git a/Sources/Foundation/NSCalendar.swift b/Sources/Foundation/NSCalendar.swift index 20774d22d9..101b1a209b 100644 --- a/Sources/Foundation/NSCalendar.swift +++ b/Sources/Foundation/NSCalendar.swift @@ -7,7 +7,7 @@ // See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors // -@_implementationOnly import CoreFoundation +internal import CoreFoundation @_spi(SwiftCorelibsFoundation) @_exported import FoundationEssentials internal let kCFCalendarUnitEra = CFCalendarUnit.era diff --git a/Sources/Foundation/NSCharacterSet.swift b/Sources/Foundation/NSCharacterSet.swift index 6e153906ba..d13d041e3a 100644 --- a/Sources/Foundation/NSCharacterSet.swift +++ b/Sources/Foundation/NSCharacterSet.swift @@ -8,7 +8,7 @@ // -@_implementationOnly import CoreFoundation +internal import CoreFoundation let kCFCharacterSetControl = CFCharacterSetPredefinedSet.control let kCFCharacterSetWhitespace = CFCharacterSetPredefinedSet.whitespace diff --git a/Sources/Foundation/NSConcreteValue.swift b/Sources/Foundation/NSConcreteValue.swift index c28f5b2547..f6e6c077d2 100644 --- a/Sources/Foundation/NSConcreteValue.swift +++ b/Sources/Foundation/NSConcreteValue.swift @@ -7,7 +7,7 @@ // See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors // -@_implementationOnly import CoreFoundation +internal import CoreFoundation internal import Synchronization internal class NSConcreteValue : NSValue, @unchecked Sendable { diff --git a/Sources/Foundation/NSData.swift b/Sources/Foundation/NSData.swift index ae54f971ec..3774a53b34 100644 --- a/Sources/Foundation/NSData.swift +++ b/Sources/Foundation/NSData.swift @@ -7,7 +7,7 @@ // See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors // -@_implementationOnly import CoreFoundation +internal import CoreFoundation #if !os(WASI) import Dispatch #endif diff --git a/Sources/Foundation/NSDate.swift b/Sources/Foundation/NSDate.swift index ac7bd1bc9c..41063f16b5 100644 --- a/Sources/Foundation/NSDate.swift +++ b/Sources/Foundation/NSDate.swift @@ -7,7 +7,7 @@ // See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors // -@_implementationOnly import CoreFoundation +internal import CoreFoundation public typealias TimeInterval = Double diff --git a/Sources/Foundation/NSDateComponents.swift b/Sources/Foundation/NSDateComponents.swift index 93462d7fca..8b530af4a7 100644 --- a/Sources/Foundation/NSDateComponents.swift +++ b/Sources/Foundation/NSDateComponents.swift @@ -8,7 +8,7 @@ // @_exported import FoundationEssentials -@_implementationOnly import CoreFoundation +internal import CoreFoundation // This is a just used as an extensible struct, basically; diff --git a/Sources/Foundation/NSDictionary.swift b/Sources/Foundation/NSDictionary.swift index 5cf7a45fef..09ffb52ac2 100644 --- a/Sources/Foundation/NSDictionary.swift +++ b/Sources/Foundation/NSDictionary.swift @@ -8,7 +8,7 @@ // -@_implementationOnly import CoreFoundation +internal import CoreFoundation #if !os(WASI) import Dispatch diff --git a/Sources/Foundation/NSError.swift b/Sources/Foundation/NSError.swift index 6f21d3a03d..201ae65940 100644 --- a/Sources/Foundation/NSError.swift +++ b/Sources/Foundation/NSError.swift @@ -18,7 +18,7 @@ import Glibc import CRT #endif -@_implementationOnly import CoreFoundation +internal import CoreFoundation internal import Synchronization public typealias NSErrorDomain = NSString diff --git a/Sources/Foundation/NSKeyedArchiver.swift b/Sources/Foundation/NSKeyedArchiver.swift index 9bd8ce9174..4a8b191a8b 100644 --- a/Sources/Foundation/NSKeyedArchiver.swift +++ b/Sources/Foundation/NSKeyedArchiver.swift @@ -7,7 +7,7 @@ // See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors // -@_implementationOnly import CoreFoundation +internal import CoreFoundation internal import Synchronization /// Archives created using the class method `archivedData(withRootObject:)` use this key diff --git a/Sources/Foundation/NSKeyedArchiverHelpers.swift b/Sources/Foundation/NSKeyedArchiverHelpers.swift index 7460aca18a..83f5901dda 100644 --- a/Sources/Foundation/NSKeyedArchiverHelpers.swift +++ b/Sources/Foundation/NSKeyedArchiverHelpers.swift @@ -7,7 +7,7 @@ // See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors // -@_implementationOnly import CoreFoundation +internal import CoreFoundation extension CFKeyedArchiverUID : _NSBridgeable { typealias NSType = _NSKeyedArchiverUID diff --git a/Sources/Foundation/NSKeyedCoderOldStyleArray.swift b/Sources/Foundation/NSKeyedCoderOldStyleArray.swift index 72b48c0215..11f098befb 100644 --- a/Sources/Foundation/NSKeyedCoderOldStyleArray.swift +++ b/Sources/Foundation/NSKeyedCoderOldStyleArray.swift @@ -7,7 +7,7 @@ // See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors // -@_implementationOnly import CoreFoundation +internal import CoreFoundation internal final class _NSKeyedCoderOldStyleArray : NSObject, NSCopying, NSSecureCoding, NSCoding { diff --git a/Sources/Foundation/NSKeyedUnarchiver.swift b/Sources/Foundation/NSKeyedUnarchiver.swift index 7f6509b8fc..f42aa048bb 100644 --- a/Sources/Foundation/NSKeyedUnarchiver.swift +++ b/Sources/Foundation/NSKeyedUnarchiver.swift @@ -7,7 +7,7 @@ // See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors // -@_implementationOnly import CoreFoundation +internal import CoreFoundation internal import Synchronization @available(*, unavailable) diff --git a/Sources/Foundation/NSLocale.swift b/Sources/Foundation/NSLocale.swift index 10db78977f..6be5cbf7c5 100644 --- a/Sources/Foundation/NSLocale.swift +++ b/Sources/Foundation/NSLocale.swift @@ -8,7 +8,7 @@ // -@_implementationOnly import CoreFoundation +internal import CoreFoundation @_spi(SwiftCorelibsFoundation) @_exported import FoundationEssentials @_exported import FoundationInternationalization diff --git a/Sources/Foundation/NSLock.swift b/Sources/Foundation/NSLock.swift index fe1d08b775..6377c1bdd4 100644 --- a/Sources/Foundation/NSLock.swift +++ b/Sources/Foundation/NSLock.swift @@ -7,7 +7,7 @@ // See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors // -@_implementationOnly import CoreFoundation +internal import CoreFoundation #if canImport(Glibc) import Glibc diff --git a/Sources/Foundation/NSLog.swift b/Sources/Foundation/NSLog.swift index ede48862b9..5cbf5947fc 100644 --- a/Sources/Foundation/NSLog.swift +++ b/Sources/Foundation/NSLog.swift @@ -7,7 +7,7 @@ // See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors // -@_implementationOnly import CoreFoundation +internal import CoreFoundation /* Output from NSLogv is serialized, in that only one thread in a process can be doing * the writing/logging described above at a time. All attempts at writing/logging a diff --git a/Sources/Foundation/NSNumber.swift b/Sources/Foundation/NSNumber.swift index d41a9670b5..60c894e0a7 100644 --- a/Sources/Foundation/NSNumber.swift +++ b/Sources/Foundation/NSNumber.swift @@ -8,7 +8,7 @@ // -@_implementationOnly import CoreFoundation +internal import CoreFoundation @_spi(SwiftCorelibsFoundation) @_exported import FoundationEssentials internal let kCFNumberSInt8Type = CFNumberType.sInt8Type diff --git a/Sources/Foundation/NSObjCRuntime.swift b/Sources/Foundation/NSObjCRuntime.swift index 95d939b83f..3aeed18101 100644 --- a/Sources/Foundation/NSObjCRuntime.swift +++ b/Sources/Foundation/NSObjCRuntime.swift @@ -8,7 +8,7 @@ // -@_implementationOnly import CoreFoundation +internal import CoreFoundation internal let kCFCompareLessThan = CFComparisonResult.compareLessThan internal let kCFCompareEqualTo = CFComparisonResult.compareEqualTo diff --git a/Sources/Foundation/NSObject.swift b/Sources/Foundation/NSObject.swift index c7856bf655..c6d9bb42e0 100644 --- a/Sources/Foundation/NSObject.swift +++ b/Sources/Foundation/NSObject.swift @@ -14,7 +14,7 @@ @_exported import Dispatch #endif -@_implementationOnly import CoreFoundation +internal import CoreFoundation /// The `NSObjectProtocol` groups methods that are fundamental to all Foundation objects. /// diff --git a/Sources/Foundation/NSPathUtilities.swift b/Sources/Foundation/NSPathUtilities.swift index 8043ef00c0..0d47cc74c2 100644 --- a/Sources/Foundation/NSPathUtilities.swift +++ b/Sources/Foundation/NSPathUtilities.swift @@ -7,7 +7,7 @@ // See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors // -@_implementationOnly import CoreFoundation +internal import CoreFoundation #if os(Windows) import WinSDK #elseif os(WASI) diff --git a/Sources/Foundation/NSRange.swift b/Sources/Foundation/NSRange.swift index 1d5c85a045..06a3637ea9 100644 --- a/Sources/Foundation/NSRange.swift +++ b/Sources/Foundation/NSRange.swift @@ -9,7 +9,7 @@ #if DEPLOYMENT_RUNTIME_SWIFT -@_implementationOnly import CoreFoundation +internal import CoreFoundation public struct _NSRange : Sendable { public var location: Int diff --git a/Sources/Foundation/NSRegularExpression.swift b/Sources/Foundation/NSRegularExpression.swift index 3647f54dd9..65d85803a2 100644 --- a/Sources/Foundation/NSRegularExpression.swift +++ b/Sources/Foundation/NSRegularExpression.swift @@ -10,7 +10,7 @@ /* NSRegularExpression is a class used to represent and apply regular expressions. An instance of this class is an immutable representation of a compiled regular expression pattern and various option flags. */ -@_implementationOnly import CoreFoundation +internal import CoreFoundation extension NSRegularExpression { public struct Options : OptionSet, Sendable { diff --git a/Sources/Foundation/NSSet.swift b/Sources/Foundation/NSSet.swift index 273d79c43e..810cb15433 100644 --- a/Sources/Foundation/NSSet.swift +++ b/Sources/Foundation/NSSet.swift @@ -8,7 +8,7 @@ // -@_implementationOnly import CoreFoundation +internal import CoreFoundation @available(*, unavailable) extension NSSet : @unchecked Sendable { } diff --git a/Sources/Foundation/NSSortDescriptor.swift b/Sources/Foundation/NSSortDescriptor.swift index 2fa688c189..c4860cfcbc 100644 --- a/Sources/Foundation/NSSortDescriptor.swift +++ b/Sources/Foundation/NSSortDescriptor.swift @@ -7,7 +7,7 @@ // See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors // -@_implementationOnly import CoreFoundation +internal import CoreFoundation @available(*, unavailable) extension NSSortDescriptor : @unchecked Sendable { } diff --git a/Sources/Foundation/NSString.swift b/Sources/Foundation/NSString.swift index 79ec002d5b..e917c52271 100644 --- a/Sources/Foundation/NSString.swift +++ b/Sources/Foundation/NSString.swift @@ -8,7 +8,7 @@ // -@_implementationOnly import CoreFoundation +internal import CoreFoundation internal import Synchronization public typealias unichar = UInt16 diff --git a/Sources/Foundation/NSSwiftRuntime.swift b/Sources/Foundation/NSSwiftRuntime.swift index 03176c17cf..1cff7039da 100644 --- a/Sources/Foundation/NSSwiftRuntime.swift +++ b/Sources/Foundation/NSSwiftRuntime.swift @@ -8,7 +8,7 @@ // -@_implementationOnly import CoreFoundation +internal import CoreFoundation internal import Synchronization // Re-export Darwin and Glibc by importing Foundation diff --git a/Sources/Foundation/NSTextCheckingResult.swift b/Sources/Foundation/NSTextCheckingResult.swift index 12af725525..a3be634412 100644 --- a/Sources/Foundation/NSTextCheckingResult.swift +++ b/Sources/Foundation/NSTextCheckingResult.swift @@ -7,7 +7,7 @@ // See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors // -@_implementationOnly import CoreFoundation +internal import CoreFoundation /* NSTextCheckingType in this project is limited to regular expressions. */ extension NSTextCheckingResult { diff --git a/Sources/Foundation/NSTimeZone.swift b/Sources/Foundation/NSTimeZone.swift index 7555663644..e56173955b 100644 --- a/Sources/Foundation/NSTimeZone.swift +++ b/Sources/Foundation/NSTimeZone.swift @@ -7,7 +7,7 @@ // See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors // -@_implementationOnly import CoreFoundation +internal import CoreFoundation @_spi(SwiftCorelibsFoundation) @_exported import FoundationEssentials @available(*, unavailable) diff --git a/Sources/Foundation/NSURL.swift b/Sources/Foundation/NSURL.swift index 6af73f16ea..333848b139 100644 --- a/Sources/Foundation/NSURL.swift +++ b/Sources/Foundation/NSURL.swift @@ -8,7 +8,7 @@ // -@_implementationOnly import CoreFoundation +internal import CoreFoundation #if os(Windows) import WinSDK #endif diff --git a/Sources/Foundation/NSURLComponents.swift b/Sources/Foundation/NSURLComponents.swift index a39cada368..23546ec17a 100644 --- a/Sources/Foundation/NSURLComponents.swift +++ b/Sources/Foundation/NSURLComponents.swift @@ -7,7 +7,7 @@ // See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors // -@_implementationOnly import CoreFoundation +internal import CoreFoundation @available(*, unavailable) extension NSURLComponents : @unchecked Sendable { } diff --git a/Sources/Foundation/NSUUID.swift b/Sources/Foundation/NSUUID.swift index 20509fe130..449e239b7f 100644 --- a/Sources/Foundation/NSUUID.swift +++ b/Sources/Foundation/NSUUID.swift @@ -8,7 +8,7 @@ // -@_implementationOnly import CoreFoundation +internal import CoreFoundation open class NSUUID : NSObject, NSCopying, NSSecureCoding, NSCoding, @unchecked Sendable { internal var buffer = UnsafeMutablePointer.allocate(capacity: 16) diff --git a/Sources/Foundation/NotificationQueue.swift b/Sources/Foundation/NotificationQueue.swift index 830f1a945f..854a30a77e 100644 --- a/Sources/Foundation/NotificationQueue.swift +++ b/Sources/Foundation/NotificationQueue.swift @@ -8,7 +8,7 @@ // #if canImport(Dispatch) -@_implementationOnly import CoreFoundation +internal import CoreFoundation extension NotificationQueue { diff --git a/Sources/Foundation/NumberFormatter.swift b/Sources/Foundation/NumberFormatter.swift index 39effe97b3..f70447e0b3 100644 --- a/Sources/Foundation/NumberFormatter.swift +++ b/Sources/Foundation/NumberFormatter.swift @@ -7,7 +7,7 @@ // See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors // -@_implementationOnly import CoreFoundation +internal import CoreFoundation internal import Synchronization extension NumberFormatter { diff --git a/Sources/Foundation/Port.swift b/Sources/Foundation/Port.swift index c4ed8282bf..a79b06f22a 100644 --- a/Sources/Foundation/Port.swift +++ b/Sources/Foundation/Port.swift @@ -7,7 +7,7 @@ // See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors // -@_implementationOnly import CoreFoundation +internal import CoreFoundation internal import Synchronization // MARK: Port and related types diff --git a/Sources/Foundation/Process.swift b/Sources/Foundation/Process.swift index 758dd1dfd4..33e36cbdab 100644 --- a/Sources/Foundation/Process.swift +++ b/Sources/Foundation/Process.swift @@ -8,7 +8,7 @@ // #if canImport(Dispatch) -@_implementationOnly import CoreFoundation +internal import CoreFoundation #if os(Windows) import WinSDK import let WinSDK.HANDLE_FLAG_INHERIT diff --git a/Sources/Foundation/ProcessInfo.swift b/Sources/Foundation/ProcessInfo.swift index f023ff6291..608942c2cc 100644 --- a/Sources/Foundation/ProcessInfo.swift +++ b/Sources/Foundation/ProcessInfo.swift @@ -7,7 +7,7 @@ // See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors // -@_implementationOnly import CoreFoundation +internal import CoreFoundation // SPI for TestFoundation internal extension ProcessInfo { diff --git a/Sources/Foundation/PropertyListSerialization.swift b/Sources/Foundation/PropertyListSerialization.swift index 5c56c9b3ec..b442ef653c 100644 --- a/Sources/Foundation/PropertyListSerialization.swift +++ b/Sources/Foundation/PropertyListSerialization.swift @@ -7,7 +7,7 @@ // See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors // -@_implementationOnly import CoreFoundation +internal import CoreFoundation let kCFPropertyListOpenStepFormat = CFPropertyListFormat.openStepFormat let kCFPropertyListXMLFormat_v1_0 = CFPropertyListFormat.xmlFormat_v1_0 diff --git a/Sources/Foundation/RunLoop.swift b/Sources/Foundation/RunLoop.swift index a03dab976d..011a4a0c25 100644 --- a/Sources/Foundation/RunLoop.swift +++ b/Sources/Foundation/RunLoop.swift @@ -7,7 +7,7 @@ // See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors // -@_implementationOnly import CoreFoundation +internal import CoreFoundation internal let kCFRunLoopEntry = CFRunLoopActivity.entry.rawValue internal let kCFRunLoopBeforeTimers = CFRunLoopActivity.beforeTimers.rawValue diff --git a/Sources/Foundation/Set.swift b/Sources/Foundation/Set.swift index 2a636eaa91..b31c808175 100644 --- a/Sources/Foundation/Set.swift +++ b/Sources/Foundation/Set.swift @@ -7,7 +7,7 @@ // See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors // -@_implementationOnly import CoreFoundation +internal import CoreFoundation extension Set : _ObjectiveCBridgeable { public typealias _ObjectType = NSSet diff --git a/Sources/Foundation/Stream.swift b/Sources/Foundation/Stream.swift index ab19ce2997..a8a2748c68 100644 --- a/Sources/Foundation/Stream.swift +++ b/Sources/Foundation/Stream.swift @@ -7,7 +7,7 @@ // See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors // -@_implementationOnly import CoreFoundation +internal import CoreFoundation internal extension UInt { init(_ status: CFStreamStatus) { diff --git a/Sources/Foundation/String.swift b/Sources/Foundation/String.swift index e1f606e4d7..276d26410d 100644 --- a/Sources/Foundation/String.swift +++ b/Sources/Foundation/String.swift @@ -10,7 +10,7 @@ // //===----------------------------------------------------------------------===// -@_implementationOnly import CoreFoundation +internal import CoreFoundation extension String: _ObjectiveCBridgeable { diff --git a/Sources/Foundation/Thread.swift b/Sources/Foundation/Thread.swift index 5e79579c62..003d7940db 100644 --- a/Sources/Foundation/Thread.swift +++ b/Sources/Foundation/Thread.swift @@ -8,7 +8,7 @@ // #if canImport(Dispatch) -@_implementationOnly import CoreFoundation +internal import CoreFoundation #if os(Windows) import WinSDK #endif diff --git a/Sources/Foundation/Timer.swift b/Sources/Foundation/Timer.swift index 0d57425553..6185a628d4 100644 --- a/Sources/Foundation/Timer.swift +++ b/Sources/Foundation/Timer.swift @@ -8,7 +8,7 @@ // -@_implementationOnly import CoreFoundation +internal import CoreFoundation internal func __NSFireTimer(_ timer: CFRunLoopTimer?, info: UnsafeMutableRawPointer?) -> Void { let t: Timer = NSObject.unretainedReference(info!) diff --git a/Sources/Foundation/UserDefaults.swift b/Sources/Foundation/UserDefaults.swift index 6db0331ee4..c260d57d65 100644 --- a/Sources/Foundation/UserDefaults.swift +++ b/Sources/Foundation/UserDefaults.swift @@ -7,7 +7,7 @@ // See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors // -@_implementationOnly import CoreFoundation +internal import CoreFoundation internal import Synchronization private let registeredDefaults = Mutex<[String: (Any & Sendable)]>([:]) diff --git a/Sources/FoundationNetworking/URLSession/BodySource.swift b/Sources/FoundationNetworking/URLSession/BodySource.swift index df2862b2f7..a0082c0e92 100644 --- a/Sources/FoundationNetworking/URLSession/BodySource.swift +++ b/Sources/FoundationNetworking/URLSession/BodySource.swift @@ -22,7 +22,7 @@ import SwiftFoundation import Foundation #endif -@_implementationOnly import _CFURLSessionInterface +internal import _CFURLSessionInterface import Dispatch diff --git a/Sources/FoundationNetworking/URLSession/HTTP/HTTPURLProtocol.swift b/Sources/FoundationNetworking/URLSession/HTTP/HTTPURLProtocol.swift index 90a196114e..1eb3d02f57 100644 --- a/Sources/FoundationNetworking/URLSession/HTTP/HTTPURLProtocol.swift +++ b/Sources/FoundationNetworking/URLSession/HTTP/HTTPURLProtocol.swift @@ -13,7 +13,7 @@ import SwiftFoundation import Foundation #endif -@_implementationOnly import _CFURLSessionInterface +internal import _CFURLSessionInterface import Dispatch internal class _HTTPURLProtocol: _NativeProtocol { diff --git a/Sources/FoundationNetworking/URLSession/WebSocket/WebSocketURLProtocol.swift b/Sources/FoundationNetworking/URLSession/WebSocket/WebSocketURLProtocol.swift index 40a012905d..8ffd947806 100644 --- a/Sources/FoundationNetworking/URLSession/WebSocket/WebSocketURLProtocol.swift +++ b/Sources/FoundationNetworking/URLSession/WebSocket/WebSocketURLProtocol.swift @@ -13,7 +13,7 @@ import SwiftFoundation import Foundation #endif -@_implementationOnly import _CFURLSessionInterface +internal import _CFURLSessionInterface import Dispatch internal class _WebSocketURLProtocol: _HTTPURLProtocol { diff --git a/Sources/FoundationNetworking/URLSession/libcurl/EasyHandle.swift b/Sources/FoundationNetworking/URLSession/libcurl/EasyHandle.swift index 8c4437cac1..372efe507a 100644 --- a/Sources/FoundationNetworking/URLSession/libcurl/EasyHandle.swift +++ b/Sources/FoundationNetworking/URLSession/libcurl/EasyHandle.swift @@ -23,7 +23,7 @@ import SwiftFoundation import Foundation #endif -@_implementationOnly import _CFURLSessionInterface +internal import _CFURLSessionInterface import Dispatch // These helper functions avoid warnings about "will never be executed" code which checks the availability of the underlying libcurl features. diff --git a/Sources/FoundationNetworking/URLSession/libcurl/MultiHandle.swift b/Sources/FoundationNetworking/URLSession/libcurl/MultiHandle.swift index 67f77f4b57..7168f4c296 100644 --- a/Sources/FoundationNetworking/URLSession/libcurl/MultiHandle.swift +++ b/Sources/FoundationNetworking/URLSession/libcurl/MultiHandle.swift @@ -22,7 +22,7 @@ import SwiftFoundation import Foundation #endif -@_implementationOnly import _CFURLSessionInterface +internal import _CFURLSessionInterface import Dispatch diff --git a/Sources/FoundationNetworking/URLSession/libcurl/libcurlHelpers.swift b/Sources/FoundationNetworking/URLSession/libcurl/libcurlHelpers.swift index 291c897052..221b755b10 100644 --- a/Sources/FoundationNetworking/URLSession/libcurl/libcurlHelpers.swift +++ b/Sources/FoundationNetworking/URLSession/libcurl/libcurlHelpers.swift @@ -17,7 +17,7 @@ // ----------------------------------------------------------------------------- -@_implementationOnly import _CFURLSessionInterface +internal import _CFURLSessionInterface //TODO: Move things in this file? diff --git a/Sources/FoundationXML/XMLDTD.swift b/Sources/FoundationXML/XMLDTD.swift index 089c1a088b..bfff5ae34f 100644 --- a/Sources/FoundationXML/XMLDTD.swift +++ b/Sources/FoundationXML/XMLDTD.swift @@ -12,7 +12,7 @@ import SwiftFoundation #else import Foundation #endif -@_implementationOnly import _CFXMLInterface +internal import _CFXMLInterface /*! @class XMLDTD diff --git a/Sources/FoundationXML/XMLDTDNode.swift b/Sources/FoundationXML/XMLDTDNode.swift index 421d83793d..607e08a7bc 100644 --- a/Sources/FoundationXML/XMLDTDNode.swift +++ b/Sources/FoundationXML/XMLDTDNode.swift @@ -12,7 +12,7 @@ import SwiftFoundation #else import Foundation #endif -@_implementationOnly import _CFXMLInterface +internal import _CFXMLInterface /*! @typedef XMLDTDNodeKind diff --git a/Sources/FoundationXML/XMLDocument.swift b/Sources/FoundationXML/XMLDocument.swift index d5b94ff64d..510f428d12 100644 --- a/Sources/FoundationXML/XMLDocument.swift +++ b/Sources/FoundationXML/XMLDocument.swift @@ -12,7 +12,7 @@ import SwiftFoundation #else import Foundation #endif -@_implementationOnly import _CFXMLInterface +internal import _CFXMLInterface // Input options // NSXMLNodeOptionsNone diff --git a/Sources/FoundationXML/XMLElement.swift b/Sources/FoundationXML/XMLElement.swift index 9355e8a704..0ade886bc2 100644 --- a/Sources/FoundationXML/XMLElement.swift +++ b/Sources/FoundationXML/XMLElement.swift @@ -12,7 +12,7 @@ import SwiftFoundation #else import Foundation #endif -@_implementationOnly import _CFXMLInterface +internal import _CFXMLInterface /*! @class XMLElement diff --git a/Sources/FoundationXML/XMLNode.swift b/Sources/FoundationXML/XMLNode.swift index d2c83ffd36..862174a64b 100644 --- a/Sources/FoundationXML/XMLNode.swift +++ b/Sources/FoundationXML/XMLNode.swift @@ -13,7 +13,7 @@ import SwiftFoundation import _CFXMLInterface #else import Foundation -@_implementationOnly import _CFXMLInterface +internal import _CFXMLInterface #endif // initWithKind options diff --git a/Sources/FoundationXML/XMLParser.swift b/Sources/FoundationXML/XMLParser.swift index 62c94679ee..1ee017d8ea 100644 --- a/Sources/FoundationXML/XMLParser.swift +++ b/Sources/FoundationXML/XMLParser.swift @@ -12,7 +12,7 @@ import SwiftFoundation import _CFXMLInterface #else import Foundation -@_implementationOnly import _CFXMLInterface +internal import _CFXMLInterface #endif extension XMLParser { diff --git a/Sources/XCTest/Public/Asynchronous/XCTWaiter.swift b/Sources/XCTest/Public/Asynchronous/XCTWaiter.swift index b4f2f6f70f..bf824ef471 100644 --- a/Sources/XCTest/Public/Asynchronous/XCTWaiter.swift +++ b/Sources/XCTest/Public/Asynchronous/XCTWaiter.swift @@ -11,7 +11,7 @@ // #if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) -@_implementationOnly import CoreFoundation +internal import CoreFoundation #endif /// Events are reported to the waiter's delegate via these methods. XCTestCase conforms to this