Repository navigation
Bump swift-subprocess to 1.0 - #936
Closed
rayman-zhao wants to merge 1 commit into
Closed
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(_:).
ktoso
reviewed
Oct 17, 2026
| @@ -0,0 +1,16 @@ | |||
| <?xml version="1.0" encoding="UTF-8"?> | |||
Collaborator
There was a problem hiding this comment.
I don’t think we need this?
ktoso
reviewed
Oct 17, 2026
| @@ -0,0 +1 @@ | |||
| {"attributes":["propertyWrapper","resultBuilder","_opaqueReturnTypeOf","noDerivative","isolated","storageRestrictions","export","backDeployed","_local","exclusivity","inlinable","unchecked","dynamicCallable","inline","retroactive","transpose","available","_lifetime","objcMembers","globalActor","Sendable","_noMetadata","_addressable","concurrent","IBInspectable","nonobjc","_extern","NSManaged","IBAction","discardableResult","reparented","constInitialized","unsafe","abi","attached","IBSegueAction","UIApplicationMain","NSApplicationMain","frozen","lifetime","preconcurrency","IBDesignable","NSCopying","objc","IBOutlet","escaping","nonisolated","differentiable","const","reasync","main","nonexhaustive","dynamicMemberLookup","c","diagnose","requires_stored_property_inits","GKInspectable","warn_unqualified_access","autoclosure","_owned","usableFromInline","rethrows","convention","derivative"],"compilerVersion":{"components":[6,4,1]},"customConditions":[],"endianness":"little","features":["AsyncSequenceFailure","BuiltinStoreRaw","MarkerProtocol","InoutLifetimeDependence","BuiltinInterleave","NonexhaustiveAttribute","BuiltinBuildMainExecutor","BorrowInout","BuiltinContinuation","PrimaryAssociatedTypes2","GeneralizedIsSameMetaTypeBuiltin","ABIAttributeSE0479","ExtensionMacroAttr","TypedThrows","MoveOnly","EffectfulProp","SpecializeAttributeWithAvailability","CAttribute","BuiltinContinuationNonCopyableSuccess","BuiltinTaskCancellationShield","NewCxxMethodSafetyHeuristics","BuiltinCreateAsyncTaskInGroupWithExecutor","BuiltinAddTaskLocalValue","NonfrozenEnumExhaustivity","BodyMacros","AsyncAwait","NoAsyncAvailability","BuiltinUnprotectedAddressOf","BuiltinVectorsExternC","ExtensionMacros","BuiltinTaskGroupWithArgument","RawIdentifiers","IsolatedAny","ValueGenericsNameLookup","BuiltinCreateAsyncTaskOwnedTaskExecutor","RetroactiveAttribute","NonescapableAccessorOnTrivial","FreestandingExpressionMacros","MoveOnlyPartialConsumption","SendableCompletionHandlers","ObjCImplementation","BuiltinBuildComplexEqualityExecutor","BuiltinAddressOfRawLayout","MemorySafetyAttributes","NoncopyableGenerics2","ExpressionMacroDefaultArguments","Macros","NonescapableTypes","ParameterPacks","BuiltinAssumeAlignment","AttachedMacros","BorrowingSwitch","BuiltinHopToActor","ModuleSelector","Actors","BorrowingForLoop","FreestandingMacros","LayoutPrespecialization","AssociatedTypeAvailability","ImplicitSelfCapture","BuiltinCreateTaskGroupWithFlags","TildeSendable","ClosureLifetimes","AlwaysInheritActorContext","AsyncExecutionBehaviorAttributes","BuiltinUnprotectedStackAlloc","LifetimeDependenceMutableAccessors","IsolatedAny2","BuiltinBuildTaskExecutorRef","UnsafeInheritExecutor","BuiltinEmplaceTypedThrows","LexicalLifetimes","BuiltinExecutor","BuiltinConcurrencyStackNesting","ConformanceSuppression","BuiltinBuildExecutor","Sendable","BuiltinMarkDependence","NoncopyableGenerics","IsolatedConformances","BorrowAndMutateAccessors","BuiltinCreateAsyncTaskWithExecutor","InheritActorContext","BuiltinStackAlloc","InlineArrayTypeSugar","ValueGenerics","BuiltinCreateTask","BuiltinIntLiteralAccessors","BuiltinCreateAsyncDiscardingTaskInGroupWithExecutor","IsolatedDeinit","AssociatedTypeImplements","SendingArgsAndResults","BuiltinJob","BuiltinSelect","BitwiseCopyable","MoveOnlyResilientTypes","SuppressedAssociatedTypesWithDefaults","RethrowsProtocol","UnavailableFromAsync","ExcludePrivateFromMemberwiseInit","AddressOfProperty2","OptionalIsolatedParameters","InlineAlways","AnyAppleOSAvailability","BuiltinTaskRunInline","BuiltinCreateAsyncTaskInGroup","BitwiseCopyable2","SourceWarningControl","ConcurrentFunctions","BuiltinCreateAsyncDiscardingTaskInGroup","BorrowingSequence","GlobalActors","BuiltinCreateAsyncTaskName"],"languageMode":{"components":[5,10]},"targetArchitectures":["arm64"],"targetAtomicBitWidths":[128,64,32,16,8],"targetEnvironments":[],"targetOSs":["Linux"],"targetObjectFileFormats":["ELF"],"targetPointerAuthenticationSchemes":["_none"],"targetPointerBitWidth":64,"targetRuntimes":["_multithreaded","_Native"]} No newline at end of file | |||
Collaborator
There was a problem hiding this comment.
I don’t think we need this file either?
Contributor
Author
|
Closing for now — I accidentally committed locally generated build artifacts (Info.plist, static-build-config.json, dummy.json). Will clean the branch up and resubmit. Thanks for the quick review! |
Contributor
Author
|
Reopened — the branch is cleaned up now and only contains the 5 intended source changes; the accidentally committed build artifacts are gone. |
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.
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 checkTesting
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.