Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Wasm CI. #192

Merged
merged 19 commits into from
Aug 29, 2024
Merged

Add Wasm CI. #192

merged 19 commits into from
Aug 29, 2024

Conversation

mbrandonw
Copy link
Member

No description provided.

@mbrandonw mbrandonw requested a review from stephencelis August 27, 2024 16:07
@mbrandonw
Copy link
Member Author

Hi @kateinoigakukun, sorry to bother you again, but we are trying to bring Wasm CI to more of our repos, and we have been met with this problem:

error: missing external dependency '/opt/hostedtoolcache/swiftwasm/wasm-DEVELOPMENT-SNAPSHOT-2024-08-26-a/x86_64/usr/lib/swift/wasi/static-executable-args.lnk'

This occurs for the 2024-07-16 and 2024-08-26 snapshots. Not sure if there are other snapshots to use, or if there is something else to try.

For a bit more context, we can't use the Swift 5.9 or 5.10 toolchains because this repo uses macros and those toolchains are unable to compile SwiftSyntax:

Expand
/home/runner/work/swift-case-paths/swift-case-paths/.build/checkouts/swift-syntax/Sources/SwiftCompilerPluginMessageHandling/StandardIOMessageConnection.swift:53:19: error: cannot find 'dup' in scope
    let inputFD = dup(fileno(_stdin))
                  ^~~
