Skip to content

Conversation

iCharlesHu
Copy link
Contributor

@iCharlesHu iCharlesHu commented Apr 3, 2025

@iCharlesHu iCharlesHu requested review from parkera and itingliu April 3, 2025 05:06
@iCharlesHu iCharlesHu marked this pull request as draft April 3, 2025 05:06
@iCharlesHu iCharlesHu marked this pull request as ready for review April 3, 2025 17:21
README.md Outdated

Subprocess is a cross-platform package for spawning processes in Swift.

It's like [Foundation.Process](https://developer.apple.com/documentation/foundation/process), but written for Swift and build on top of structural concurrency.
Copy link
Contributor

Choose a reason for hiding this comment

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

From your proposal and inspiration from foundation's other packages

Suggested change
It's like [Foundation.Process](https://developer.apple.com/documentation/foundation/process), but written for Swift and build on top of structural concurrency.
It improves the ergonomics of `Foundation.Process` and the experience of using Swift for scripting and other areas such as server-side development, with first-class integration with `async/await` and other language features.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Tony actually suggested to remove this line altogether 😅

@iCharlesHu iCharlesHu merged commit 4f45a19 into swiftlang:main Apr 9, 2025
@iCharlesHu iCharlesHu deleted the charles/introduce-subprocess branch April 9, 2025 22:14
j-hui added a commit to j-hui/swift-subprocess that referenced this pull request Oct 3, 2025
Previous, we would encounter missing symbol errors like:

          "_subprocess_vm_size()", referenced from:
              closure swiftlang#1 () -> Swift.Int in variable initialization expression of Subprocess.(_pageSize in _EDE99368FF43462E0C75AF3C9D4D8F2D) : Swift.Int in AsyncBufferSequence.swift.o
           NOTE: found '__subprocess_vm_size' in process_shims.c.o, declaration possibly missing 'extern "C"'

We can reproduce this by running:

        xcrun swift build -Xswiftc -cxx-interoperability-mode=default --build-tests

Adding `extern "C"` fixes these issues.
j-hui added a commit to j-hui/swift-subprocess that referenced this pull request Oct 3, 2025
Previous, we would encounter missing symbol errors like:

          "_subprocess_vm_size()", referenced from:
              closure swiftlang#1 () -> Swift.Int in variable initialization expression of Subprocess.(_pageSize in _EDE99368FF43462E0C75AF3C9D4D8F2D) : Swift.Int in AsyncBufferSequence.swift.o
           NOTE: found '__subprocess_vm_size' in process_shims.c.o, declaration possibly missing 'extern "C"'

We can reproduce this by running:

        xcrun swift build -Xswiftc -cxx-interoperability-mode=default --build-tests

Adding `extern "C"` fixes these issues.

rdar://161624906
j-hui added a commit to j-hui/swift-subprocess that referenced this pull request Oct 4, 2025
Previous, we would encounter missing symbol errors like:

          "_subprocess_vm_size()", referenced from:
              closure swiftlang#1 () -> Swift.Int in variable initialization expression of Subprocess.(_pageSize in _EDE99368FF43462E0C75AF3C9D4D8F2D) : Swift.Int in AsyncBufferSequence.swift.o
           NOTE: found '__subprocess_vm_size' in process_shims.c.o, declaration possibly missing 'extern "C"'

We can reproduce this by running:

        xcrun swift build -Xswiftc -cxx-interoperability-mode=default --build-tests

Adding `extern "C"` fixes these issues.

rdar://161624906
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.

3 participants