diff --git a/Sources/FoundationEssentials/String/CMakeLists.txt b/Sources/FoundationEssentials/String/CMakeLists.txt index 6cc7994d7..fd165a701 100644 --- a/Sources/FoundationEssentials/String/CMakeLists.txt +++ b/Sources/FoundationEssentials/String/CMakeLists.txt @@ -17,6 +17,7 @@ target_sources(FoundationEssentials PRIVATE BuiltInUnicodeScalarSet.swift IANACharsetNames.swift RegexPatternCache.swift + Span+Path.swift String+Bridging.swift String+Comparison.swift String+Encoding.swift diff --git a/Sources/FoundationEssentials/URL/CMakeLists.txt b/Sources/FoundationEssentials/URL/CMakeLists.txt index 172ff762b..79ada5af5 100644 --- a/Sources/FoundationEssentials/URL/CMakeLists.txt +++ b/Sources/FoundationEssentials/URL/CMakeLists.txt @@ -15,10 +15,17 @@ target_sources(FoundationEssentials PRIVATE URL.swift URL_Bridge.swift + URL_File.swift + URL_Impl.swift + URL_Info.swift + URL_Parsing.swift URL_Protocol.swift + URL_Resolution.swift URL_Swift.swift + URL_Validation.swift URLComponents.swift URLComponents_ObjC.swift + URLEncoder.swift URLParser.swift URLTemplate_Expression.swift URLTemplate_PercentEncoding.swift diff --git a/Sources/FoundationEssentials/URL/URL.swift b/Sources/FoundationEssentials/URL/URL.swift index 2034e699c..6d8e6268f 100644 --- a/Sources/FoundationEssentials/URL/URL.swift +++ b/Sources/FoundationEssentials/URL/URL.swift @@ -620,13 +620,7 @@ internal func foundation_swift_url_v2_enabled() -> Bool { } #else internal func foundation_swift_url_enabled() -> Bool { return true } -internal func foundation_swift_url_v2_enabled() -> Bool { - #if FOUNDATION_SWIFT_URL_V2 - return true - #else - return false - #endif -} +internal func foundation_swift_url_v2_enabled() -> Bool { return true } #endif #if canImport(os) @@ -662,12 +656,7 @@ public struct URL: Equatable, Sendable, Hashable { } } #else - #if FOUNDATION_SWIFT_URL_V2 internal typealias _Impl = _URL - #else - internal typealias _Impl = _SwiftURL - #endif - private static let _type = _Impl.self #endif @@ -1354,7 +1343,7 @@ public struct URL: Equatable, Sendable, Hashable { #endif // FOUNDATION_FRAMEWORK -#if FOUNDATION_FRAMEWORK || !FOUNDATION_SWIFT_URL_V2 +#if FOUNDATION_FRAMEWORK internal var _swiftURL: _SwiftURL? { #if FOUNDATION_FRAMEWORK if let swift = _url as? _SwiftURL { return swift } diff --git a/Sources/FoundationEssentials/URL/URL_Impl.swift b/Sources/FoundationEssentials/URL/URL_Impl.swift index 1aab8a49b..69fadf5a4 100644 --- a/Sources/FoundationEssentials/URL/URL_Impl.swift +++ b/Sources/FoundationEssentials/URL/URL_Impl.swift @@ -10,8 +10,6 @@ // //===----------------------------------------------------------------------===// -#if FOUNDATION_FRAMEWORK || FOUNDATION_SWIFT_URL_V2 - #if canImport(Darwin) import Darwin #elseif canImport(Android) @@ -1489,4 +1487,3 @@ extension _URL { } #endif // FOUNDATION_FRAMEWORK -#endif // FOUNDATION_FRAMEWORK || FOUNDATION_SWIFT_URL_V2 diff --git a/Sources/FoundationEssentials/URL/URL_Swift.swift b/Sources/FoundationEssentials/URL/URL_Swift.swift index f5723aedc..1385228f4 100644 --- a/Sources/FoundationEssentials/URL/URL_Swift.swift +++ b/Sources/FoundationEssentials/URL/URL_Swift.swift @@ -10,30 +10,12 @@ // //===----------------------------------------------------------------------===// -#if FOUNDATION_FRAMEWORK || !FOUNDATION_SWIFT_URL_V2 - -#if canImport(Darwin) -import Darwin -#elseif canImport(Android) -@preconcurrency import Android -#elseif canImport(Glibc) -@preconcurrency import Glibc -#elseif canImport(Musl) -@preconcurrency import Musl -#elseif os(Windows) -import WinSDK -#elseif os(WASI) -@preconcurrency import WASILibc -#endif +#if FOUNDATION_FRAMEWORK #if canImport(os) internal import os #endif - -#if FOUNDATION_FRAMEWORK internal import _ForSwiftFoundation -#endif - internal import Synchronization /// `_SwiftURL` provides the new Swift implementation for `URL`, using the same parser @@ -1087,7 +1069,6 @@ private extension String { } } -#if FOUNDATION_FRAMEWORK internal import CoreFoundation_Private.CFURL /// This conformance is only needed in `FOUNDATION_FRAMEWORK`, @@ -1344,4 +1325,3 @@ extension _SwiftURL { } } #endif // FOUNDATION_FRAMEWORK -#endif // FOUNDATION_FRAMEWORK || !FOUNDATION_SWIFT_URL_V2