/home/runner/work/swift-case-paths/swift-case-paths/.build/checkouts/swift-syntax/Sources/SwiftCompilerPluginMessageHandling/StandardIOMessageConnection.swift:61:11: error: cannot find 'close' in scope
    guard close(fileno(_stdin)) >= 0 else {
          ^~~~~
/home/runner/work/swift-case-paths/swift-case-paths/.build/checkouts/swift-syntax/Sources/SwiftCompilerPluginMessageHandling/StandardIOMessageConnection.swift:67:20: error: cannot find 'dup' in scope
    let outputFD = dup(fileno(_stdout))
                   ^~~
/home/runner/work/swift-case-paths/swift-case-paths/.build/checkouts/swift-syntax/Sources/SwiftCompilerPluginMessageHandling/StandardIOMessageConnection.swift:74:11: error: cannot find 'dup2' in scope
    guard dup2(fileno(_stderr), fileno(_stdout)) >= 0 else {
          ^~~~
/home/runner/work/swift-case-paths/swift-case-paths/.build/checkouts/swift-syntax/Sources/SwiftCompilerPluginMessageHandling/StandardIOMessageConnection.swift:92:14: error: cannot find 'write' in scope
      switch write(outputFileDescriptor, ptr, numericCast(endPtr - ptr)) {
             ^~~~~
/home/runner/work/swift-case-paths/swift-case-paths/.build/checkouts/swift-syntax/Sources/SwiftCompilerPluginMessageHandling/StandardIOMessageConnection.swift:92:47: error: generic parameter 'U' could not be inferred
      switch write(outputFileDescriptor, ptr, numericCast(endPtr - ptr)) {
                                              ^
Swift.numericCast:1:24: note: in call to function 'numericCast'
@inlinable public func numericCast<T, U>(_ x: T) -> U where T : BinaryInteger, U : BinaryInteger
                       ^
/home/runner/work/swift-case-paths/swift-case-paths/.build/checkouts/swift-syntax/Sources/SwiftCompilerPluginMessageHandling/StandardIOMessageConnection.swift:107:14: error: cannot find 'read' in scope
      switch read(inputFileDescriptor, ptr, numericCast(endPtr - ptr)) {
             ^~~~
/home/runner/work/swift-case-paths/swift-case-paths/.build/checkouts/swift-syntax/Sources/SwiftCompilerPluginMessageHandling/StandardIOMessageConnection.swift:107:45: error: generic parameter 'U' could not be inferred
      switch read(inputFileDescriptor, ptr, numericCast(endPtr - ptr)) {
                                            ^
Swift.numericCast:1:24: note: in call to function 'numericCast'
@inlinable public func numericCast<T, U>(_ x: T) -> U where T : BinaryInteger, U : BinaryInteger
                       ^
[251/271] Compiling SwiftCompilerPluginMessageHandling StandardIOMessageConnection.swift
/home/runner/work/swift-case-paths/swift-case-paths/.build/checkouts/swift-syntax/Sources/SwiftCompilerPluginMessageHandling/StandardIOMessageConnection.swift:53:19: error: cannot find 'dup' in scope
    let inputFD = dup(fileno(_stdin))
                  ^~~
/home/runner/work/swift-case-paths/swift-case-paths/.build/checkouts/swift-syntax/Sources/SwiftCompilerPluginMessageHandling/StandardIOMessageConnection.swift:61:11: error: cannot find 'close' in scope
    guard close(fileno(_stdin)) >= 0 else {
          ^~~~~
/home/runner/work/swift-case-paths/swift-case-paths/.build/checkouts/swift-syntax/Sources/SwiftCompilerPluginMessageHandling/StandardIOMessageConnection.swift:67:20: error: cannot find 'dup' in scope
    let outputFD = dup(fileno(_stdout))
                   ^~~
/home/runner/work/swift-case-paths/swift-case-paths/.build/checkouts/swift-syntax/Sources/SwiftCompilerPluginMessageHandling/StandardIOMessageConnection.swift:74:11: error: cannot find 'dup2' in scope
    guard dup2(fileno(_stderr), fileno(_stdout)) >= 0 else {
          ^~~~
/home/runner/work/swift-case-paths/swift-case-paths/.build/checkouts/swift-syntax/Sources/SwiftCompilerPluginMessageHandling/StandardIOMessageConnection.swift:92:14: error: cannot find 'write' in scope
      switch write(outputFileDescriptor, ptr, numericCast(endPtr - ptr)) {
             ^~~~~
/home/runner/work/swift-case-paths/swift-case-paths/.build/checkouts/swift-syntax/Sources/SwiftCompilerPluginMessageHandling/StandardIOMessageConnection.swift:92:47: error: generic parameter 'U' could not be inferred
      switch write(outputFileDescriptor, ptr, numericCast(endPtr - ptr)) {
                                              ^
Swift.numericCast:1:24: note: in call to function 'numericCast'
@inlinable public func numericCast<T, U>(_ x: T) -> U where T : BinaryInteger, U : BinaryInteger
                       ^
/home/runner/work/swift-case-paths/swift-case-paths/.build/checkouts/swift-syntax/Sources/SwiftCompilerPluginMessageHandling/StandardIOMessageConnection.swift:107:14: error: cannot find 'read' in scope
      switch read(inputFileDescriptor, ptr, numericCast(endPtr - ptr)) {
             ^~~~
/home/runner/work/swift-case-paths/swift-case-paths/.build/checkouts/swift-syntax/Sources/SwiftCompilerPluginMessageHandling/StandardIOMessageConnection.swift:107:45: error: generic parameter 'U' could not be inferred
      switch read(inputFileDescriptor, ptr, numericCast(endPtr - ptr)) {
                                            ^
Swift.numericCast:1:24: note: in call to function 'numericCast'
@inlinable public func numericCast<T, U>(_ x: T) -> U where T : BinaryInteger, U : BinaryInteger
                       ^

@kateinoigakukun
Copy link
Contributor

kateinoigakukun commented Aug 28, 2024

@mbrandonw Ok, I made a follow-up patch against this branch :) #193
Thank you for working on Wasm support!

* Skip several deprecated tests on WebAssembly

* Use the official compiler and Swift SDK for WebAssembly

* Grant access to the current directory to the XCTest harness
@mbrandonw mbrandonw merged commit 2ed7c33 into main Aug 29, 2024
3 checks passed
@mbrandonw mbrandonw deleted the add-wasm-ci branch August 29, 2024 13:15
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