Remove a few @preconcurrency imports

rdar://132378792 is fixed
This commit is contained in:
Alex Hoppen
2024-07-31 16:03:06 -07:00
parent 5c2055d54e
commit 970b44d255
8 changed files with 6 additions and 46 deletions

View File

@@ -11,6 +11,7 @@
//===----------------------------------------------------------------------===//
import BuildServerProtocol
import Foundation
import LanguageServerProtocol
import LanguageServerProtocolJSONRPC
import SKLogging
@@ -26,13 +27,6 @@ import var TSCBasic.localFileSystem
import func TSCBasic.lookupExecutablePath
import func TSCBasic.resolveSymlinks
#if canImport(Darwin)
import Foundation
#else
// FIMXE: (async-workaround) @preconcurrency needed because Pipe is not marked as Sendable on Linux rdar://132378792
@preconcurrency import Foundation
#endif
enum BuildServerTestError: Error {
case executableNotFound(String)
}

View File

@@ -15,8 +15,7 @@ import SwiftExtensions
#if canImport(Darwin)
import Foundation
#else
// FIMXE: (async-workaround) @preconcurrency needed because DateFormatter and stderr are not marked as Sendable on Linux
// rdar://125578486, rdar://132378589
// TODO: @preconcurrency needed because stderr is not sendable on Linux https://github.com/swiftlang/swift/issues/75601
@preconcurrency import Foundation
#endif

View File

@@ -15,8 +15,7 @@ import RegexBuilder
#if canImport(Darwin)
import Foundation
#else
// FIMXE: (async-workaround) @preconcurrency needed because DateFormatter and stderr are not marked as Sendable on Linux
// rdar://125578486, rdar://132378589
// TODO: @preconcurrency needed because stderr is not sendable on Linux https://github.com/swiftlang/swift/issues/75601
@preconcurrency import Foundation
#endif

View File

@@ -17,12 +17,7 @@ import SKSupport
import SwiftExtensions
import XCTest
#if canImport(Darwin)
import class Foundation.Pipe
#else
// FIMXE: (async-workaround) @preconcurrency needed because Pipe is not marked as Sendable on Linux rdar://132378792
@preconcurrency import class Foundation.Pipe
#endif
package final class TestJSONRPCConnection: Sendable {
package let clientToServer: Pipe = Pipe()

View File

@@ -11,6 +11,7 @@
//===----------------------------------------------------------------------===//
import BuildSystemIntegration
import Foundation
import LanguageServerProtocol
import LanguageServerProtocolJSONRPC
import SKLogging
@@ -22,21 +23,10 @@ import ToolchainRegistry
import struct TSCBasic.AbsolutePath
#if canImport(Darwin)
import Foundation
#else
// FIMXE: (async-workaround) @preconcurrency needed because Pipe is not marked as Sendable on Linux
@preconcurrency import Foundation
#endif
#if os(Windows)
import WinSDK
#endif
#if !canImport(Darwin)
extension Process: @unchecked Sendable {}
#endif
/// A thin wrapper over a connection to a clangd server providing build setting handling.
///
/// In addition, it also intercepts notifications and replies from clangd in order to do things

View File

@@ -15,6 +15,7 @@ import BuildSystemIntegration
import Csourcekitd // Not needed here, but fixes debugging...
import Diagnose
import Dispatch
import Foundation
import LanguageServerProtocol
import LanguageServerProtocolJSONRPC
import SKLogging
@@ -28,13 +29,6 @@ import struct TSCBasic.AbsolutePath
import struct TSCBasic.RelativePath
import var TSCBasic.localFileSystem
#if canImport(Darwin)
import Foundation
#else
// FIMXE: (async-workaround) @preconcurrency needed because FileHandle is not marked as Sendable on Linux rdar://132378985
@preconcurrency import Foundation
#endif
extension AbsolutePath {
public init?(argument: String) {
let path: AbsolutePath?

View File

@@ -12,19 +12,13 @@
import BuildServerProtocol
import BuildSystemIntegration
import Foundation
import ISDBTestSupport
import LanguageServerProtocol
import SKTestSupport
import TSCBasic
import XCTest
#if canImport(Darwin)
import Foundation
#else
// FIMXE: (async-workaround) @preconcurrency needed because Pipe is not marked as Sendable on Linux rdar://132378792
@preconcurrency import Foundation
#endif
/// The path to the INPUTS directory of shared test projects.
private let skTestSupportInputsDirectory: URL = {
#if os(macOS)

View File

@@ -15,12 +15,7 @@ import LanguageServerProtocol
import SKTestSupport
import XCTest
#if canImport(Darwin)
import class Foundation.Pipe
#else
// FIMXE: (async-workaround) @preconcurrency needed because Pipe is not marked as Sendable on Linux rdar://132378792
@preconcurrency import class Foundation.Pipe
#endif
#if os(Windows)
import WinSDK