Skip to content

Commit 1146591

Browse files
committed
Use delegateQueue to avoid reusing the TSCBasic.Process default queue
The manifest parser uses SourceControl.GitShellHelper synchronously, which would cause a hang if using the default queue for completions.
1 parent 3df766d commit 1146591

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Sources/PackageLoading/ManifestLoader.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -841,7 +841,7 @@ public final class ManifestLoader: ManifestLoaderProtocol {
841841
cmd += ["-o", compiledManifestFile.pathString]
842842

843843
// Compile the manifest.
844-
Process.popen(arguments: cmd, environment: toolchain.swiftCompilerEnvironment) { result in
844+
Process.popen(arguments: cmd, environment: toolchain.swiftCompilerEnvironment, queue: delegateQueue) { result in
845845
var cleanupIfError = DelayableAction(target: tmpDir, action: cleanupTmpDir)
846846
defer { cleanupIfError.perform() }
847847

@@ -899,7 +899,7 @@ public final class ManifestLoader: ManifestLoaderProtocol {
899899
#endif
900900

901901
let cleanupAfterRunning = cleanupIfError.delay()
902-
Process.popen(arguments: cmd, environment: environment) { result in
902+
Process.popen(arguments: cmd, environment: environment, queue: delegateQueue) { result in
903903
defer { cleanupAfterRunning.perform() }
904904
fclose(jsonOutputFileDesc)
905905

0 commit comments

Comments
 (0)