The Swift Package Index logo.Swift Package Index

Build Information

Failed to build Promises, reference 2.0.4 (7de014), with Swift 6.1 for Wasm on 27 May 2025 09:42:15 UTC.

Build Command

bash -c docker run --pull=always --rm -v "checkouts-4609320-0":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:wasm-6.1-latest swift build --swift-sdk wasm32-unknown-wasi 2>&1

Build Log

========================================
RunAll
========================================
Builder version: 4.63.1
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/khanlou/Promise.git
Reference: 2.0.4
Initialized empty Git repository in /host/spi-builder-workspace/.git/
hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint:
hint: 	git config --global init.defaultBranch <name>
hint:
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint:
hint: 	git branch -m <name>
From https://github.com/khanlou/Promise
 * tag               2.0.4      -> FETCH_HEAD
HEAD is now at 7de0149 update to version 2.0.4
Cloned https://github.com/khanlou/Promise.git
Revision (git rev-parse @):
7de01494163478adb1aa83740914a4ca29059169
SUCCESS checkout https://github.com/khanlou/Promise.git at 2.0.4
========================================
Build
========================================
Selected platform:         wasm
Swift version:             6.1
Building package at path:  $PWD
https://github.com/khanlou/Promise.git
https://github.com/khanlou/Promise.git
WARNING: environment variable SUPPRESS_SWIFT_6_FLAGS is not set
{
  "dependencies" : [
  ],
  "manifest_display_name" : "Promises",
  "name" : "Promises",
  "path" : "/host/spi-builder-workspace",
  "platforms" : [
  ],
  "products" : [
    {
      "name" : "Promise",
      "targets" : [
        "Promise"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "targets" : [
    {
      "c99name" : "PromiseTests",
      "module_type" : "SwiftTarget",
      "name" : "PromiseTests",
      "path" : "PromiseTests",
      "sources" : [
        "ExecutionContextTests.swift",
        "PromiseAllTests.swift",
        "PromiseAlwaysTests.swift",
        "PromiseDelayTests.swift",
        "PromiseEnsureTests.swift",
        "PromiseErrorMatcherTests.swift",
        "PromiseKickoffTests.swift",
        "PromiseRaceTests.swift",
        "PromiseRecoverTests.swift",
        "PromiseRetryTests.swift",
        "PromiseTests.swift",
        "PromiseThrowsTests.swift",
        "PromiseZipTests.swift",
        "Wrench.swift",
        "delay.swift"
      ],
      "target_dependencies" : [
        "Promise"
      ],
      "type" : "test"
    },
    {
      "c99name" : "Promise",
      "module_type" : "SwiftTarget",
      "name" : "Promise",
      "path" : "Promise",
      "product_memberships" : [
        "Promise"
      ],
      "sources" : [
        "Promise+Extras.swift",
        "Promise.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "4.0"
}
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-4609320-0":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:wasm-6.1-latest swift build --swift-sdk wasm32-unknown-wasi -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete -Xswiftc -enable-upcoming-feature -Xswiftc StrictConcurrency -Xswiftc -enable-upcoming-feature -Xswiftc DisableOutwardActorInference -Xswiftc -enable-upcoming-feature -Xswiftc GlobalActorIsolatedTypesUsability -Xswiftc -enable-upcoming-feature -Xswiftc InferSendableFromCaptures 2>&1
wasm-6.1-latest: Pulling from finestructure/spi-images
Digest: sha256:059e0fdbe549369b902c0d423739510ddee50a4a70258d1404125eb9394ef31c
Status: Image is up to date for registry.gitlab.com/finestructure/spi-images:wasm-6.1-latest
Building for debugging...
[0/2] Write sources
[1/2] Write swift-version-24593BA9C3E375BF.txt
error: emit-module command failed with exit code 1 (use -v to see invocation)
[3/5] Emitting module Promise
/host/spi-builder-workspace/Promise/Promise+Extras.swift:144:53: error: cannot find 'DispatchQueue' in scope
142 |
143 |     @discardableResult
144 |     public func always(on queue: ExecutionContext = DispatchQueue.main, _ onComplete: @escaping () -> Void) -> Promise<Value> {
    |                                                     `- error: cannot find 'DispatchQueue' in scope
145 |         return then(on: queue, { _ in
146 |             onComplete()
/host/spi-builder-workspace/Promise/Promise.swift:18:11: error: cannot find type 'DispatchQueue' in scope
 16 | }
 17 |
 18 | extension DispatchQueue: ExecutionContext {
    |           `- error: cannot find type 'DispatchQueue' in scope
 19 |
 20 |     public func execute(_ work: @escaping () -> Void) {
/host/spi-builder-workspace/Promise/Promise.swift:29:24: error: cannot find type 'DispatchQueue' in scope
 27 |     private var valid = true
 28 |
 29 |     private var queue: DispatchQueue
    |                        `- error: cannot find type 'DispatchQueue' in scope
 30 |
 31 |     public init(queue: DispatchQueue = .main) {
/host/spi-builder-workspace/Promise/Promise.swift:31:24: error: cannot find type 'DispatchQueue' in scope
 29 |     private var queue: DispatchQueue
 30 |
 31 |     public init(queue: DispatchQueue = .main) {
    |                        `- error: cannot find type 'DispatchQueue' in scope
 32 |         self.queue = queue
 33 |     }
/host/spi-builder-workspace/Promise/Promise.swift:136:29: error: cannot find 'DispatchQueue' in scope
134 |
135 |     private var state: State<Value>
136 |     private let lockQueue = DispatchQueue(label: "promise_lock_queue", qos: .userInitiated)
    |                             `- error: cannot find 'DispatchQueue' in scope
137 |
138 |     public init() {
/host/spi-builder-workspace/Promise/Promise.swift:136:78: error: cannot infer contextual base in reference to member 'userInitiated'
134 |
135 |     private var state: State<Value>
136 |     private let lockQueue = DispatchQueue(label: "promise_lock_queue", qos: .userInitiated)
    |                                                                              `- error: cannot infer contextual base in reference to member 'userInitiated'
137 |
138 |     public init() {
/host/spi-builder-workspace/Promise/Promise.swift:150:36: error: cannot find type 'DispatchQueue' in scope
148 |     }
149 |
150 |     public convenience init(queue: DispatchQueue = DispatchQueue.global(qos: .userInitiated), work: @escaping (_ fulfill: @escaping (Value) -> Void, _ reject: @escaping (Error) -> Void) throws -> Void) {
    |                                    `- error: cannot find type 'DispatchQueue' in scope
151 |         self.init()
152 |         queue.async(execute: {
/host/spi-builder-workspace/Promise/Promise.swift:163:61: error: cannot find 'DispatchQueue' in scope
161 |     /// - note: This one is "flatMap"
162 |     @discardableResult
163 |     public func then<NewValue>(on queue: ExecutionContext = DispatchQueue.main, _ onFulfilled: @escaping (Value) throws -> Promise<NewValue>) -> Promise<NewValue> {
    |                                                             `- error: cannot find 'DispatchQueue' in scope
164 |         return Promise<NewValue>(work: { fulfill, reject in
165 |             self.addCallbacks(
/host/spi-builder-workspace/Promise/Promise.swift:181:61: error: cannot find 'DispatchQueue' in scope
179 |     /// - note: This one is "map"
180 |     @discardableResult
181 |     public func then<NewValue>(on queue: ExecutionContext = DispatchQueue.main, _ onFulfilled: @escaping (Value) throws -> NewValue) -> Promise<NewValue> {
    |                                                             `- error: cannot find 'DispatchQueue' in scope
182 |         return then(on: queue, { (value) -> Promise<NewValue> in
183 |             do {
/host/spi-builder-workspace/Promise/Promise.swift:192:51: error: cannot find 'DispatchQueue' in scope
190 |
191 |     @discardableResult
192 |     public func then(on queue: ExecutionContext = DispatchQueue.main, _ onFulfilled: @escaping (Value) -> Void, _ onRejected: @escaping (Error) -> Void = { _ in }) -> Promise<Value> {
    |                                                   `- error: cannot find 'DispatchQueue' in scope
193 |         addCallbacks(on: queue, onFulfilled: onFulfilled, onRejected: onRejected)
194 |         return self
/host/spi-builder-workspace/Promise/Promise.swift:198:54: error: cannot find 'DispatchQueue' in scope
196 |
197 |     @discardableResult
198 |     public func `catch`(on queue: ExecutionContext = DispatchQueue.main, _ onRejected: @escaping (Error) -> Void) -> Promise<Value> {
    |                                                      `- error: cannot find 'DispatchQueue' in scope
199 |         return then(on: queue, { _ in }, onRejected)
200 |     }
/host/spi-builder-workspace/Promise/Promise.swift:242:60: error: cannot find 'DispatchQueue' in scope
240 |     }
241 |
242 |     private func addCallbacks(on queue: ExecutionContext = DispatchQueue.main, onFulfilled: @escaping (Value) -> Void, onRejected: @escaping (Error) -> Void) {
    |                                                            `- error: cannot find 'DispatchQueue' in scope
243 |         let callback = Callback(onFulfilled: onFulfilled, onRejected: onRejected, executionContext: queue)
244 |         lockQueue.async(flags: .barrier, execute: {
[4/5] Compiling Promise Promise+Extras.swift
/host/spi-builder-workspace/Promise/Promise+Extras.swift:144:53: error: cannot find 'DispatchQueue' in scope
142 |
143 |     @discardableResult
144 |     public func always(on queue: ExecutionContext = DispatchQueue.main, _ onComplete: @escaping () -> Void) -> Promise<Value> {
    |                                                     `- error: cannot find 'DispatchQueue' in scope
145 |         return then(on: queue, { _ in
146 |             onComplete()
/host/spi-builder-workspace/Promise/Promise.swift:150:36: error: cannot find type 'DispatchQueue' in scope
148 |     }
149 |
150 |     public convenience init(queue: DispatchQueue = DispatchQueue.global(qos: .userInitiated), work: @escaping (_ fulfill: @escaping (Value) -> Void, _ reject: @escaping (Error) -> Void) throws -> Void) {
    |                                    `- error: cannot find type 'DispatchQueue' in scope
151 |         self.init()
152 |         queue.async(execute: {
/host/spi-builder-workspace/Promise/Promise+Extras.swift:20:35: error: argument passed to call that takes no arguments
 18 |     /// with the array of all fulfilled values.
 19 |     public static func all<T>(_ promises: [Promise<T>]) -> Promise<[T]> {
 20 |         return Promise<[T]>(work: { fulfill, reject in
    |                                   `- error: argument passed to call that takes no arguments
 21 |             guard !promises.isEmpty else { fulfill([]); return }
 22 |             for promise in promises {
/host/spi-builder-workspace/Promise/Promise+Extras.swift:38:13: error: cannot find 'DispatchQueue' in scope
 36 |     public static func delay(_ delay: TimeInterval) -> Promise<()> {
 37 |         return Promise<()>(work: { fulfill, reject in
 38 |             DispatchQueue.main.asyncAfter(deadline: .now() + delay, execute: {
    |             `- error: cannot find 'DispatchQueue' in scope
 39 |                 fulfill(())
 40 |             })
/host/spi-builder-workspace/Promise/Promise+Extras.swift:37:34: error: argument passed to call that takes no arguments
 35 |     /// - parameter delay: In seconds
 36 |     public static func delay(_ delay: TimeInterval) -> Promise<()> {
 37 |         return Promise<()>(work: { fulfill, reject in
    |                                  `- error: argument passed to call that takes no arguments
 38 |             DispatchQueue.main.asyncAfter(deadline: .now() + delay, execute: {
 39 |                 fulfill(())
/host/spi-builder-workspace/Promise/Promise+Extras.swift:38:54: error: cannot call value of non-function type 'Date'
 36 |     public static func delay(_ delay: TimeInterval) -> Promise<()> {
 37 |         return Promise<()>(work: { fulfill, reject in
 38 |             DispatchQueue.main.asyncAfter(deadline: .now() + delay, execute: {
    |                                                      `- error: cannot call value of non-function type 'Date'
 39 |                 fulfill(())
 40 |             })
/host/spi-builder-workspace/Promise/Promise+Extras.swift:46:33: error: argument passed to call that takes no arguments
 44 |     /// This promise will be rejected after a delay.
 45 |     public static func timeout<T>(_ timeout: TimeInterval) -> Promise<T> {
 46 |         return Promise<T>(work: { fulfill, reject in
    |                                 `- error: argument passed to call that takes no arguments
 47 |             delay(timeout).then({ _ in
 48 |                 reject(NSError(domain: "com.khanlou.Promise", code: -1111, userInfo: [ NSLocalizedDescriptionKey: "Timed out" ]))
/host/spi-builder-workspace/Promise/Promise+Extras.swift:56:33: error: argument passed to call that takes no arguments
 54 |     /// (as opposed to waiting for all of them, like `.all()` does).
 55 |     public static func race<T>(_ promises: [Promise<T>]) -> Promise<T> {
 56 |         return Promise<T>(work: { fulfill, reject in
    |                                 `- error: argument passed to call that takes no arguments
 57 |             guard !promises.isEmpty else { fatalError() }
 58 |             for promise in promises {
/host/spi-builder-workspace/Promise/Promise+Extras.swift:68:33: error: argument passed to call that takes no arguments
 66 |             return generate()
 67 |         }
 68 |         return Promise<T>(work: { fulfill, reject in
    |                                 `- error: argument passed to call that takes no arguments
 69 |             generate().recover({ error in
 70 |                 return self.delay(delay).then({
/host/spi-builder-workspace/Promise/Promise.swift:163:61: error: cannot find 'DispatchQueue' in scope
161 |     /// - note: This one is "flatMap"
162 |     @discardableResult
163 |     public func then<NewValue>(on queue: ExecutionContext = DispatchQueue.main, _ onFulfilled: @escaping (Value) throws -> Promise<NewValue>) -> Promise<NewValue> {
    |                                                             `- error: cannot find 'DispatchQueue' in scope
164 |         return Promise<NewValue>(work: { fulfill, reject in
165 |             self.addCallbacks(
/host/spi-builder-workspace/Promise/Promise+Extras.swift:90:38: error: argument passed to call that takes no arguments
 88 |
 89 |     public static func zip<T, U>(_ first: Promise<T>, _ second: Promise<U>) -> Promise<(T, U)> {
 90 |         return Promise<(T, U)>(work: { fulfill, reject in
    |                                      `- error: argument passed to call that takes no arguments
 91 |             let resolver: (Any) -> Void = { _ in
 92 |                 if let firstValue = first.value, let secondValue = second.value {
/host/spi-builder-workspace/Promise/Promise+Extras.swift:108:44: error: argument passed to call that takes no arguments
106 |     /// type is a tuple of 3 elements.
107 |     public static func zip<T1, T2, T3>(_ p1: Promise<T1>, _ p2: Promise<T2>, _ last: Promise<T3>) -> Promise<(T1, T2, T3)> {
108 |         return Promise<(T1, T2, T3)>(work: { (fulfill: @escaping ((T1, T2, T3)) -> Void, reject: @escaping (Error) -> Void) in
    |                                            `- error: argument passed to call that takes no arguments
109 |             let zipped: Promise<(T1, T2)> = zip(p1, p2)
110 |
/host/spi-builder-workspace/Promise/Promise+Extras.swift:124:48: error: argument passed to call that takes no arguments
122 |     /// type is a tuple of 4 elements.
123 |     public static func zip<T1, T2, T3, T4>(_ p1: Promise<T1>, _ p2: Promise<T2>, _ p3: Promise<T3>, _ last: Promise<T4>) -> Promise<(T1, T2, T3, T4)> {
124 |         return Promise<(T1, T2, T3, T4)>(work: { (fulfill: @escaping ((T1, T2, T3, T4)) -> Void, reject: @escaping (Error) -> Void) in
    |                                                `- error: argument passed to call that takes no arguments
125 |             let zipped: Promise<(T1, T2, T3)> = zip(p1, p2, p3)
126 |
/host/spi-builder-workspace/Promise/Promise+Extras.swift:153:30: error: argument passed to call that takes no arguments
151 |
152 |     public func recover(_ recovery: @escaping (Error) throws -> Promise<Value>) -> Promise<Value> {
153 |         return Promise(work: { fulfill, reject in
    |                              `- error: argument passed to call that takes no arguments
154 |             self.then(fulfill).catch({ error in
155 |                 do {
/host/spi-builder-workspace/Promise/Promise+Extras.swift:156:46: error: invalid conversion from throwing function of type '(Value) throws -> Void' to non-throwing function type '(Value) -> Void'
154 |             self.then(fulfill).catch({ error in
155 |                 do {
156 |                     try recovery(error).then(fulfill, reject)
    |                                              `- error: invalid conversion from throwing function of type '(Value) throws -> Void' to non-throwing function type '(Value) -> Void'
157 |                 } catch (let error) {
158 |                     reject(error)
/host/spi-builder-workspace/Promise/Promise.swift:181:61: error: cannot find 'DispatchQueue' in scope
179 |     /// - note: This one is "map"
180 |     @discardableResult
181 |     public func then<NewValue>(on queue: ExecutionContext = DispatchQueue.main, _ onFulfilled: @escaping (Value) throws -> NewValue) -> Promise<NewValue> {
    |                                                             `- error: cannot find 'DispatchQueue' in scope
182 |         return then(on: queue, { (value) -> Promise<NewValue> in
183 |             do {
/host/spi-builder-workspace/Promise/Promise.swift:198:54: error: cannot find 'DispatchQueue' in scope
196 |
197 |     @discardableResult
198 |     public func `catch`(on queue: ExecutionContext = DispatchQueue.main, _ onRejected: @escaping (Error) -> Void) -> Promise<Value> {
    |                                                      `- error: cannot find 'DispatchQueue' in scope
199 |         return then(on: queue, { _ in }, onRejected)
200 |     }
[5/5] Compiling Promise Promise.swift
/host/spi-builder-workspace/Promise/Promise.swift:18:11: error: cannot find type 'DispatchQueue' in scope
 16 | }
 17 |
 18 | extension DispatchQueue: ExecutionContext {
    |           `- error: cannot find type 'DispatchQueue' in scope
 19 |
 20 |     public func execute(_ work: @escaping () -> Void) {
/host/spi-builder-workspace/Promise/Promise.swift:29:24: error: cannot find type 'DispatchQueue' in scope
 27 |     private var valid = true
 28 |
 29 |     private var queue: DispatchQueue
    |                        `- error: cannot find type 'DispatchQueue' in scope
 30 |
 31 |     public init(queue: DispatchQueue = .main) {
/host/spi-builder-workspace/Promise/Promise.swift:31:24: error: cannot find type 'DispatchQueue' in scope
 29 |     private var queue: DispatchQueue
 30 |
 31 |     public init(queue: DispatchQueue = .main) {
    |                        `- error: cannot find type 'DispatchQueue' in scope
 32 |         self.queue = queue
 33 |     }
/host/spi-builder-workspace/Promise/Promise.swift:136:29: error: cannot find 'DispatchQueue' in scope
134 |
135 |     private var state: State<Value>
136 |     private let lockQueue = DispatchQueue(label: "promise_lock_queue", qos: .userInitiated)
    |                             `- error: cannot find 'DispatchQueue' in scope
137 |
138 |     public init() {
/host/spi-builder-workspace/Promise/Promise.swift:136:78: error: cannot infer contextual base in reference to member 'userInitiated'
134 |
135 |     private var state: State<Value>
136 |     private let lockQueue = DispatchQueue(label: "promise_lock_queue", qos: .userInitiated)
    |                                                                              `- error: cannot infer contextual base in reference to member 'userInitiated'
137 |
138 |     public init() {
/host/spi-builder-workspace/Promise/Promise.swift:150:36: error: cannot find type 'DispatchQueue' in scope
148 |     }
149 |
150 |     public convenience init(queue: DispatchQueue = DispatchQueue.global(qos: .userInitiated), work: @escaping (_ fulfill: @escaping (Value) -> Void, _ reject: @escaping (Error) -> Void) throws -> Void) {
    |                                    `- error: cannot find type 'DispatchQueue' in scope
151 |         self.init()
152 |         queue.async(execute: {
/host/spi-builder-workspace/Promise/Promise.swift:163:61: error: cannot find 'DispatchQueue' in scope
161 |     /// - note: This one is "flatMap"
162 |     @discardableResult
163 |     public func then<NewValue>(on queue: ExecutionContext = DispatchQueue.main, _ onFulfilled: @escaping (Value) throws -> Promise<NewValue>) -> Promise<NewValue> {
    |                                                             `- error: cannot find 'DispatchQueue' in scope
164 |         return Promise<NewValue>(work: { fulfill, reject in
165 |             self.addCallbacks(
/host/spi-builder-workspace/Promise/Promise.swift:181:61: error: cannot find 'DispatchQueue' in scope
179 |     /// - note: This one is "map"
180 |     @discardableResult
181 |     public func then<NewValue>(on queue: ExecutionContext = DispatchQueue.main, _ onFulfilled: @escaping (Value) throws -> NewValue) -> Promise<NewValue> {
    |                                                             `- error: cannot find 'DispatchQueue' in scope
182 |         return then(on: queue, { (value) -> Promise<NewValue> in
183 |             do {
/host/spi-builder-workspace/Promise/Promise.swift:192:51: error: cannot find 'DispatchQueue' in scope
190 |
191 |     @discardableResult
192 |     public func then(on queue: ExecutionContext = DispatchQueue.main, _ onFulfilled: @escaping (Value) -> Void, _ onRejected: @escaping (Error) -> Void = { _ in }) -> Promise<Value> {
    |                                                   `- error: cannot find 'DispatchQueue' in scope
193 |         addCallbacks(on: queue, onFulfilled: onFulfilled, onRejected: onRejected)
194 |         return self
/host/spi-builder-workspace/Promise/Promise.swift:198:54: error: cannot find 'DispatchQueue' in scope
196 |
197 |     @discardableResult
198 |     public func `catch`(on queue: ExecutionContext = DispatchQueue.main, _ onRejected: @escaping (Error) -> Void) -> Promise<Value> {
    |                                                      `- error: cannot find 'DispatchQueue' in scope
199 |         return then(on: queue, { _ in }, onRejected)
200 |     }
/host/spi-builder-workspace/Promise/Promise.swift:242:60: error: cannot find 'DispatchQueue' in scope
240 |     }
241 |
242 |     private func addCallbacks(on queue: ExecutionContext = DispatchQueue.main, onFulfilled: @escaping (Value) -> Void, onRejected: @escaping (Error) -> Void) {
    |                                                            `- error: cannot find 'DispatchQueue' in scope
243 |         let callback = Callback(onFulfilled: onFulfilled, onRejected: onRejected, executionContext: queue)
244 |         lockQueue.async(flags: .barrier, execute: {
/host/spi-builder-workspace/Promise/Promise.swift:164:40: error: argument passed to call that takes no arguments
162 |     @discardableResult
163 |     public func then<NewValue>(on queue: ExecutionContext = DispatchQueue.main, _ onFulfilled: @escaping (Value) throws -> Promise<NewValue>) -> Promise<NewValue> {
164 |         return Promise<NewValue>(work: { fulfill, reject in
    |                                        `- error: argument passed to call that takes no arguments
165 |             self.addCallbacks(
166 |                 on: queue,
/host/spi-builder-workspace/Promise/Promise.swift:244:33: error: cannot infer contextual base in reference to member 'barrier'
242 |     private func addCallbacks(on queue: ExecutionContext = DispatchQueue.main, onFulfilled: @escaping (Value) -> Void, onRejected: @escaping (Error) -> Void) {
243 |         let callback = Callback(onFulfilled: onFulfilled, onRejected: onRejected, executionContext: queue)
244 |         lockQueue.async(flags: .barrier, execute: {
    |                                 `- error: cannot infer contextual base in reference to member 'barrier'
245 |             switch self.state {
246 |             case .pending(let callbacks):
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-4609320-0":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:wasm-6.1-latest swift build --swift-sdk wasm32-unknown-wasi 2>&1
wasm-6.1-latest: Pulling from finestructure/spi-images
Digest: sha256:059e0fdbe549369b902c0d423739510ddee50a4a70258d1404125eb9394ef31c
Status: Image is up to date for registry.gitlab.com/finestructure/spi-images:wasm-6.1-latest
[0/1] Planning build
Building for debugging...
[0/1] Write swift-version-24593BA9C3E375BF.txt
error: emit-module command failed with exit code 1 (use -v to see invocation)
[2/4] Emitting module Promise
/host/spi-builder-workspace/Promise/Promise+Extras.swift:144:53: error: cannot find 'DispatchQueue' in scope
142 |
143 |     @discardableResult
144 |     public func always(on queue: ExecutionContext = DispatchQueue.main, _ onComplete: @escaping () -> Void) -> Promise<Value> {
    |                                                     `- error: cannot find 'DispatchQueue' in scope
145 |         return then(on: queue, { _ in
146 |             onComplete()
/host/spi-builder-workspace/Promise/Promise.swift:18:11: error: cannot find type 'DispatchQueue' in scope
 16 | }
 17 |
 18 | extension DispatchQueue: ExecutionContext {
    |           `- error: cannot find type 'DispatchQueue' in scope
 19 |
 20 |     public func execute(_ work: @escaping () -> Void) {
/host/spi-builder-workspace/Promise/Promise.swift:29:24: error: cannot find type 'DispatchQueue' in scope
 27 |     private var valid = true
 28 |
 29 |     private var queue: DispatchQueue
    |                        `- error: cannot find type 'DispatchQueue' in scope
 30 |
 31 |     public init(queue: DispatchQueue = .main) {
/host/spi-builder-workspace/Promise/Promise.swift:31:24: error: cannot find type 'DispatchQueue' in scope
 29 |     private var queue: DispatchQueue
 30 |
 31 |     public init(queue: DispatchQueue = .main) {
    |                        `- error: cannot find type 'DispatchQueue' in scope
 32 |         self.queue = queue
 33 |     }
/host/spi-builder-workspace/Promise/Promise.swift:136:29: error: cannot find 'DispatchQueue' in scope
134 |
135 |     private var state: State<Value>
136 |     private let lockQueue = DispatchQueue(label: "promise_lock_queue", qos: .userInitiated)
    |                             `- error: cannot find 'DispatchQueue' in scope
137 |
138 |     public init() {
/host/spi-builder-workspace/Promise/Promise.swift:136:78: error: cannot infer contextual base in reference to member 'userInitiated'
134 |
135 |     private var state: State<Value>
136 |     private let lockQueue = DispatchQueue(label: "promise_lock_queue", qos: .userInitiated)
    |                                                                              `- error: cannot infer contextual base in reference to member 'userInitiated'
137 |
138 |     public init() {
/host/spi-builder-workspace/Promise/Promise.swift:150:36: error: cannot find type 'DispatchQueue' in scope
148 |     }
149 |
150 |     public convenience init(queue: DispatchQueue = DispatchQueue.global(qos: .userInitiated), work: @escaping (_ fulfill: @escaping (Value) -> Void, _ reject: @escaping (Error) -> Void) throws -> Void) {
    |                                    `- error: cannot find type 'DispatchQueue' in scope
151 |         self.init()
152 |         queue.async(execute: {
/host/spi-builder-workspace/Promise/Promise.swift:163:61: error: cannot find 'DispatchQueue' in scope
161 |     /// - note: This one is "flatMap"
162 |     @discardableResult
163 |     public func then<NewValue>(on queue: ExecutionContext = DispatchQueue.main, _ onFulfilled: @escaping (Value) throws -> Promise<NewValue>) -> Promise<NewValue> {
    |                                                             `- error: cannot find 'DispatchQueue' in scope
164 |         return Promise<NewValue>(work: { fulfill, reject in
165 |             self.addCallbacks(
/host/spi-builder-workspace/Promise/Promise.swift:181:61: error: cannot find 'DispatchQueue' in scope
179 |     /// - note: This one is "map"
180 |     @discardableResult
181 |     public func then<NewValue>(on queue: ExecutionContext = DispatchQueue.main, _ onFulfilled: @escaping (Value) throws -> NewValue) -> Promise<NewValue> {
    |                                                             `- error: cannot find 'DispatchQueue' in scope
182 |         return then(on: queue, { (value) -> Promise<NewValue> in
183 |             do {
/host/spi-builder-workspace/Promise/Promise.swift:192:51: error: cannot find 'DispatchQueue' in scope
190 |
191 |     @discardableResult
192 |     public func then(on queue: ExecutionContext = DispatchQueue.main, _ onFulfilled: @escaping (Value) -> Void, _ onRejected: @escaping (Error) -> Void = { _ in }) -> Promise<Value> {
    |                                                   `- error: cannot find 'DispatchQueue' in scope
193 |         addCallbacks(on: queue, onFulfilled: onFulfilled, onRejected: onRejected)
194 |         return self
/host/spi-builder-workspace/Promise/Promise.swift:198:54: error: cannot find 'DispatchQueue' in scope
196 |
197 |     @discardableResult
198 |     public func `catch`(on queue: ExecutionContext = DispatchQueue.main, _ onRejected: @escaping (Error) -> Void) -> Promise<Value> {
    |                                                      `- error: cannot find 'DispatchQueue' in scope
199 |         return then(on: queue, { _ in }, onRejected)
200 |     }
/host/spi-builder-workspace/Promise/Promise.swift:242:60: error: cannot find 'DispatchQueue' in scope
240 |     }
241 |
242 |     private func addCallbacks(on queue: ExecutionContext = DispatchQueue.main, onFulfilled: @escaping (Value) -> Void, onRejected: @escaping (Error) -> Void) {
    |                                                            `- error: cannot find 'DispatchQueue' in scope
243 |         let callback = Callback(onFulfilled: onFulfilled, onRejected: onRejected, executionContext: queue)
244 |         lockQueue.async(flags: .barrier, execute: {
[3/4] Compiling Promise Promise.swift
/host/spi-builder-workspace/Promise/Promise.swift:18:11: error: cannot find type 'DispatchQueue' in scope
 16 | }
 17 |
 18 | extension DispatchQueue: ExecutionContext {
    |           `- error: cannot find type 'DispatchQueue' in scope
 19 |
 20 |     public func execute(_ work: @escaping () -> Void) {
/host/spi-builder-workspace/Promise/Promise.swift:29:24: error: cannot find type 'DispatchQueue' in scope
 27 |     private var valid = true
 28 |
 29 |     private var queue: DispatchQueue
    |                        `- error: cannot find type 'DispatchQueue' in scope
 30 |
 31 |     public init(queue: DispatchQueue = .main) {
/host/spi-builder-workspace/Promise/Promise.swift:31:24: error: cannot find type 'DispatchQueue' in scope
 29 |     private var queue: DispatchQueue
 30 |
 31 |     public init(queue: DispatchQueue = .main) {
    |                        `- error: cannot find type 'DispatchQueue' in scope
 32 |         self.queue = queue
 33 |     }
/host/spi-builder-workspace/Promise/Promise.swift:136:29: error: cannot find 'DispatchQueue' in scope
134 |
135 |     private var state: State<Value>
136 |     private let lockQueue = DispatchQueue(label: "promise_lock_queue", qos: .userInitiated)
    |                             `- error: cannot find 'DispatchQueue' in scope
137 |
138 |     public init() {
/host/spi-builder-workspace/Promise/Promise.swift:136:78: error: cannot infer contextual base in reference to member 'userInitiated'
134 |
135 |     private var state: State<Value>
136 |     private let lockQueue = DispatchQueue(label: "promise_lock_queue", qos: .userInitiated)
    |                                                                              `- error: cannot infer contextual base in reference to member 'userInitiated'
137 |
138 |     public init() {
/host/spi-builder-workspace/Promise/Promise.swift:150:36: error: cannot find type 'DispatchQueue' in scope
148 |     }
149 |
150 |     public convenience init(queue: DispatchQueue = DispatchQueue.global(qos: .userInitiated), work: @escaping (_ fulfill: @escaping (Value) -> Void, _ reject: @escaping (Error) -> Void) throws -> Void) {
    |                                    `- error: cannot find type 'DispatchQueue' in scope
151 |         self.init()
152 |         queue.async(execute: {
/host/spi-builder-workspace/Promise/Promise.swift:163:61: error: cannot find 'DispatchQueue' in scope
161 |     /// - note: This one is "flatMap"
162 |     @discardableResult
163 |     public func then<NewValue>(on queue: ExecutionContext = DispatchQueue.main, _ onFulfilled: @escaping (Value) throws -> Promise<NewValue>) -> Promise<NewValue> {
    |                                                             `- error: cannot find 'DispatchQueue' in scope
164 |         return Promise<NewValue>(work: { fulfill, reject in
165 |             self.addCallbacks(
/host/spi-builder-workspace/Promise/Promise.swift:181:61: error: cannot find 'DispatchQueue' in scope
179 |     /// - note: This one is "map"
180 |     @discardableResult
181 |     public func then<NewValue>(on queue: ExecutionContext = DispatchQueue.main, _ onFulfilled: @escaping (Value) throws -> NewValue) -> Promise<NewValue> {
    |                                                             `- error: cannot find 'DispatchQueue' in scope
182 |         return then(on: queue, { (value) -> Promise<NewValue> in
183 |             do {
/host/spi-builder-workspace/Promise/Promise.swift:192:51: error: cannot find 'DispatchQueue' in scope
190 |
191 |     @discardableResult
192 |     public func then(on queue: ExecutionContext = DispatchQueue.main, _ onFulfilled: @escaping (Value) -> Void, _ onRejected: @escaping (Error) -> Void = { _ in }) -> Promise<Value> {
    |                                                   `- error: cannot find 'DispatchQueue' in scope
193 |         addCallbacks(on: queue, onFulfilled: onFulfilled, onRejected: onRejected)
194 |         return self
/host/spi-builder-workspace/Promise/Promise.swift:198:54: error: cannot find 'DispatchQueue' in scope
196 |
197 |     @discardableResult
198 |     public func `catch`(on queue: ExecutionContext = DispatchQueue.main, _ onRejected: @escaping (Error) -> Void) -> Promise<Value> {
    |                                                      `- error: cannot find 'DispatchQueue' in scope
199 |         return then(on: queue, { _ in }, onRejected)
200 |     }
/host/spi-builder-workspace/Promise/Promise.swift:242:60: error: cannot find 'DispatchQueue' in scope
240 |     }
241 |
242 |     private func addCallbacks(on queue: ExecutionContext = DispatchQueue.main, onFulfilled: @escaping (Value) -> Void, onRejected: @escaping (Error) -> Void) {
    |                                                            `- error: cannot find 'DispatchQueue' in scope
243 |         let callback = Callback(onFulfilled: onFulfilled, onRejected: onRejected, executionContext: queue)
244 |         lockQueue.async(flags: .barrier, execute: {
/host/spi-builder-workspace/Promise/Promise.swift:164:40: error: argument passed to call that takes no arguments
162 |     @discardableResult
163 |     public func then<NewValue>(on queue: ExecutionContext = DispatchQueue.main, _ onFulfilled: @escaping (Value) throws -> Promise<NewValue>) -> Promise<NewValue> {
164 |         return Promise<NewValue>(work: { fulfill, reject in
    |                                        `- error: argument passed to call that takes no arguments
165 |             self.addCallbacks(
166 |                 on: queue,
/host/spi-builder-workspace/Promise/Promise.swift:244:33: error: cannot infer contextual base in reference to member 'barrier'
242 |     private func addCallbacks(on queue: ExecutionContext = DispatchQueue.main, onFulfilled: @escaping (Value) -> Void, onRejected: @escaping (Error) -> Void) {
243 |         let callback = Callback(onFulfilled: onFulfilled, onRejected: onRejected, executionContext: queue)
244 |         lockQueue.async(flags: .barrier, execute: {
    |                                 `- error: cannot infer contextual base in reference to member 'barrier'
245 |             switch self.state {
246 |             case .pending(let callbacks):
[4/4] Compiling Promise Promise+Extras.swift
/host/spi-builder-workspace/Promise/Promise+Extras.swift:144:53: error: cannot find 'DispatchQueue' in scope
142 |
143 |     @discardableResult
144 |     public func always(on queue: ExecutionContext = DispatchQueue.main, _ onComplete: @escaping () -> Void) -> Promise<Value> {
    |                                                     `- error: cannot find 'DispatchQueue' in scope
145 |         return then(on: queue, { _ in
146 |             onComplete()
/host/spi-builder-workspace/Promise/Promise.swift:150:36: error: cannot find type 'DispatchQueue' in scope
148 |     }
149 |
150 |     public convenience init(queue: DispatchQueue = DispatchQueue.global(qos: .userInitiated), work: @escaping (_ fulfill: @escaping (Value) -> Void, _ reject: @escaping (Error) -> Void) throws -> Void) {
    |                                    `- error: cannot find type 'DispatchQueue' in scope
151 |         self.init()
152 |         queue.async(execute: {
/host/spi-builder-workspace/Promise/Promise+Extras.swift:20:35: error: argument passed to call that takes no arguments
 18 |     /// with the array of all fulfilled values.
 19 |     public static func all<T>(_ promises: [Promise<T>]) -> Promise<[T]> {
 20 |         return Promise<[T]>(work: { fulfill, reject in
    |                                   `- error: argument passed to call that takes no arguments
 21 |             guard !promises.isEmpty else { fulfill([]); return }
 22 |             for promise in promises {
/host/spi-builder-workspace/Promise/Promise+Extras.swift:38:13: error: cannot find 'DispatchQueue' in scope
 36 |     public static func delay(_ delay: TimeInterval) -> Promise<()> {
 37 |         return Promise<()>(work: { fulfill, reject in
 38 |             DispatchQueue.main.asyncAfter(deadline: .now() + delay, execute: {
    |             `- error: cannot find 'DispatchQueue' in scope
 39 |                 fulfill(())
 40 |             })
/host/spi-builder-workspace/Promise/Promise+Extras.swift:37:34: error: argument passed to call that takes no arguments
 35 |     /// - parameter delay: In seconds
 36 |     public static func delay(_ delay: TimeInterval) -> Promise<()> {
 37 |         return Promise<()>(work: { fulfill, reject in
    |                                  `- error: argument passed to call that takes no arguments
 38 |             DispatchQueue.main.asyncAfter(deadline: .now() + delay, execute: {
 39 |                 fulfill(())
/host/spi-builder-workspace/Promise/Promise+Extras.swift:38:54: error: cannot call value of non-function type 'Date'
 36 |     public static func delay(_ delay: TimeInterval) -> Promise<()> {
 37 |         return Promise<()>(work: { fulfill, reject in
 38 |             DispatchQueue.main.asyncAfter(deadline: .now() + delay, execute: {
    |                                                      `- error: cannot call value of non-function type 'Date'
 39 |                 fulfill(())
 40 |             })
/host/spi-builder-workspace/Promise/Promise+Extras.swift:46:33: error: argument passed to call that takes no arguments
 44 |     /// This promise will be rejected after a delay.
 45 |     public static func timeout<T>(_ timeout: TimeInterval) -> Promise<T> {
 46 |         return Promise<T>(work: { fulfill, reject in
    |                                 `- error: argument passed to call that takes no arguments
 47 |             delay(timeout).then({ _ in
 48 |                 reject(NSError(domain: "com.khanlou.Promise", code: -1111, userInfo: [ NSLocalizedDescriptionKey: "Timed out" ]))
/host/spi-builder-workspace/Promise/Promise+Extras.swift:56:33: error: argument passed to call that takes no arguments
 54 |     /// (as opposed to waiting for all of them, like `.all()` does).
 55 |     public static func race<T>(_ promises: [Promise<T>]) -> Promise<T> {
 56 |         return Promise<T>(work: { fulfill, reject in
    |                                 `- error: argument passed to call that takes no arguments
 57 |             guard !promises.isEmpty else { fatalError() }
 58 |             for promise in promises {
/host/spi-builder-workspace/Promise/Promise+Extras.swift:68:33: error: argument passed to call that takes no arguments
 66 |             return generate()
 67 |         }
 68 |         return Promise<T>(work: { fulfill, reject in
    |                                 `- error: argument passed to call that takes no arguments
 69 |             generate().recover({ error in
 70 |                 return self.delay(delay).then({
/host/spi-builder-workspace/Promise/Promise.swift:163:61: error: cannot find 'DispatchQueue' in scope
161 |     /// - note: This one is "flatMap"
162 |     @discardableResult
163 |     public func then<NewValue>(on queue: ExecutionContext = DispatchQueue.main, _ onFulfilled: @escaping (Value) throws -> Promise<NewValue>) -> Promise<NewValue> {
    |                                                             `- error: cannot find 'DispatchQueue' in scope
164 |         return Promise<NewValue>(work: { fulfill, reject in
165 |             self.addCallbacks(
/host/spi-builder-workspace/Promise/Promise+Extras.swift:90:38: error: argument passed to call that takes no arguments
 88 |
 89 |     public static func zip<T, U>(_ first: Promise<T>, _ second: Promise<U>) -> Promise<(T, U)> {
 90 |         return Promise<(T, U)>(work: { fulfill, reject in
    |                                      `- error: argument passed to call that takes no arguments
 91 |             let resolver: (Any) -> Void = { _ in
 92 |                 if let firstValue = first.value, let secondValue = second.value {
/host/spi-builder-workspace/Promise/Promise+Extras.swift:108:44: error: argument passed to call that takes no arguments
106 |     /// type is a tuple of 3 elements.
107 |     public static func zip<T1, T2, T3>(_ p1: Promise<T1>, _ p2: Promise<T2>, _ last: Promise<T3>) -> Promise<(T1, T2, T3)> {
108 |         return Promise<(T1, T2, T3)>(work: { (fulfill: @escaping ((T1, T2, T3)) -> Void, reject: @escaping (Error) -> Void) in
    |                                            `- error: argument passed to call that takes no arguments
109 |             let zipped: Promise<(T1, T2)> = zip(p1, p2)
110 |
/host/spi-builder-workspace/Promise/Promise+Extras.swift:124:48: error: argument passed to call that takes no arguments
122 |     /// type is a tuple of 4 elements.
123 |     public static func zip<T1, T2, T3, T4>(_ p1: Promise<T1>, _ p2: Promise<T2>, _ p3: Promise<T3>, _ last: Promise<T4>) -> Promise<(T1, T2, T3, T4)> {
124 |         return Promise<(T1, T2, T3, T4)>(work: { (fulfill: @escaping ((T1, T2, T3, T4)) -> Void, reject: @escaping (Error) -> Void) in
    |                                                `- error: argument passed to call that takes no arguments
125 |             let zipped: Promise<(T1, T2, T3)> = zip(p1, p2, p3)
126 |
/host/spi-builder-workspace/Promise/Promise+Extras.swift:153:30: error: argument passed to call that takes no arguments
151 |
152 |     public func recover(_ recovery: @escaping (Error) throws -> Promise<Value>) -> Promise<Value> {
153 |         return Promise(work: { fulfill, reject in
    |                              `- error: argument passed to call that takes no arguments
154 |             self.then(fulfill).catch({ error in
155 |                 do {
/host/spi-builder-workspace/Promise/Promise+Extras.swift:156:46: error: invalid conversion from throwing function of type '(Value) throws -> Void' to non-throwing function type '(Value) -> Void'
154 |             self.then(fulfill).catch({ error in
155 |                 do {
156 |                     try recovery(error).then(fulfill, reject)
    |                                              `- error: invalid conversion from throwing function of type '(Value) throws -> Void' to non-throwing function type '(Value) -> Void'
157 |                 } catch (let error) {
158 |                     reject(error)
/host/spi-builder-workspace/Promise/Promise.swift:181:61: error: cannot find 'DispatchQueue' in scope
179 |     /// - note: This one is "map"
180 |     @discardableResult
181 |     public func then<NewValue>(on queue: ExecutionContext = DispatchQueue.main, _ onFulfilled: @escaping (Value) throws -> NewValue) -> Promise<NewValue> {
    |                                                             `- error: cannot find 'DispatchQueue' in scope
182 |         return then(on: queue, { (value) -> Promise<NewValue> in
183 |             do {
/host/spi-builder-workspace/Promise/Promise.swift:198:54: error: cannot find 'DispatchQueue' in scope
196 |
197 |     @discardableResult
198 |     public func `catch`(on queue: ExecutionContext = DispatchQueue.main, _ onRejected: @escaping (Error) -> Void) -> Promise<Value> {
    |                                                      `- error: cannot find 'DispatchQueue' in scope
199 |         return then(on: queue, { _ in }, onRejected)
200 |     }
BUILD FAILURE 6.1 wasm