Repository navigation
Bump swift-subprocess to 1.0 - #937
Open
rayman-zhao wants to merge 1 commit into
Open
rayman-zhao wants to merge 1 commit into
rayman-zhao wants to merge 1 commit into
Conversation
Update the swift-subprocess dependency from 0.4.x to 1.0 and adapt to the API changes introduced along the way: - FileDescriptorOutput.standardOutput/.standardError were renamed to .currentStandardOutput/.currentStandardError - StringOutput's standardOutput/standardError are now non-optional String, dropping the '?? ""' fallbacks and the optional binding Subprocess 1.0 ships with Swift 6.4 and includes a PATH-resolution security fix for Executable.name(_:).
Contributor
Author
|
The failing swift-subprocess 0.5+ declares So this bump inherently means dropping Swift 6.1 toolchain support, which is a project-policy call. Happy to go either way:
|
Collaborator
|
Hm yeah I'll have to check with adopters. We might need to be slow to drop 6.1 even though we're not officially a 1.0... Thank you for the pr in any case. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Supersedes #936 — resubmitted after removing accidentally committed local build artifacts; the actual changes are identical. (That PR could not be reopened because its branch was force-pushed after closing.)
Motivation
swift-java currently pins
swift-subprocessto0.4.0..<0.5.0, while Subprocess 1.0 has been released (shipping with Swift 6.4). The 0.4 pin makes it impossible to use swift-java in a package graph that also contains a package requiringswift-subprocess1.0, since SwiftPM must pick a single version for the whole graph. Subprocess 1.0.0 also includes a PATH-resolution security fix forExecutable.name(_:).Changes
Package.swift:"0.4.0"..<"0.5.0"->"1.0.0"..<"2.0.0"(theSubprocessFoundationtrait is kept; it now provides.data(limit:))JavaCallbacksBuildCommand.swift:FileDescriptorOutput.standardOutput/.standardError->.currentStandardOutput/.currentStandardError(renamed in 0.5)JavaDependencyResolver.swift,CompileJavaTool.swift: drop?? ""fallbacks —StringOutputresults are non-optionalStringsince 1.0StaticBuildConfigPluginExecutable.swift: replace theif let error = result.standardErroroptional binding with a plain non-optional check (required: the value is no longer optional)Testing
Built on Windows (Swift 6.4.1, JDK 25):
swift build --target swift-java,--target StaticBuildConfigPluginExecutable, and--target SwiftJavaToolLibTestsall pass with swift-subprocess resolved at 1.0.2.