mirror of
https://github.com/apple/sourcekit-lsp.git
synced 2026-03-02 18:23:24 +01:00
Mark all closures in the .stream outputRedirection of TSC as @Sendable
The closures aren’t guaranteed to be called on the same thread as the process was launched, which can cause assertion failure by the concurrency runtime. rdar://142813605
This commit is contained in:
@@ -655,8 +655,8 @@ package actor SwiftPMBuildSystem: BuiltInBuildSystem {
|
||||
arguments: arguments,
|
||||
workingDirectory: nil,
|
||||
outputRedirection: .stream(
|
||||
stdout: { stdoutHandler.handleDataFromPipe(Data($0)) },
|
||||
stderr: { stderrHandler.handleDataFromPipe(Data($0)) }
|
||||
stdout: { @Sendable bytes in stdoutHandler.handleDataFromPipe(Data(bytes)) },
|
||||
stderr: { @Sendable bytes in stderrHandler.handleDataFromPipe(Data(bytes)) }
|
||||
)
|
||||
)
|
||||
let exitStatus = result.exitStatus.exhaustivelySwitchable
|
||||
|
||||
Reference in New Issue
Block a user