Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Sources/FoundationEssentials/String/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 7 additions & 0 deletions Sources/FoundationEssentials/URL/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
15 changes: 2 additions & 13 deletions Sources/FoundationEssentials/URL/URL.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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 }
Expand Down
3 changes: 0 additions & 3 deletions Sources/FoundationEssentials/URL/URL_Impl.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
//
//===----------------------------------------------------------------------===//

#if FOUNDATION_FRAMEWORK || FOUNDATION_SWIFT_URL_V2

#if canImport(Darwin)
import Darwin
#elseif canImport(Android)
Expand Down Expand Up @@ -1489,4 +1487,3 @@ extension _URL {
}

#endif // FOUNDATION_FRAMEWORK
#endif // FOUNDATION_FRAMEWORK || FOUNDATION_SWIFT_URL_V2
22 changes: 1 addition & 21 deletions Sources/FoundationEssentials/URL/URL_Swift.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -1087,7 +1069,6 @@ private extension String {
}
}

#if FOUNDATION_FRAMEWORK
internal import CoreFoundation_Private.CFURL

/// This conformance is only needed in `FOUNDATION_FRAMEWORK`,
Expand Down Expand Up @@ -1344,4 +1325,3 @@ extension _SwiftURL {
}
}
#endif // FOUNDATION_FRAMEWORK
#endif // FOUNDATION_FRAMEWORK || !FOUNDATION_SWIFT_URL_V2
Loading