Skip to content

Conversation

kkebo
Copy link
Contributor

@kkebo kkebo commented Jul 2, 2025

ArgumentParser is very useful for command-line tools that are built for wasm32-unknown-wasi and run on WebAssembly runtimes (e.g., wasmtime, wasmer, WasmKit). However, starting from version 1.6.0, the use of DispatchSemaphore has caused the build for wasm32-unknown-wasi to break.

This PR is intended to fix that issue.

Checks

Checklist

  • I've added at least one test that validates that my change is working, if appropriate
  • I've followed the code style of the rest of the project
  • I've read the Contribution Guidelines
  • I've updated the documentation if necessary

ArgumentParser is very useful for command-line tools that are built for wasm32-unknown-wasi and run on WebAssembly runtimes (e.g., wasmtime, wasmer, WasmKit). However, starting from version 1.6.0, the use of `DispatchSemaphore` has caused the build for wasm32-unknown-wasi to break. This change is intended to fix that issue.
@natecook1000
Copy link
Member

@kkebo, thanks for this fix! Would you be willing to update https://github.com/apple/swift-argument-parser/blob/main/.github/workflows/pull_request.yml to include those WASM build tests? They could be in a wasm-build job, just like cmake-build.

@kkebo
Copy link
Contributor Author

kkebo commented Jul 4, 2025

@natecook1000 That's great! I've added the wasm-build job to pull_request.yml.

@kkebo
Copy link
Contributor Author

kkebo commented Jul 6, 2025

The CI failures on macOS seem to be an issue caused by the runner environment, so I don't think they're relevant to this PR.

https://github.com/apple/swift-argument-parser/actions/runs/16066481137/job/45417662979?pr=794

xcrun: error: missing DEVELOPER_DIR path: /Applications/Xcode_16.0.app

https://github.com/apple/swift-argument-parser/actions/runs/16066481137/job/45417662980?pr=794

xcrun: error: missing DEVELOPER_DIR path: /Applications/Xcode_16.1.app

@kkebo
Copy link
Contributor Author

kkebo commented Jul 7, 2025

It seems that the same CI issue is occurring in another repository as well.

https://github.com/apple/swift-collections/actions/runs/15969333028

@natecook1000
Copy link
Member

Thanks! It looks like the install on the macOS runners has been changed - I'll get that updated in a different PR.

@rauhul
Copy link
Contributor

rauhul commented Jul 7, 2025

I would vastly prefer this job be added to swift github workflows instead of just argument parser. Other swiftlang repos have the same need.

@natecook1000
Copy link
Member

@rauhul Let's get it merged here and then I can move it up into gh-workflows

@natecook1000
Copy link
Member

@swift-ci Please test

@natecook1000 natecook1000 merged commit d075877 into apple:main Jul 7, 2025
26 checks passed
@natecook1000
Copy link
Member

Thanks again for these contributions, @kkebo!

@kkebo kkebo deleted the wasm32-wasi branch July 8, 2025 13:04
kkebo added a commit to kkebo/swift-argument-parser that referenced this pull request Aug 2, 2025
kkebo added a commit to kkebo/swift-argument-parser that referenced this pull request Aug 7, 2025
natecook1000 pushed a commit that referenced this pull request Sep 2, 2025
natecook1000 pushed a commit that referenced this pull request Oct 1, 2025
…ce) (#794)

ArgumentParser is very useful for command-line tools that are built for wasm32-unknown-wasi and run on WebAssembly runtimes (e.g., wasmtime, wasmer, WasmKit). However, starting from version 1.6.0, the use of `DispatchSemaphore` has caused the build for wasm32-unknown-wasi to break. This change is intended to fix that issue.
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