Skip to content

swift-subprocess - #15

Merged
Alexander-Ignition merged 2 commits into
mainfrom
swift-subprocess
Oct 3, 2026
Merged

Alexander-Ignition merged 2 commits into
mainfrom
swift-subprocess

Conversation

@Alexander-Ignition

Copy link
Copy Markdown
Owner

Description

This PR integrates the official swift-subprocess package into XSTooling.

To maintain flexibility, this dependency is introduced conditionally behind a new feature trait: --traits EnableSubprocess.

Context & Motivation

On Linux environments, the existing implementation suffers from a critical known bug in Swift Corelibs Foundation related to FileHandle.readabilityHandler. It frequently fails to trigger on EOF or completely hangs during asynchronous process I/O tracking.

For reference, see the official tracker issues:

The modern swift-subprocess library leverages Swift Concurrency natively (async/await) and completely bypasses these legacy low-level Foundation limitations on Linux.

Platform-specific Requirements:

  • Linux: Enabling the EnableSubprocess trait is mandatory to ensure reliable, non-blocking process execution and streaming.
  • macOS: Enabling the trait is optional, as macOS uses Darwin's native Foundation where readabilityHandler works as expected.

@Alexander-Ignition
Alexander-Ignition merged commit e7acd92 into main Oct 3, 2026
3 checks passed
@Alexander-Ignition
Alexander-Ignition deleted the swift-subprocess branch October 3, 2026 11:50
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.

1 participant