Skip to content

Fix Subprocess.run API updates#775

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

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!

Copy link
Copy Markdown
Contributor

@madsodgaard madsodgaard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We also just hit this.

Change looks fine to me. If we can drop 6.1 👍

@ktoso
Copy link
Copy Markdown
Collaborator

ktoso commented Jun 1, 2026

We technically can't drop 6.1 until 6.4 is out... We're supporting some projects which follow the usual 3-versions support cycle, so this is jumping ahead a little bit...

I'm thinking maybe we limit the range for now, and then later bump to 0.5+ as well as settle on the 1.0 eventually 🤔

@ktoso
Copy link
Copy Markdown
Collaborator

ktoso commented Jun 1, 2026

Thank you, for now let's support 6.1 but I agree this is the right change in a few months or maybe sooner, I just need to phase the 6.1 usage out a bit more carefully.

Thanks @marcprux !

@ktoso
Copy link
Copy Markdown
Collaborator

ktoso commented Jun 1, 2026

Doing this for now: #777

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants