mirror of
https://github.com/apple/sourcekit-lsp.git
synced 2026-03-02 18:23:24 +01:00
Remove a few @preconcurrency imports
rdar://132378792 is fixed
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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?
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user