Skip to content

Commit 970b44d

Browse files
committed
Remove a few @preconcurrency imports
rdar://132378792 is fixed
1 parent 5c2055d commit 970b44d

File tree

8 files changed

+6
-46
lines changed

8 files changed

+6
-46
lines changed

Sources/BuildSystemIntegration/BuildServerBuildSystem.swift

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
//===----------------------------------------------------------------------===//
1212

1313
import BuildServerProtocol
14+
import Foundation
1415
import LanguageServerProtocol
1516
import LanguageServerProtocolJSONRPC
1617
import SKLogging
@@ -26,13 +27,6 @@ import var TSCBasic.localFileSystem
2627
import func TSCBasic.lookupExecutablePath
2728
import func TSCBasic.resolveSymlinks
2829

29-
#if canImport(Darwin)
30-
import Foundation
31-
#else
32-
// FIMXE: (async-workaround) @preconcurrency needed because Pipe is not marked as Sendable on Linux rdar://132378792
33-
@preconcurrency import Foundation
34-
#endif
35-
3630
enum BuildServerTestError: Error {
3731
case executableNotFound(String)
3832
}

Sources/SKLogging/NonDarwinLogging.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ import SwiftExtensions
1515
#if canImport(Darwin)
1616
import Foundation
1717
#else
18-
// FIMXE: (async-workaround) @preconcurrency needed because DateFormatter and stderr are not marked as Sendable on Linux
19-
// rdar://125578486, rdar://132378589
18+
// TODO: @preconcurrency needed because stderr is not sendable on Linux https://github.com/swiftlang/swift/issues/75601
2019
@preconcurrency import Foundation
2120
#endif
2221

Sources/SKLogging/SetGlobalLogFileHandler.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ import RegexBuilder
1515
#if canImport(Darwin)
1616
import Foundation
1717
#else
18-
// FIMXE: (async-workaround) @preconcurrency needed because DateFormatter and stderr are not marked as Sendable on Linux
19-
// rdar://125578486, rdar://132378589
18+
// TODO: @preconcurrency needed because stderr is not sendable on Linux https://github.com/swiftlang/swift/issues/75601
2019
@preconcurrency import Foundation
2120
#endif
2221

Sources/SKTestSupport/TestJSONRPCConnection.swift

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,7 @@ import SKSupport
1717
import SwiftExtensions
1818
import XCTest
1919

20-
#if canImport(Darwin)
2120
import class Foundation.Pipe
22-
#else
23-
// FIMXE: (async-workaround) @preconcurrency needed because Pipe is not marked as Sendable on Linux rdar://132378792
24-
@preconcurrency import class Foundation.Pipe
25-
#endif
2621

2722
package final class TestJSONRPCConnection: Sendable {
2823
package let clientToServer: Pipe = Pipe()

Sources/SourceKitLSP/Clang/ClangLanguageService.swift

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
//===----------------------------------------------------------------------===//
1212

1313
import BuildSystemIntegration
14+
import Foundation
1415
import LanguageServerProtocol
1516
import LanguageServerProtocolJSONRPC
1617
import SKLogging
@@ -22,21 +23,10 @@ import ToolchainRegistry
2223

2324
import struct TSCBasic.AbsolutePath
2425

25-
#if canImport(Darwin)
26-
import Foundation
27-
#else
28-
// FIMXE: (async-workaround) @preconcurrency needed because Pipe is not marked as Sendable on Linux
29-
@preconcurrency import Foundation
30-
#endif
31-
3226
#if os(Windows)
3327
import WinSDK
3428
#endif
3529

36-
#if !canImport(Darwin)
37-
extension Process: @unchecked Sendable {}
38-
#endif
39-
4030
/// A thin wrapper over a connection to a clangd server providing build setting handling.
4131
///
4232
/// In addition, it also intercepts notifications and replies from clangd in order to do things

Sources/sourcekit-lsp/SourceKitLSP.swift

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import BuildSystemIntegration
1515
import Csourcekitd // Not needed here, but fixes debugging...
1616
import Diagnose
1717
import Dispatch
18+
import Foundation
1819
import LanguageServerProtocol
1920
import LanguageServerProtocolJSONRPC
2021
import SKLogging
@@ -28,13 +29,6 @@ import struct TSCBasic.AbsolutePath
2829
import struct TSCBasic.RelativePath
2930
import var TSCBasic.localFileSystem
3031

31-
#if canImport(Darwin)
32-
import Foundation
33-
#else
34-
// FIMXE: (async-workaround) @preconcurrency needed because FileHandle is not marked as Sendable on Linux rdar://132378985
35-
@preconcurrency import Foundation
36-
#endif
37-
3832
extension AbsolutePath {
3933
public init?(argument: String) {
4034
let path: AbsolutePath?

Tests/BuildSystemIntegrationTests/BuildServerBuildSystemTests.swift

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,13 @@
1212

1313
import BuildServerProtocol
1414
import BuildSystemIntegration
15+
import Foundation
1516
import ISDBTestSupport
1617
import LanguageServerProtocol
1718
import SKTestSupport
1819
import TSCBasic
1920
import XCTest
2021

21-
#if canImport(Darwin)
22-
import Foundation
23-
#else
24-
// FIMXE: (async-workaround) @preconcurrency needed because Pipe is not marked as Sendable on Linux rdar://132378792
25-
@preconcurrency import Foundation
26-
#endif
27-
2822
/// The path to the INPUTS directory of shared test projects.
2923
private let skTestSupportInputsDirectory: URL = {
3024
#if os(macOS)

Tests/LanguageServerProtocolJSONRPCTests/ConnectionTests.swift

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,7 @@ import LanguageServerProtocol
1515
import SKTestSupport
1616
import XCTest
1717

18-
#if canImport(Darwin)
1918
import class Foundation.Pipe
20-
#else
21-
// FIMXE: (async-workaround) @preconcurrency needed because Pipe is not marked as Sendable on Linux rdar://132378792
22-
@preconcurrency import class Foundation.Pipe
23-
#endif
2419

2520
#if os(Windows)
2621
import WinSDK

0 commit comments

Comments
 (0)