Skip to content

Fix Subprocess.run API updates#775

Open
marcprux wants to merge 3 commits into
swiftlang:mainfrom
marcprux:subprocess-api
Open

Fix Subprocess.run API updates#775
marcprux wants to merge 3 commits into
swiftlang:mainfrom
marcprux:subprocess-api

Conversation

@marcprux
Copy link
Copy Markdown
Contributor

Fixes the API breakage introduced in swift-subprocess 0.5 by swiftlang/swift-subprocess#233.

@marcprux marcprux requested a review from ktoso as a code owner May 30, 2026 16:36
@marcprux
Copy link
Copy Markdown
Contributor Author

It looks like we'll also need to drop the jammy swift:6.1.3 jdk:corretto CI matrix element due to swift-subprocess dropping support for Swift 6.1 (swiftlang/swift-subprocess#231), since the CI is failing:

Computing version for https://github.com/swiftlang/swift-subprocess.git
error: Dependencies could not be resolved because root depends on 'swift-subprocess' 0.5.0..<1.0.0.
'swift-subprocess' >= 0.5.0 cannot be used because no versions of 'swift-subprocess' match the requirement 0.5.1..<1.0.0 and 'swift-subprocess' 0.5.0 contains incompatible tools version (6.2.0).

I'm guessing this won't be an issue since we document Swift 6.2 as being the minimum required version in the README anyway.

@marcprux
Copy link
Copy Markdown
Contributor Author

This is causing the swift-android-examples to fail to build with the errors:

/Users/runner/work/swift-android-examples/swift-android-examples/hello-swift-java/hashing-lib/.build/checkouts/swift-java/Sources/SwiftJavaTool/Commands/JavaCallbacksBuildCommand.swift:272:14: error: type 'OutputProtocol' has no member 'standardOutput'
270 |     arguments: .init(arguments),
271 |     environment: environment,
272 |     output: .standardOutput,
    |              `- error: type 'OutputProtocol' has no member 'standardOutput'
273 |     error: .standardError,
274 |   )

/Users/runner/work/swift-android-examples/swift-android-examples/hello-swift-java/hashing-lib/.build/checkouts/swift-java/Sources/SwiftJavaTool/Commands/JavaCallbacksBuildCommand.swift:273:13: error: type 'ErrorOutputProtocol' has no member 'standardError'
271 |     environment: environment,
272 |     output: .standardOutput,
273 |     error: .standardError,
    |             `- error: type 'ErrorOutputProtocol' has no member 'standardError'
274 |   )

@marcprux
Copy link
Copy Markdown
Contributor Author

An alternative solution could be to pin swift-subprocess to 0.4 as per the recommendation in the release notes. But assuming that everything else works as expected, the simple renaming fix seems easy enough.

@ktoso
Copy link
Copy Markdown
Collaborator

ktoso commented May 31, 2026

I’ll have to double check if we need 6.1 in some adopters… thank you for the pr!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants