From 6da603f7edc91485cb2b6be20558ead3a3f883d6 Mon Sep 17 00:00:00 2001 From: Jonathan Flat Date: Wed, 16 Apr 2025 12:09:20 -0600 Subject: [PATCH] (149316573) Remove URL workaround for Linux crash once SCL-F is rebuilt --- Sources/FoundationEssentials/URL/URL.swift | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/Sources/FoundationEssentials/URL/URL.swift b/Sources/FoundationEssentials/URL/URL.swift index 8b6d8fa37..948322a4b 100644 --- a/Sources/FoundationEssentials/URL/URL.swift +++ b/Sources/FoundationEssentials/URL/URL.swift @@ -690,18 +690,6 @@ public struct URL: Equatable, Sendable, Hashable { /// /// Returns `nil` if a `URL` cannot be formed with the string (for example, if the string contains characters that are illegal in a URL, or is an empty string). public init?(string: __shared String, relativeTo url: __shared URL?) { - #if os(Linux) - // Workaround for a Linux-only crash where swift-corelibs-foundation's - // NSURL.baseURL.getter returns a value of 0x1 when bridging to URL. - // Crash doesn't occur when swift-corelibs-foundation is rebuilt with - // the new swift-foundation URL code, so this is temporary to get - // swift-foundation CI to pass. - if unsafeBitCast(url, to: (UnsafeRawPointer, UnsafeRawPointer).self) == (UnsafeRawPointer(bitPattern: 0x1), UnsafeRawPointer(bitPattern: 0x0)) { - guard let inner = URL._type.init(string: string, relativeTo: nil) else { return nil } - _url = inner.convertingFileReference() - return - } - #endif guard let inner = URL._type.init(string: string, relativeTo: url) else { return nil } _url = inner.convertingFileReference() }