Fix ArgumentParser build failure for WASI (WebAssembly System Interface)#794
Conversation
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.
|
@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 |
|
@natecook1000 That's great! I've added the |
|
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 https://github.com/apple/swift-argument-parser/actions/runs/16066481137/job/45417662980?pr=794 |
|
It seems that the same CI issue is occurring in another repository as well. https://github.com/apple/swift-collections/actions/runs/15969333028 |
|
Thanks! It looks like the install on the macOS runners has been changed - I'll get that updated in a different PR. |
|
I would vastly prefer this job be added to swift github workflows instead of just argument parser. Other swiftlang repos have the same need. |
|
@rauhul Let's get it merged here and then I can move it up into gh-workflows |
|
@swift-ci Please test |
|
Thanks again for these contributions, @kkebo! |
…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.
* Fix unknown target type in Swift 5.8 refs #803 `swift package resolve` in Swift 5.8.x: ``` Computing version for https://github.com/apple/swift-argument-parser.git error: Invalid manifest (compiled with: ["/usr/bin/swiftc", "-vfsoverlay", "/tmp/TemporaryDirectory.HCuAi3/vfs.yaml", "-L", "/usr/lib/swift/pm/ManifestAPI", "-lPackageDescription", "-Xlinker", "-rpath", "-Xlinker", "/usr/lib/swift/pm/ManifestAPI", "-swift-version", "5", "-I", "/usr/lib/swift/pm/ManifestAPI", "-package-description-version", "5.8.0", "/Package@swift-5.8.swift", "-Xfrontend", "-disable-implicit-concurrency-module-import", "-Xfrontend", "-disable-implicit-string-processing-module-import", "-o", "/tmp/TemporaryDirectory.RLkqp3/swift-argument-parser-manifest"]) /Package@swift-5.8.swift:149:9: error: type 'Target.TargetType' has no member 'macro' case .macro, .plugin, .system, .binary: ~^~~~~ in https://github.com/apple/swift-argument-parser.git ``` * Fix to remove access level modifier on imports for Swift 5 fix #870 refs #804 If you want without compiler conditional import, enable `InternalImportsByDefault` upcoming feature and remove `internal` from imports. * Fix unsupported conditional attributes in Swift 5.7 refs #794 --------- Co-authored-by: Nate Cook <natecook@apple.com>
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
DispatchSemaphorehas caused the build for wasm32-unknown-wasi to break.This PR is intended to fix that issue.
Checks
Checklist