Build Information
Failed to build SocketSwift, reference 2.4.0 (36911c
), with Swift 6.1 for Wasm on 27 May 2025 09:52:06 UTC.
Build Command
bash -c docker run --pull=always --rm -v "checkouts-4606859-2":/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/BiAtoms/Socket.swift.git
Reference: 2.4.0
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/BiAtoms/Socket.swift
* tag 2.4.0 -> FETCH_HEAD
HEAD is now at 36911c1 Removed .swift_version file
Cloned https://github.com/BiAtoms/Socket.swift.git
Revision (git rev-parse @):
36911c13adfe12859ed43dcba878052b1897fcd3
SUCCESS checkout https://github.com/BiAtoms/Socket.swift.git at 2.4.0
========================================
Build
========================================
Selected platform: wasm
Swift version: 6.1
Building package at path: $PWD
https://github.com/BiAtoms/Socket.swift.git
https://github.com/BiAtoms/Socket.swift.git
WARNING: environment variable SUPPRESS_SWIFT_6_FLAGS is not set
{
"dependencies" : [
{
"identity" : "clibressl",
"requirement" : {
"range" : [
{
"lower_bound" : "3.1.0",
"upper_bound" : "4.0.0"
}
]
},
"type" : "sourceControl",
"url" : "https://github.com/Zewo/CLibreSSL.git"
}
],
"manifest_display_name" : "SocketSwift",
"name" : "SocketSwift",
"path" : "/host/spi-builder-workspace",
"platforms" : [
],
"products" : [
{
"name" : "SocketSwift",
"targets" : [
"SocketSwift"
],
"type" : {
"library" : [
"automatic"
]
}
}
],
"targets" : [
{
"c99name" : "SocketSwiftTests",
"module_type" : "SwiftTarget",
"name" : "SocketSwiftTests",
"path" : "Tests/SocketSwiftTests",
"sources" : [
"SocketSwiftTests.swift"
],
"target_dependencies" : [
"SocketSwift"
],
"type" : "test"
},
{
"c99name" : "SocketSwift",
"module_type" : "SwiftTarget",
"name" : "SocketSwift",
"path" : "Sources",
"product_memberships" : [
"SocketSwift"
],
"sources" : [
"Error.swift",
"Family.swift",
"OS.swift",
"Option.swift",
"Protocol.swift",
"Socket.swift",
"TLS.swift",
"Type.swift"
],
"type" : "library"
}
],
"tools_version" : "4.0"
}
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-4606859-2":/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
Fetching https://github.com/Zewo/CLibreSSL.git
[1/39] Fetching clibressl
Fetched https://github.com/Zewo/CLibreSSL.git from cache (0.21s)
Computing version for https://github.com/Zewo/CLibreSSL.git
Computed https://github.com/Zewo/CLibreSSL.git at 3.1.0 (1.21s)
Creating working copy for https://github.com/Zewo/CLibreSSL.git
Working copy of https://github.com/Zewo/CLibreSSL.git resolved at 3.1.0
warning: 'clibressl': ignoring declared target(s) 'CLibreSSL' in the system package
warning: 'spi-builder-workspace': dependency 'clibressl' is not used by any target
warning: you may be able to install libtls using your system-packager:
apt-get install libressl
warning: you may be able to install libtls using your system-packager:
apt-get install libressl
Building for debugging...
[0/2] Write sources
[1/2] Write swift-version-24593BA9C3E375BF.txt
[3/10] Compiling SocketSwift Family.swift
/host/spi-builder-workspace/Sources/Family.swift:16:27: warning: static property 'inet' is not concurrency-safe because non-'Sendable' type 'Socket.Family' may have shared mutable state; this is an error in the Swift 6 language mode
10 |
11 | extension Socket {
12 | public struct Family: RawRepresentable {
| `- note: consider making struct 'Family' conform to the 'Sendable' protocol
13 | public let rawValue: Int32
14 | public init(rawValue: Int32) { self.rawValue = rawValue }
15 |
16 | public static let inet = Family(rawValue: AF_INET)
| |- warning: static property 'inet' is not concurrency-safe because non-'Sendable' type 'Socket.Family' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'inet' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
17 | public static let inet6 = Family(rawValue: AF_INET6)
18 | public static let unix = Family(rawValue: AF_UNIX)
/host/spi-builder-workspace/Sources/Family.swift:17:27: warning: static property 'inet6' is not concurrency-safe because non-'Sendable' type 'Socket.Family' may have shared mutable state; this is an error in the Swift 6 language mode
10 |
11 | extension Socket {
12 | public struct Family: RawRepresentable {
| `- note: consider making struct 'Family' conform to the 'Sendable' protocol
13 | public let rawValue: Int32
14 | public init(rawValue: Int32) { self.rawValue = rawValue }
15 |
16 | public static let inet = Family(rawValue: AF_INET)
17 | public static let inet6 = Family(rawValue: AF_INET6)
| |- warning: static property 'inet6' is not concurrency-safe because non-'Sendable' type 'Socket.Family' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'inet6' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
18 | public static let unix = Family(rawValue: AF_UNIX)
19 | }
/host/spi-builder-workspace/Sources/Family.swift:18:27: warning: static property 'unix' is not concurrency-safe because non-'Sendable' type 'Socket.Family' may have shared mutable state; this is an error in the Swift 6 language mode
10 |
11 | extension Socket {
12 | public struct Family: RawRepresentable {
| `- note: consider making struct 'Family' conform to the 'Sendable' protocol
13 | public let rawValue: Int32
14 | public init(rawValue: Int32) { self.rawValue = rawValue }
:
16 | public static let inet = Family(rawValue: AF_INET)
17 | public static let inet6 = Family(rawValue: AF_INET6)
18 | public static let unix = Family(rawValue: AF_UNIX)
| |- warning: static property 'unix' is not concurrency-safe because non-'Sendable' type 'Socket.Family' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'unix' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
19 | }
20 | }
error: emit-module command failed with exit code 1 (use -v to see invocation)
[4/11] Emitting module SocketSwift
/host/spi-builder-workspace/Sources/Family.swift:16:27: warning: static property 'inet' is not concurrency-safe because non-'Sendable' type 'Socket.Family' may have shared mutable state; this is an error in the Swift 6 language mode
10 |
11 | extension Socket {
12 | public struct Family: RawRepresentable {
| `- note: consider making struct 'Family' conform to the 'Sendable' protocol
13 | public let rawValue: Int32
14 | public init(rawValue: Int32) { self.rawValue = rawValue }
15 |
16 | public static let inet = Family(rawValue: AF_INET)
| |- warning: static property 'inet' is not concurrency-safe because non-'Sendable' type 'Socket.Family' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'inet' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
17 | public static let inet6 = Family(rawValue: AF_INET6)
18 | public static let unix = Family(rawValue: AF_UNIX)
/host/spi-builder-workspace/Sources/Family.swift:17:27: warning: static property 'inet6' is not concurrency-safe because non-'Sendable' type 'Socket.Family' may have shared mutable state; this is an error in the Swift 6 language mode
10 |
11 | extension Socket {
12 | public struct Family: RawRepresentable {
| `- note: consider making struct 'Family' conform to the 'Sendable' protocol
13 | public let rawValue: Int32
14 | public init(rawValue: Int32) { self.rawValue = rawValue }
15 |
16 | public static let inet = Family(rawValue: AF_INET)
17 | public static let inet6 = Family(rawValue: AF_INET6)
| |- warning: static property 'inet6' is not concurrency-safe because non-'Sendable' type 'Socket.Family' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'inet6' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
18 | public static let unix = Family(rawValue: AF_UNIX)
19 | }
/host/spi-builder-workspace/Sources/Family.swift:18:27: warning: static property 'unix' is not concurrency-safe because non-'Sendable' type 'Socket.Family' may have shared mutable state; this is an error in the Swift 6 language mode
10 |
11 | extension Socket {
12 | public struct Family: RawRepresentable {
| `- note: consider making struct 'Family' conform to the 'Sendable' protocol
13 | public let rawValue: Int32
14 | public init(rawValue: Int32) { self.rawValue = rawValue }
:
16 | public static let inet = Family(rawValue: AF_INET)
17 | public static let inet6 = Family(rawValue: AF_INET6)
18 | public static let unix = Family(rawValue: AF_UNIX)
| |- warning: static property 'unix' is not concurrency-safe because non-'Sendable' type 'Socket.Family' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'unix' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
19 | }
20 | }
/host/spi-builder-workspace/Sources/OS.swift:31:24: error: cannot find 'Darwin' in scope
29 | static let write = Glibc.write
30 | #else
31 | static let close = Darwin.close
| `- error: cannot find 'Darwin' in scope
32 | static let bind = Darwin.bind
33 | static let connect = Darwin.connect
/host/spi-builder-workspace/Sources/OS.swift:32:23: error: cannot find 'Darwin' in scope
30 | #else
31 | static let close = Darwin.close
32 | static let bind = Darwin.bind
| `- error: cannot find 'Darwin' in scope
33 | static let connect = Darwin.connect
34 | static let listen = Darwin.listen
/host/spi-builder-workspace/Sources/OS.swift:33:26: error: cannot find 'Darwin' in scope
31 | static let close = Darwin.close
32 | static let bind = Darwin.bind
33 | static let connect = Darwin.connect
| `- error: cannot find 'Darwin' in scope
34 | static let listen = Darwin.listen
35 | static let accept = Darwin.accept
/host/spi-builder-workspace/Sources/OS.swift:34:25: error: cannot find 'Darwin' in scope
32 | static let bind = Darwin.bind
33 | static let connect = Darwin.connect
34 | static let listen = Darwin.listen
| `- error: cannot find 'Darwin' in scope
35 | static let accept = Darwin.accept
36 | static let write = Darwin.write
/host/spi-builder-workspace/Sources/OS.swift:35:25: error: cannot find 'Darwin' in scope
33 | static let connect = Darwin.connect
34 | static let listen = Darwin.listen
35 | static let accept = Darwin.accept
| `- error: cannot find 'Darwin' in scope
36 | static let write = Darwin.write
37 | #endif
/host/spi-builder-workspace/Sources/OS.swift:36:24: error: cannot find 'Darwin' in scope
34 | static let listen = Darwin.listen
35 | static let accept = Darwin.accept
36 | static let write = Darwin.write
| `- error: cannot find 'Darwin' in scope
37 | #endif
38 | }
/host/spi-builder-workspace/Sources/Option.swift:24:61: error: cannot find 'SO_REUSEADDR' in scope
22 | extension Socket.BaseOption {
23 | private typealias Option = Socket.Option
24 | public static let reuseAddress = Option<Bool>(rawValue: SO_REUSEADDR)
| `- error: cannot find 'SO_REUSEADDR' in scope
25 | public static let reusePort = Option<Bool>(rawValue: SO_REUSEPORT)
26 | public static let keepAlive = Option<Bool>(rawValue: SO_KEEPALIVE)
/host/spi-builder-workspace/Sources/Option.swift:25:58: error: cannot find 'SO_REUSEPORT' in scope
23 | private typealias Option = Socket.Option
24 | public static let reuseAddress = Option<Bool>(rawValue: SO_REUSEADDR)
25 | public static let reusePort = Option<Bool>(rawValue: SO_REUSEPORT)
| `- error: cannot find 'SO_REUSEPORT' in scope
26 | public static let keepAlive = Option<Bool>(rawValue: SO_KEEPALIVE)
27 | public static let debug = Option<Bool>(rawValue: SO_DEBUG)
/host/spi-builder-workspace/Sources/Option.swift:26:58: error: cannot find 'SO_KEEPALIVE' in scope
24 | public static let reuseAddress = Option<Bool>(rawValue: SO_REUSEADDR)
25 | public static let reusePort = Option<Bool>(rawValue: SO_REUSEPORT)
26 | public static let keepAlive = Option<Bool>(rawValue: SO_KEEPALIVE)
| `- error: cannot find 'SO_KEEPALIVE' in scope
27 | public static let debug = Option<Bool>(rawValue: SO_DEBUG)
28 | public static let dontRoute = Option<Bool>(rawValue: SO_DONTROUTE)
/host/spi-builder-workspace/Sources/Option.swift:27:54: error: cannot find 'SO_DEBUG' in scope
25 | public static let reusePort = Option<Bool>(rawValue: SO_REUSEPORT)
26 | public static let keepAlive = Option<Bool>(rawValue: SO_KEEPALIVE)
27 | public static let debug = Option<Bool>(rawValue: SO_DEBUG)
| `- error: cannot find 'SO_DEBUG' in scope
28 | public static let dontRoute = Option<Bool>(rawValue: SO_DONTROUTE)
29 | public static let broadcast = Option<Bool>(rawValue: SO_BROADCAST)
/host/spi-builder-workspace/Sources/Option.swift:28:58: error: cannot find 'SO_DONTROUTE' in scope
26 | public static let keepAlive = Option<Bool>(rawValue: SO_KEEPALIVE)
27 | public static let debug = Option<Bool>(rawValue: SO_DEBUG)
28 | public static let dontRoute = Option<Bool>(rawValue: SO_DONTROUTE)
| `- error: cannot find 'SO_DONTROUTE' in scope
29 | public static let broadcast = Option<Bool>(rawValue: SO_BROADCAST)
30 | public static let sendBufferSize = Option<Int32>(rawValue: SO_SNDBUF)
/host/spi-builder-workspace/Sources/Option.swift:29:58: error: cannot find 'SO_BROADCAST' in scope
27 | public static let debug = Option<Bool>(rawValue: SO_DEBUG)
28 | public static let dontRoute = Option<Bool>(rawValue: SO_DONTROUTE)
29 | public static let broadcast = Option<Bool>(rawValue: SO_BROADCAST)
| `- error: cannot find 'SO_BROADCAST' in scope
30 | public static let sendBufferSize = Option<Int32>(rawValue: SO_SNDBUF)
31 | public static let receiveBufferSize = Option<Int32>(rawValue: SO_RCVBUF)
/host/spi-builder-workspace/Sources/Option.swift:30:64: error: cannot find 'SO_SNDBUF' in scope
28 | public static let dontRoute = Option<Bool>(rawValue: SO_DONTROUTE)
29 | public static let broadcast = Option<Bool>(rawValue: SO_BROADCAST)
30 | public static let sendBufferSize = Option<Int32>(rawValue: SO_SNDBUF)
| `- error: cannot find 'SO_SNDBUF' in scope
31 | public static let receiveBufferSize = Option<Int32>(rawValue: SO_RCVBUF)
32 | public static let sendLowWaterMark = Option<Int32>(rawValue: SO_SNDLOWAT)
/host/spi-builder-workspace/Sources/Option.swift:31:67: error: cannot find 'SO_RCVBUF' in scope
29 | public static let broadcast = Option<Bool>(rawValue: SO_BROADCAST)
30 | public static let sendBufferSize = Option<Int32>(rawValue: SO_SNDBUF)
31 | public static let receiveBufferSize = Option<Int32>(rawValue: SO_RCVBUF)
| `- error: cannot find 'SO_RCVBUF' in scope
32 | public static let sendLowWaterMark = Option<Int32>(rawValue: SO_SNDLOWAT)
33 | public static let receiveLowWaterMark = Option<Int32>(rawValue: SO_RCVLOWAT)
/host/spi-builder-workspace/Sources/Option.swift:32:66: error: cannot find 'SO_SNDLOWAT' in scope
30 | public static let sendBufferSize = Option<Int32>(rawValue: SO_SNDBUF)
31 | public static let receiveBufferSize = Option<Int32>(rawValue: SO_RCVBUF)
32 | public static let sendLowWaterMark = Option<Int32>(rawValue: SO_SNDLOWAT)
| `- error: cannot find 'SO_SNDLOWAT' in scope
33 | public static let receiveLowWaterMark = Option<Int32>(rawValue: SO_RCVLOWAT)
34 | public static let sendTimeout = Option<TimeValue>(rawValue: SO_SNDTIMEO)
/host/spi-builder-workspace/Sources/Option.swift:33:69: error: cannot find 'SO_RCVLOWAT' in scope
31 | public static let receiveBufferSize = Option<Int32>(rawValue: SO_RCVBUF)
32 | public static let sendLowWaterMark = Option<Int32>(rawValue: SO_SNDLOWAT)
33 | public static let receiveLowWaterMark = Option<Int32>(rawValue: SO_RCVLOWAT)
| `- error: cannot find 'SO_RCVLOWAT' in scope
34 | public static let sendTimeout = Option<TimeValue>(rawValue: SO_SNDTIMEO)
35 | public static let receiveTimeout = Option<TimeValue>(rawValue: SO_RCVTIMEO)
/host/spi-builder-workspace/Sources/Option.swift:34:65: error: cannot find 'SO_SNDTIMEO' in scope
32 | public static let sendLowWaterMark = Option<Int32>(rawValue: SO_SNDLOWAT)
33 | public static let receiveLowWaterMark = Option<Int32>(rawValue: SO_RCVLOWAT)
34 | public static let sendTimeout = Option<TimeValue>(rawValue: SO_SNDTIMEO)
| `- error: cannot find 'SO_SNDTIMEO' in scope
35 | public static let receiveTimeout = Option<TimeValue>(rawValue: SO_RCVTIMEO)
36 |
/host/spi-builder-workspace/Sources/Option.swift:35:68: error: cannot find 'SO_RCVTIMEO' in scope
33 | public static let receiveLowWaterMark = Option<Int32>(rawValue: SO_RCVLOWAT)
34 | public static let sendTimeout = Option<TimeValue>(rawValue: SO_SNDTIMEO)
35 | public static let receiveTimeout = Option<TimeValue>(rawValue: SO_RCVTIMEO)
| `- error: cannot find 'SO_RCVTIMEO' in scope
36 |
37 | #if !os(Linux)
/host/spi-builder-workspace/Sources/Option.swift:38:61: error: cannot find 'SO_NOSIGPIPE' in scope
36 |
37 | #if !os(Linux)
38 | public static let noSignalPipe = Option<Bool>(rawValue: SO_NOSIGPIPE)
| `- error: cannot find 'SO_NOSIGPIPE' in scope
39 | #endif
40 |
/host/spi-builder-workspace/Sources/Protocol.swift:17:27: warning: static property 'tcp' is not concurrency-safe because non-'Sendable' type 'Socket.`Protocol`' may have shared mutable state; this is an error in the Swift 6 language mode
11 |
12 | extension Socket {
13 | public struct `Protocol`: RawRepresentable {
| `- note: consider making struct 'Protocol' conform to the 'Sendable' protocol
14 | public let rawValue: Int32
15 | public init(rawValue: Int32) { self.rawValue = rawValue }
16 |
17 | public static let tcp = Protocol(rawValue: Int32(IPPROTO_TCP))
| |- warning: static property 'tcp' is not concurrency-safe because non-'Sendable' type 'Socket.`Protocol`' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'tcp' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
18 | public static let udp = Protocol(rawValue: Int32(IPPROTO_UDP))
19 | }
/host/spi-builder-workspace/Sources/Protocol.swift:18:27: warning: static property 'udp' is not concurrency-safe because non-'Sendable' type 'Socket.`Protocol`' may have shared mutable state; this is an error in the Swift 6 language mode
11 |
12 | extension Socket {
13 | public struct `Protocol`: RawRepresentable {
| `- note: consider making struct 'Protocol' conform to the 'Sendable' protocol
14 | public let rawValue: Int32
15 | public init(rawValue: Int32) { self.rawValue = rawValue }
16 |
17 | public static let tcp = Protocol(rawValue: Int32(IPPROTO_TCP))
18 | public static let udp = Protocol(rawValue: Int32(IPPROTO_UDP))
| |- warning: static property 'udp' is not concurrency-safe because non-'Sendable' type 'Socket.`Protocol`' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'udp' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
19 | }
20 | }
/host/spi-builder-workspace/Sources/Type.swift:24:51: error: cannot find 'SOCK_STREAM' in scope
22 | public init(rawValue: Int32) { self.rawValue = rawValue }
23 |
24 | public static let stream = Type(rawValue: SOCK_STREAM)
| `- error: cannot find 'SOCK_STREAM' in scope
25 | public static let datagram = Type(rawValue: SOCK_DGRAM)
26 | public static let raw = Type(rawValue: SOCK_RAW)
/host/spi-builder-workspace/Sources/Socket.swift:118:39: error: cannot find 'SOMAXCONN' in scope
116 | }
117 |
118 | open func listen(backlog: Int32 = SOMAXCONN) throws {
| `- error: cannot find 'SOMAXCONN' in scope
119 | try ing { OS.listen(fileDescriptor, backlog) }
120 | }
/host/spi-builder-workspace/Sources/Socket.swift:132:27: warning: static property 'read' is not concurrency-safe because non-'Sendable' type 'Socket.WaitOption' may have shared mutable state; this is an error in the Swift 6 language mode
126 | }
127 |
128 | public struct WaitOption: OptionSet {
| `- note: consider making struct 'WaitOption' conform to the 'Sendable' protocol
129 | public let rawValue: Int32
130 | public init(rawValue: Int32) { self.rawValue = rawValue }
131 |
132 | public static let read = WaitOption(rawValue: POLLIN)
| |- warning: static property 'read' is not concurrency-safe because non-'Sendable' type 'Socket.WaitOption' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'read' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
133 | public static let write = WaitOption(rawValue: POLLOUT)
134 | }
/host/spi-builder-workspace/Sources/Socket.swift:133:27: warning: static property 'write' is not concurrency-safe because non-'Sendable' type 'Socket.WaitOption' may have shared mutable state; this is an error in the Swift 6 language mode
126 | }
127 |
128 | public struct WaitOption: OptionSet {
| `- note: consider making struct 'WaitOption' conform to the 'Sendable' protocol
129 | public let rawValue: Int32
130 | public init(rawValue: Int32) { self.rawValue = rawValue }
131 |
132 | public static let read = WaitOption(rawValue: POLLIN)
133 | public static let write = WaitOption(rawValue: POLLOUT)
| |- warning: static property 'write' is not concurrency-safe because non-'Sendable' type 'Socket.WaitOption' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'write' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
134 | }
135 |
/host/spi-builder-workspace/Sources/Socket.swift:211:5: warning: non-'@objc' class method in extensions cannot be overridden; use 'public' instead
209 |
210 | extension Socket {
211 | open class func tcpListening(port: Port, address: String? = nil, maxPendingConnection: Int32 = SOMAXCONN) throws -> Self {
| `- warning: non-'@objc' class method in extensions cannot be overridden; use 'public' instead
212 |
213 | let socket = try self.init(.inet)
/host/spi-builder-workspace/Sources/Socket.swift:211:100: error: cannot find 'SOMAXCONN' in scope
209 |
210 | extension Socket {
211 | open class func tcpListening(port: Port, address: String? = nil, maxPendingConnection: Int32 = SOMAXCONN) throws -> Self {
| `- error: cannot find 'SOMAXCONN' in scope
212 |
213 | let socket = try self.init(.inet)
/host/spi-builder-workspace/Sources/Socket.swift:224:5: warning: non-'@objc' instance method in extensions cannot be overridden; use 'public' instead
222 |
223 | extension Socket {
224 | open func write(_ bytes: [Byte]) throws {
| `- warning: non-'@objc' instance method in extensions cannot be overridden; use 'public' instead
225 | try self.write(bytes, length: bytes.count)
226 | }
/host/spi-builder-workspace/Sources/TLS.swift:16:36: error: cannot find type 'CFArray' in scope
14 | public typealias Certificate = (cert: Data, key: Data)
15 | #else
16 | public typealias Certificate = CFArray
| `- error: cannot find type 'CFArray' in scope
17 | #endif
18 |
/host/spi-builder-workspace/Sources/TLS.swift:32:27: error: cannot find type 'SSLContext' in scope
30 | #endif
31 |
32 | internal var context: SSLContext
| `- error: cannot find type 'SSLContext' in scope
33 | public struct Configuration {
34 | public var peer: String?
/host/spi-builder-workspace/Sources/TLS.swift:165:5: warning: non-'@objc' class method in extensions cannot be overridden; use 'public' instead
163 | extension TLS {
164 | #if !os(Linux)
165 | open class func importCert(at path: URL, password: String) -> Certificate {
| `- warning: non-'@objc' class method in extensions cannot be overridden; use 'public' instead
166 | let data = FileManager.default.contents(atPath: path.path)! as NSData
167 | let options: NSDictionary = [kSecImportExportPassphrase: password]
/host/spi-builder-workspace/Sources/TLS.swift:202:123: error: cannot find type 'OSStatus' in scope
200 |
201 | // Based on https://stackoverflow.com/a/23611166/5555803
202 | private func sslWrite(connection: SSLConnectionRef, data: UnsafeRawPointer, dataLength: UnsafeMutablePointer<Int>) -> OSStatus {
| `- error: cannot find type 'OSStatus' in scope
203 | let fd = connection.assumingMemoryBound(to: FileDescriptor.self).pointee
204 | let bytesToWrite = dataLength.pointee
/host/spi-builder-workspace/Sources/TLS.swift:202:39: error: cannot find type 'SSLConnectionRef' in scope
200 |
201 | // Based on https://stackoverflow.com/a/23611166/5555803
202 | private func sslWrite(connection: SSLConnectionRef, data: UnsafeRawPointer, dataLength: UnsafeMutablePointer<Int>) -> OSStatus {
| `- error: cannot find type 'SSLConnectionRef' in scope
203 | let fd = connection.assumingMemoryBound(to: FileDescriptor.self).pointee
204 | let bytesToWrite = dataLength.pointee
/host/spi-builder-workspace/Sources/TLS.swift:220:129: error: cannot find type 'OSStatus' in scope
218 |
219 | // Based on https://stackoverflow.com/a/23611166/5555803
220 | private func sslRead(connection: SSLConnectionRef, data: UnsafeMutableRawPointer, dataLength: UnsafeMutablePointer<Int>) -> OSStatus {
| `- error: cannot find type 'OSStatus' in scope
221 | let fd = connection.assumingMemoryBound(to: FileDescriptor.self).pointee
222 | let bytesToRead = dataLength.pointee
/host/spi-builder-workspace/Sources/TLS.swift:220:38: error: cannot find type 'SSLConnectionRef' in scope
218 |
219 | // Based on https://stackoverflow.com/a/23611166/5555803
220 | private func sslRead(connection: SSLConnectionRef, data: UnsafeMutableRawPointer, dataLength: UnsafeMutablePointer<Int>) -> OSStatus {
| `- error: cannot find type 'SSLConnectionRef' in scope
221 | let fd = connection.assumingMemoryBound(to: FileDescriptor.self).pointee
222 | let bytesToRead = dataLength.pointee
/host/spi-builder-workspace/Sources/Type.swift:25:53: error: cannot find 'SOCK_DGRAM' in scope
23 |
24 | public static let stream = Type(rawValue: SOCK_STREAM)
25 | public static let datagram = Type(rawValue: SOCK_DGRAM)
| `- error: cannot find 'SOCK_DGRAM' in scope
26 | public static let raw = Type(rawValue: SOCK_RAW)
27 | public static let reliablyDeliveredMessage = Type(rawValue: SOCK_RDM)
/host/spi-builder-workspace/Sources/Type.swift:26:48: error: cannot find 'SOCK_RAW' in scope
24 | public static let stream = Type(rawValue: SOCK_STREAM)
25 | public static let datagram = Type(rawValue: SOCK_DGRAM)
26 | public static let raw = Type(rawValue: SOCK_RAW)
| `- error: cannot find 'SOCK_RAW' in scope
27 | public static let reliablyDeliveredMessage = Type(rawValue: SOCK_RDM)
28 | public static let sequencedPacketStream = Type(rawValue: SOCK_SEQPACKET)
/host/spi-builder-workspace/Sources/Type.swift:27:69: error: cannot find 'SOCK_RDM' in scope
25 | public static let datagram = Type(rawValue: SOCK_DGRAM)
26 | public static let raw = Type(rawValue: SOCK_RAW)
27 | public static let reliablyDeliveredMessage = Type(rawValue: SOCK_RDM)
| `- error: cannot find 'SOCK_RDM' in scope
28 | public static let sequencedPacketStream = Type(rawValue: SOCK_SEQPACKET)
29 | }
/host/spi-builder-workspace/Sources/Type.swift:28:67: error: cannot find 'SOCK_SEQPACKET' in scope
26 | public static let raw = Type(rawValue: SOCK_RAW)
27 | public static let reliablyDeliveredMessage = Type(rawValue: SOCK_RDM)
28 | public static let sequencedPacketStream = Type(rawValue: SOCK_SEQPACKET)
| `- error: cannot find 'SOCK_SEQPACKET' in scope
29 | }
30 | }
[5/11] Compiling SocketSwift Error.swift
[6/11] Compiling SocketSwift OS.swift
/host/spi-builder-workspace/Sources/OS.swift:31:24: error: cannot find 'Darwin' in scope
29 | static let write = Glibc.write
30 | #else
31 | static let close = Darwin.close
| `- error: cannot find 'Darwin' in scope
32 | static let bind = Darwin.bind
33 | static let connect = Darwin.connect
/host/spi-builder-workspace/Sources/OS.swift:32:23: error: cannot find 'Darwin' in scope
30 | #else
31 | static let close = Darwin.close
32 | static let bind = Darwin.bind
| `- error: cannot find 'Darwin' in scope
33 | static let connect = Darwin.connect
34 | static let listen = Darwin.listen
/host/spi-builder-workspace/Sources/OS.swift:33:26: error: cannot find 'Darwin' in scope
31 | static let close = Darwin.close
32 | static let bind = Darwin.bind
33 | static let connect = Darwin.connect
| `- error: cannot find 'Darwin' in scope
34 | static let listen = Darwin.listen
35 | static let accept = Darwin.accept
/host/spi-builder-workspace/Sources/OS.swift:34:25: error: cannot find 'Darwin' in scope
32 | static let bind = Darwin.bind
33 | static let connect = Darwin.connect
34 | static let listen = Darwin.listen
| `- error: cannot find 'Darwin' in scope
35 | static let accept = Darwin.accept
36 | static let write = Darwin.write
/host/spi-builder-workspace/Sources/OS.swift:35:25: error: cannot find 'Darwin' in scope
33 | static let connect = Darwin.connect
34 | static let listen = Darwin.listen
35 | static let accept = Darwin.accept
| `- error: cannot find 'Darwin' in scope
36 | static let write = Darwin.write
37 | #endif
/host/spi-builder-workspace/Sources/OS.swift:36:24: error: cannot find 'Darwin' in scope
34 | static let listen = Darwin.listen
35 | static let accept = Darwin.accept
36 | static let write = Darwin.write
| `- error: cannot find 'Darwin' in scope
37 | #endif
38 | }
[7/11] Compiling SocketSwift Protocol.swift
/host/spi-builder-workspace/Sources/Protocol.swift:17:27: warning: static property 'tcp' is not concurrency-safe because non-'Sendable' type 'Socket.`Protocol`' may have shared mutable state; this is an error in the Swift 6 language mode
11 |
12 | extension Socket {
13 | public struct `Protocol`: RawRepresentable {
| `- note: consider making struct 'Protocol' conform to the 'Sendable' protocol
14 | public let rawValue: Int32
15 | public init(rawValue: Int32) { self.rawValue = rawValue }
16 |
17 | public static let tcp = Protocol(rawValue: Int32(IPPROTO_TCP))
| |- warning: static property 'tcp' is not concurrency-safe because non-'Sendable' type 'Socket.`Protocol`' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'tcp' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
18 | public static let udp = Protocol(rawValue: Int32(IPPROTO_UDP))
19 | }
/host/spi-builder-workspace/Sources/Protocol.swift:18:27: warning: static property 'udp' is not concurrency-safe because non-'Sendable' type 'Socket.`Protocol`' may have shared mutable state; this is an error in the Swift 6 language mode
11 |
12 | extension Socket {
13 | public struct `Protocol`: RawRepresentable {
| `- note: consider making struct 'Protocol' conform to the 'Sendable' protocol
14 | public let rawValue: Int32
15 | public init(rawValue: Int32) { self.rawValue = rawValue }
16 |
17 | public static let tcp = Protocol(rawValue: Int32(IPPROTO_TCP))
18 | public static let udp = Protocol(rawValue: Int32(IPPROTO_UDP))
| |- warning: static property 'udp' is not concurrency-safe because non-'Sendable' type 'Socket.`Protocol`' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'udp' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
19 | }
20 | }
[8/11] Compiling SocketSwift Socket.swift
/host/spi-builder-workspace/Sources/Type.swift:24:51: error: cannot find 'SOCK_STREAM' in scope
22 | public init(rawValue: Int32) { self.rawValue = rawValue }
23 |
24 | public static let stream = Type(rawValue: SOCK_STREAM)
| `- error: cannot find 'SOCK_STREAM' in scope
25 | public static let datagram = Type(rawValue: SOCK_DGRAM)
26 | public static let raw = Type(rawValue: SOCK_RAW)
/host/spi-builder-workspace/Sources/Socket.swift:118:39: error: cannot find 'SOMAXCONN' in scope
116 | }
117 |
118 | open func listen(backlog: Int32 = SOMAXCONN) throws {
| `- error: cannot find 'SOMAXCONN' in scope
119 | try ing { OS.listen(fileDescriptor, backlog) }
120 | }
/host/spi-builder-workspace/Sources/Socket.swift:132:27: warning: static property 'read' is not concurrency-safe because non-'Sendable' type 'Socket.WaitOption' may have shared mutable state; this is an error in the Swift 6 language mode
126 | }
127 |
128 | public struct WaitOption: OptionSet {
| `- note: consider making struct 'WaitOption' conform to the 'Sendable' protocol
129 | public let rawValue: Int32
130 | public init(rawValue: Int32) { self.rawValue = rawValue }
131 |
132 | public static let read = WaitOption(rawValue: POLLIN)
| |- warning: static property 'read' is not concurrency-safe because non-'Sendable' type 'Socket.WaitOption' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'read' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
133 | public static let write = WaitOption(rawValue: POLLOUT)
134 | }
/host/spi-builder-workspace/Sources/Socket.swift:133:27: warning: static property 'write' is not concurrency-safe because non-'Sendable' type 'Socket.WaitOption' may have shared mutable state; this is an error in the Swift 6 language mode
126 | }
127 |
128 | public struct WaitOption: OptionSet {
| `- note: consider making struct 'WaitOption' conform to the 'Sendable' protocol
129 | public let rawValue: Int32
130 | public init(rawValue: Int32) { self.rawValue = rawValue }
131 |
132 | public static let read = WaitOption(rawValue: POLLIN)
133 | public static let write = WaitOption(rawValue: POLLOUT)
| |- warning: static property 'write' is not concurrency-safe because non-'Sendable' type 'Socket.WaitOption' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'write' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
134 | }
135 |
/host/spi-builder-workspace/Sources/Socket.swift:211:5: warning: non-'@objc' class method in extensions cannot be overridden; use 'public' instead
209 |
210 | extension Socket {
211 | open class func tcpListening(port: Port, address: String? = nil, maxPendingConnection: Int32 = SOMAXCONN) throws -> Self {
| `- warning: non-'@objc' class method in extensions cannot be overridden; use 'public' instead
212 |
213 | let socket = try self.init(.inet)
/host/spi-builder-workspace/Sources/Socket.swift:211:100: error: cannot find 'SOMAXCONN' in scope
209 |
210 | extension Socket {
211 | open class func tcpListening(port: Port, address: String? = nil, maxPendingConnection: Int32 = SOMAXCONN) throws -> Self {
| `- error: cannot find 'SOMAXCONN' in scope
212 |
213 | let socket = try self.init(.inet)
/host/spi-builder-workspace/Sources/Socket.swift:224:5: warning: non-'@objc' instance method in extensions cannot be overridden; use 'public' instead
222 |
223 | extension Socket {
224 | open func write(_ bytes: [Byte]) throws {
| `- warning: non-'@objc' instance method in extensions cannot be overridden; use 'public' instead
225 | try self.write(bytes, length: bytes.count)
226 | }
/host/spi-builder-workspace/Sources/Socket.swift:26:41: error: cannot find 'socket' in scope
24 |
25 | required public init(_ family: Family, type: Type = .stream, protocol: Protocol = .tcp) throws {
26 | self.fileDescriptor = try ing { socket(family.rawValue, type.rawValue, `protocol`.rawValue) }
| `- error: cannot find 'socket' in scope
27 | }
28 |
/host/spi-builder-workspace/Sources/OS.swift:31:24: error: cannot find 'Darwin' in scope
29 | static let write = Glibc.write
30 | #else
31 | static let close = Darwin.close
| `- error: cannot find 'Darwin' in scope
32 | static let bind = Darwin.bind
33 | static let connect = Darwin.connect
/host/spi-builder-workspace/Sources/OS.swift:36:24: error: cannot find 'Darwin' in scope
34 | static let listen = Darwin.listen
35 | static let accept = Darwin.accept
36 | static let write = Darwin.write
| `- error: cannot find 'Darwin' in scope
37 | #endif
38 | }
/host/spi-builder-workspace/Sources/Socket.swift:97:19: error: cannot find 'setsockopt' in scope
95 | var state: Any = value is Bool ? (value as! Bool == true ? 1 : 0) : value
96 |
97 | try ing { setsockopt(fileDescriptor, SOL_SOCKET, option.rawValue, &state, socklen_t(size)) }
| `- error: cannot find 'setsockopt' in scope
98 | }
99 |
/host/spi-builder-workspace/Sources/OS.swift:32:23: error: cannot find 'Darwin' in scope
30 | #else
31 | static let close = Darwin.close
32 | static let bind = Darwin.bind
| `- error: cannot find 'Darwin' in scope
33 | static let connect = Darwin.connect
34 | static let listen = Darwin.listen
/host/spi-builder-workspace/Sources/OS.swift:33:26: error: cannot find 'Darwin' in scope
31 | static let close = Darwin.close
32 | static let bind = Darwin.bind
33 | static let connect = Darwin.connect
| `- error: cannot find 'Darwin' in scope
34 | static let listen = Darwin.listen
35 | static let accept = Darwin.accept
/host/spi-builder-workspace/Sources/OS.swift:34:25: error: cannot find 'Darwin' in scope
32 | static let bind = Darwin.bind
33 | static let connect = Darwin.connect
34 | static let listen = Darwin.listen
| `- error: cannot find 'Darwin' in scope
35 | static let accept = Darwin.accept
36 | static let write = Darwin.write
/host/spi-builder-workspace/Sources/OS.swift:35:25: error: cannot find 'Darwin' in scope
33 | static let connect = Darwin.connect
34 | static let listen = Darwin.listen
35 | static let accept = Darwin.accept
| `- error: cannot find 'Darwin' in scope
36 | static let write = Darwin.write
37 | #endif
/host/spi-builder-workspace/Sources/Socket.swift:168:21: error: cannot find 'addrinfo' in scope
166 | /// - Throws: Domain name not resolved
167 | open func addresses(for host: String, port: Port) throws -> [SocketAddress] {
168 | var hints = addrinfo()
| `- error: cannot find 'addrinfo' in scope
169 |
170 | //TODO: set correct values of current socket
/host/spi-builder-workspace/Sources/Socket.swift:175:41: error: cannot find type 'addrinfo' in scope
173 | hints.ai_protocol = Protocol.tcp.rawValue
174 |
175 | var addrs: UnsafeMutablePointer<addrinfo>?
| `- error: cannot find type 'addrinfo' in scope
176 | if getaddrinfo(host, String(port), &hints, &addrs) != 0 {
177 | // unable to resolve
/host/spi-builder-workspace/Sources/Socket.swift:176:12: error: cannot find 'getaddrinfo' in scope
174 |
175 | var addrs: UnsafeMutablePointer<addrinfo>?
176 | if getaddrinfo(host, String(port), &hints, &addrs) != 0 {
| `- error: cannot find 'getaddrinfo' in scope
177 | // unable to resolve
178 | throw Error(errno: 11) //TODO: fix this thing
/host/spi-builder-workspace/Sources/Socket.swift:180:17: error: cannot find 'freeaddrinfo' in scope
178 | throw Error(errno: 11) //TODO: fix this thing
179 | }
180 | defer { freeaddrinfo(addrs) }
| `- error: cannot find 'freeaddrinfo' in scope
181 |
182 | var result: [SocketAddress] = []
/host/spi-builder-workspace/Sources/Socket.swift:183:51: error: cannot infer type of closure parameter '$0' without a type annotation
181 |
182 | var result: [SocketAddress] = []
183 | for addr in sequence(first: addrs!, next: { $0.pointee.ai_next }) {
| `- error: cannot infer type of closure parameter '$0' without a type annotation
184 | result.append(addr.pointee.ai_addr.pointee)
185 | }
/host/spi-builder-workspace/Sources/Socket.swift:202:19: warning: initialization of 'UnsafeMutableRawPointer' results in a dangling pointer
200 | var address = sockaddr_in()
201 | var len = socklen_t(MemoryLayout.size(ofValue: address))
202 | let ptr = UnsafeMutableRawPointer(&address).assumingMemoryBound(to: sockaddr.self)
| | |- note: implicit argument conversion from 'sockaddr_in' to 'UnsafeMutableRawPointer' produces a pointer valid only for the duration of the call to 'init(_:)'
| | `- note: use 'withUnsafeMutableBytes' in order to explicitly convert argument to buffer pointer valid for a defined scope
| `- warning: initialization of 'UnsafeMutableRawPointer' results in a dangling pointer
203 |
204 | try ing { getsockname(fileDescriptor, ptr, &len) }
/host/spi-builder-workspace/Sources/Socket.swift:204:19: error: cannot find 'getsockname' in scope
202 | let ptr = UnsafeMutableRawPointer(&address).assumingMemoryBound(to: sockaddr.self)
203 |
204 | try ing { getsockname(fileDescriptor, ptr, &len) }
| `- error: cannot find 'getsockname' in scope
205 |
206 | return Port(address.sin_port.bigEndian)
/host/spi-builder-workspace/Sources/Option.swift:24:61: error: cannot find 'SO_REUSEADDR' in scope
22 | extension Socket.BaseOption {
23 | private typealias Option = Socket.Option
24 | public static let reuseAddress = Option<Bool>(rawValue: SO_REUSEADDR)
| `- error: cannot find 'SO_REUSEADDR' in scope
25 | public static let reusePort = Option<Bool>(rawValue: SO_REUSEPORT)
26 | public static let keepAlive = Option<Bool>(rawValue: SO_KEEPALIVE)
/host/spi-builder-workspace/Sources/Socket.swift:233:18: error: value of type 'sockaddr_in' has no member 'sin_len'
231 | var addr = sockaddr_in() //no need to memset 0. Swift does it
232 | #if !os(Linux)
233 | addr.sin_len = UInt8(MemoryLayout<sockaddr_in>.stride)
| `- error: value of type 'sockaddr_in' has no member 'sin_len'
234 | #endif
235 | addr.sin_family = sa_family_t(AF_INET)
/host/spi-builder-workspace/Sources/Socket.swift:255:45: error: cannot convert value of type 'Int32' to expected argument type 'Int64'
253 | let milliseconds = Int32(milliseconds)
254 | #endif
255 | self.init(tv_sec: seconds, tv_usec: microseconds + milliseconds * 1000)
| `- error: cannot convert value of type 'Int32' to expected argument type 'Int64'
256 | }
257 | }
/host/spi-builder-workspace/Sources/Socket.swift:255:60: error: cannot convert value of type 'Int32' to expected argument type 'Int64'
253 | let milliseconds = Int32(milliseconds)
254 | #endif
255 | self.init(tv_sec: seconds, tv_usec: microseconds + milliseconds * 1000)
| `- error: cannot convert value of type 'Int32' to expected argument type 'Int64'
256 | }
257 | }
/host/spi-builder-workspace/Sources/Socket.swift:255:27: error: cannot convert value of type 'Int' to expected argument type 'time_t' (aka 'Int64')
253 | let milliseconds = Int32(milliseconds)
254 | #endif
255 | self.init(tv_sec: seconds, tv_usec: microseconds + milliseconds * 1000)
| `- error: cannot convert value of type 'Int' to expected argument type 'time_t' (aka 'Int64')
256 | }
257 | }
[9/11] Compiling SocketSwift Option.swift
/host/spi-builder-workspace/Sources/Option.swift:24:61: error: cannot find 'SO_REUSEADDR' in scope
22 | extension Socket.BaseOption {
23 | private typealias Option = Socket.Option
24 | public static let reuseAddress = Option<Bool>(rawValue: SO_REUSEADDR)
| `- error: cannot find 'SO_REUSEADDR' in scope
25 | public static let reusePort = Option<Bool>(rawValue: SO_REUSEPORT)
26 | public static let keepAlive = Option<Bool>(rawValue: SO_KEEPALIVE)
/host/spi-builder-workspace/Sources/Option.swift:25:58: error: cannot find 'SO_REUSEPORT' in scope
23 | private typealias Option = Socket.Option
24 | public static let reuseAddress = Option<Bool>(rawValue: SO_REUSEADDR)
25 | public static let reusePort = Option<Bool>(rawValue: SO_REUSEPORT)
| `- error: cannot find 'SO_REUSEPORT' in scope
26 | public static let keepAlive = Option<Bool>(rawValue: SO_KEEPALIVE)
27 | public static let debug = Option<Bool>(rawValue: SO_DEBUG)
/host/spi-builder-workspace/Sources/Option.swift:26:58: error: cannot find 'SO_KEEPALIVE' in scope
24 | public static let reuseAddress = Option<Bool>(rawValue: SO_REUSEADDR)
25 | public static let reusePort = Option<Bool>(rawValue: SO_REUSEPORT)
26 | public static let keepAlive = Option<Bool>(rawValue: SO_KEEPALIVE)
| `- error: cannot find 'SO_KEEPALIVE' in scope
27 | public static let debug = Option<Bool>(rawValue: SO_DEBUG)
28 | public static let dontRoute = Option<Bool>(rawValue: SO_DONTROUTE)
/host/spi-builder-workspace/Sources/Option.swift:27:54: error: cannot find 'SO_DEBUG' in scope
25 | public static let reusePort = Option<Bool>(rawValue: SO_REUSEPORT)
26 | public static let keepAlive = Option<Bool>(rawValue: SO_KEEPALIVE)
27 | public static let debug = Option<Bool>(rawValue: SO_DEBUG)
| `- error: cannot find 'SO_DEBUG' in scope
28 | public static let dontRoute = Option<Bool>(rawValue: SO_DONTROUTE)
29 | public static let broadcast = Option<Bool>(rawValue: SO_BROADCAST)
/host/spi-builder-workspace/Sources/Option.swift:28:58: error: cannot find 'SO_DONTROUTE' in scope
26 | public static let keepAlive = Option<Bool>(rawValue: SO_KEEPALIVE)
27 | public static let debug = Option<Bool>(rawValue: SO_DEBUG)
28 | public static let dontRoute = Option<Bool>(rawValue: SO_DONTROUTE)
| `- error: cannot find 'SO_DONTROUTE' in scope
29 | public static let broadcast = Option<Bool>(rawValue: SO_BROADCAST)
30 | public static let sendBufferSize = Option<Int32>(rawValue: SO_SNDBUF)
/host/spi-builder-workspace/Sources/Option.swift:29:58: error: cannot find 'SO_BROADCAST' in scope
27 | public static let debug = Option<Bool>(rawValue: SO_DEBUG)
28 | public static let dontRoute = Option<Bool>(rawValue: SO_DONTROUTE)
29 | public static let broadcast = Option<Bool>(rawValue: SO_BROADCAST)
| `- error: cannot find 'SO_BROADCAST' in scope
30 | public static let sendBufferSize = Option<Int32>(rawValue: SO_SNDBUF)
31 | public static let receiveBufferSize = Option<Int32>(rawValue: SO_RCVBUF)
/host/spi-builder-workspace/Sources/Option.swift:30:64: error: cannot find 'SO_SNDBUF' in scope
28 | public static let dontRoute = Option<Bool>(rawValue: SO_DONTROUTE)
29 | public static let broadcast = Option<Bool>(rawValue: SO_BROADCAST)
30 | public static let sendBufferSize = Option<Int32>(rawValue: SO_SNDBUF)
| `- error: cannot find 'SO_SNDBUF' in scope
31 | public static let receiveBufferSize = Option<Int32>(rawValue: SO_RCVBUF)
32 | public static let sendLowWaterMark = Option<Int32>(rawValue: SO_SNDLOWAT)
/host/spi-builder-workspace/Sources/Option.swift:31:67: error: cannot find 'SO_RCVBUF' in scope
29 | public static let broadcast = Option<Bool>(rawValue: SO_BROADCAST)
30 | public static let sendBufferSize = Option<Int32>(rawValue: SO_SNDBUF)
31 | public static let receiveBufferSize = Option<Int32>(rawValue: SO_RCVBUF)
| `- error: cannot find 'SO_RCVBUF' in scope
32 | public static let sendLowWaterMark = Option<Int32>(rawValue: SO_SNDLOWAT)
33 | public static let receiveLowWaterMark = Option<Int32>(rawValue: SO_RCVLOWAT)
/host/spi-builder-workspace/Sources/Option.swift:32:66: error: cannot find 'SO_SNDLOWAT' in scope
30 | public static let sendBufferSize = Option<Int32>(rawValue: SO_SNDBUF)
31 | public static let receiveBufferSize = Option<Int32>(rawValue: SO_RCVBUF)
32 | public static let sendLowWaterMark = Option<Int32>(rawValue: SO_SNDLOWAT)
| `- error: cannot find 'SO_SNDLOWAT' in scope
33 | public static let receiveLowWaterMark = Option<Int32>(rawValue: SO_RCVLOWAT)
34 | public static let sendTimeout = Option<TimeValue>(rawValue: SO_SNDTIMEO)
/host/spi-builder-workspace/Sources/Option.swift:33:69: error: cannot find 'SO_RCVLOWAT' in scope
31 | public static let receiveBufferSize = Option<Int32>(rawValue: SO_RCVBUF)
32 | public static let sendLowWaterMark = Option<Int32>(rawValue: SO_SNDLOWAT)
33 | public static let receiveLowWaterMark = Option<Int32>(rawValue: SO_RCVLOWAT)
| `- error: cannot find 'SO_RCVLOWAT' in scope
34 | public static let sendTimeout = Option<TimeValue>(rawValue: SO_SNDTIMEO)
35 | public static let receiveTimeout = Option<TimeValue>(rawValue: SO_RCVTIMEO)
/host/spi-builder-workspace/Sources/Option.swift:34:65: error: cannot find 'SO_SNDTIMEO' in scope
32 | public static let sendLowWaterMark = Option<Int32>(rawValue: SO_SNDLOWAT)
33 | public static let receiveLowWaterMark = Option<Int32>(rawValue: SO_RCVLOWAT)
34 | public static let sendTimeout = Option<TimeValue>(rawValue: SO_SNDTIMEO)
| `- error: cannot find 'SO_SNDTIMEO' in scope
35 | public static let receiveTimeout = Option<TimeValue>(rawValue: SO_RCVTIMEO)
36 |
/host/spi-builder-workspace/Sources/Option.swift:35:68: error: cannot find 'SO_RCVTIMEO' in scope
33 | public static let receiveLowWaterMark = Option<Int32>(rawValue: SO_RCVLOWAT)
34 | public static let sendTimeout = Option<TimeValue>(rawValue: SO_SNDTIMEO)
35 | public static let receiveTimeout = Option<TimeValue>(rawValue: SO_RCVTIMEO)
| `- error: cannot find 'SO_RCVTIMEO' in scope
36 |
37 | #if !os(Linux)
/host/spi-builder-workspace/Sources/Option.swift:38:61: error: cannot find 'SO_NOSIGPIPE' in scope
36 |
37 | #if !os(Linux)
38 | public static let noSignalPipe = Option<Bool>(rawValue: SO_NOSIGPIPE)
| `- error: cannot find 'SO_NOSIGPIPE' in scope
39 | #endif
40 |
[10/11] Compiling SocketSwift TLS.swift
/host/spi-builder-workspace/Sources/TLS.swift:16:36: error: cannot find type 'CFArray' in scope
14 | public typealias Certificate = (cert: Data, key: Data)
15 | #else
16 | public typealias Certificate = CFArray
| `- error: cannot find type 'CFArray' in scope
17 | #endif
18 |
/host/spi-builder-workspace/Sources/TLS.swift:32:27: error: cannot find type 'SSLContext' in scope
30 | #endif
31 |
32 | internal var context: SSLContext
| `- error: cannot find type 'SSLContext' in scope
33 | public struct Configuration {
34 | public var peer: String?
/host/spi-builder-workspace/Sources/TLS.swift:165:5: warning: non-'@objc' class method in extensions cannot be overridden; use 'public' instead
163 | extension TLS {
164 | #if !os(Linux)
165 | open class func importCert(at path: URL, password: String) -> Certificate {
| `- warning: non-'@objc' class method in extensions cannot be overridden; use 'public' instead
166 | let data = FileManager.default.contents(atPath: path.path)! as NSData
167 | let options: NSDictionary = [kSecImportExportPassphrase: password]
/host/spi-builder-workspace/Sources/TLS.swift:202:123: error: cannot find type 'OSStatus' in scope
200 |
201 | // Based on https://stackoverflow.com/a/23611166/5555803
202 | private func sslWrite(connection: SSLConnectionRef, data: UnsafeRawPointer, dataLength: UnsafeMutablePointer<Int>) -> OSStatus {
| `- error: cannot find type 'OSStatus' in scope
203 | let fd = connection.assumingMemoryBound(to: FileDescriptor.self).pointee
204 | let bytesToWrite = dataLength.pointee
/host/spi-builder-workspace/Sources/TLS.swift:202:39: error: cannot find type 'SSLConnectionRef' in scope
200 |
201 | // Based on https://stackoverflow.com/a/23611166/5555803
202 | private func sslWrite(connection: SSLConnectionRef, data: UnsafeRawPointer, dataLength: UnsafeMutablePointer<Int>) -> OSStatus {
| `- error: cannot find type 'SSLConnectionRef' in scope
203 | let fd = connection.assumingMemoryBound(to: FileDescriptor.self).pointee
204 | let bytesToWrite = dataLength.pointee
/host/spi-builder-workspace/Sources/TLS.swift:220:129: error: cannot find type 'OSStatus' in scope
218 |
219 | // Based on https://stackoverflow.com/a/23611166/5555803
220 | private func sslRead(connection: SSLConnectionRef, data: UnsafeMutableRawPointer, dataLength: UnsafeMutablePointer<Int>) -> OSStatus {
| `- error: cannot find type 'OSStatus' in scope
221 | let fd = connection.assumingMemoryBound(to: FileDescriptor.self).pointee
222 | let bytesToRead = dataLength.pointee
/host/spi-builder-workspace/Sources/TLS.swift:220:38: error: cannot find type 'SSLConnectionRef' in scope
218 |
219 | // Based on https://stackoverflow.com/a/23611166/5555803
220 | private func sslRead(connection: SSLConnectionRef, data: UnsafeMutableRawPointer, dataLength: UnsafeMutablePointer<Int>) -> OSStatus {
| `- error: cannot find type 'SSLConnectionRef' in scope
221 | let fd = connection.assumingMemoryBound(to: FileDescriptor.self).pointee
222 | let bytesToRead = dataLength.pointee
/host/spi-builder-workspace/Sources/TLS.swift:93:28: error: cannot find 'SSLCreateContext' in scope
91 | }
92 | #else
93 | self.context = SSLCreateContext(nil, config.isServer ? .serverSide : .clientSide, .streamType)!
| `- error: cannot find 'SSLCreateContext' in scope
94 | self.fdPtr.pointee = fd
95 |
/host/spi-builder-workspace/Sources/TLS.swift:93:45: error: 'nil' requires a contextual type
91 | }
92 | #else
93 | self.context = SSLCreateContext(nil, config.isServer ? .serverSide : .clientSide, .streamType)!
| `- error: 'nil' requires a contextual type
94 | self.fdPtr.pointee = fd
95 |
/host/spi-builder-workspace/Sources/TLS.swift:93:69: error: cannot infer contextual base in reference to member 'serverSide'
91 | }
92 | #else
93 | self.context = SSLCreateContext(nil, config.isServer ? .serverSide : .clientSide, .streamType)!
| `- error: cannot infer contextual base in reference to member 'serverSide'
94 | self.fdPtr.pointee = fd
95 |
/host/spi-builder-workspace/Sources/TLS.swift:93:96: error: cannot infer contextual base in reference to member 'streamType'
91 | }
92 | #else
93 | self.context = SSLCreateContext(nil, config.isServer ? .serverSide : .clientSide, .streamType)!
| `- error: cannot infer contextual base in reference to member 'streamType'
94 | self.fdPtr.pointee = fd
95 |
/host/spi-builder-workspace/Sources/TLS.swift:96:13: error: cannot find 'SSLSetIOFuncs' in scope
94 | self.fdPtr.pointee = fd
95 |
96 | SSLSetIOFuncs(context, sslRead, sslWrite)
| `- error: cannot find 'SSLSetIOFuncs' in scope
97 | SSLSetConnection(context, fdPtr)
98 |
/host/spi-builder-workspace/Sources/TLS.swift:97:13: error: cannot find 'SSLSetConnection' in scope
95 |
96 | SSLSetIOFuncs(context, sslRead, sslWrite)
97 | SSLSetConnection(context, fdPtr)
| `- error: cannot find 'SSLSetConnection' in scope
98 |
99 | if config.isServer {
/host/spi-builder-workspace/Sources/TLS.swift:100:17: error: cannot find 'SSLSetCertificate' in scope
98 |
99 | if config.isServer {
100 | SSLSetCertificate(context, config.certificate)
| `- error: cannot find 'SSLSetCertificate' in scope
101 | } else {
102 | if let peerName = config.peer {
/host/spi-builder-workspace/Sources/TLS.swift:103:21: error: cannot find 'SSLSetPeerDomainName' in scope
101 | } else {
102 | if let peerName = config.peer {
103 | SSLSetPeerDomainName(context, peerName, peerName.count)
| `- error: cannot find 'SSLSetPeerDomainName' in scope
104 | }
105 |
/host/spi-builder-workspace/Sources/TLS.swift:107:21: error: cannot find 'SSLSetSessionOption' in scope
105 |
106 | if config.allowSelfSigned {
107 | SSLSetSessionOption(context, .breakOnServerAuth, true)
| `- error: cannot find 'SSLSetSessionOption' in scope
108 | }
109 | }
/host/spi-builder-workspace/Sources/TLS.swift:107:51: error: cannot infer contextual base in reference to member 'breakOnServerAuth'
105 |
106 | if config.allowSelfSigned {
107 | SSLSetSessionOption(context, .breakOnServerAuth, true)
| `- error: cannot infer contextual base in reference to member 'breakOnServerAuth'
108 | }
109 | }
/host/spi-builder-workspace/Sources/TLS.swift:117:25: error: cannot find type 'OSStatus' in scope
115 | try ing { tls_handshake(context) }
116 | #else
117 | var status: OSStatus = -1
| `- error: cannot find type 'OSStatus' in scope
118 | repeat {
119 | status = SSLHandshake(context)
/host/spi-builder-workspace/Sources/TLS.swift:119:26: error: cannot find 'SSLHandshake' in scope
117 | var status: OSStatus = -1
118 | repeat {
119 | status = SSLHandshake(context)
| `- error: cannot find 'SSLHandshake' in scope
120 | } while status == errSSLWouldBlock
121 | if status != noErr && status != errSSLPeerAuthCompleted {
/host/spi-builder-workspace/Sources/TLS.swift:120:31: error: cannot find 'errSSLWouldBlock' in scope
118 | repeat {
119 | status = SSLHandshake(context)
120 | } while status == errSSLWouldBlock
| `- error: cannot find 'errSSLWouldBlock' in scope
121 | if status != noErr && status != errSSLPeerAuthCompleted {
122 | // print(status, SecCopyErrorMessageString(status, nil)!)
/host/spi-builder-workspace/Sources/TLS.swift:121:26: error: cannot find 'noErr' in scope
119 | status = SSLHandshake(context)
120 | } while status == errSSLWouldBlock
121 | if status != noErr && status != errSSLPeerAuthCompleted {
| `- error: cannot find 'noErr' in scope
122 | // print(status, SecCopyErrorMessageString(status, nil)!)
123 | try ing { -1 } // throw
/host/spi-builder-workspace/Sources/TLS.swift:121:45: error: cannot find 'errSSLPeerAuthCompleted' in scope
119 | status = SSLHandshake(context)
120 | } while status == errSSLWouldBlock
121 | if status != noErr && status != errSSLPeerAuthCompleted {
| `- error: cannot find 'errSSLPeerAuthCompleted' in scope
122 | // print(status, SecCopyErrorMessageString(status, nil)!)
123 | try ing { -1 } // throw
/host/spi-builder-workspace/Sources/TLS.swift:133:16: error: cannot find 'SSLWrite' in scope
131 | #else
132 | var written = 0
133 | if SSLWrite(context, buffer, size, &written) != noErr {
| `- error: cannot find 'SSLWrite' in scope
134 | try ing { -1 } // throw
135 | }
/host/spi-builder-workspace/Sources/TLS.swift:133:61: error: cannot find 'noErr' in scope
131 | #else
132 | var written = 0
133 | if SSLWrite(context, buffer, size, &written) != noErr {
| `- error: cannot find 'noErr' in scope
134 | try ing { -1 } // throw
135 | }
/host/spi-builder-workspace/Sources/TLS.swift:145:16: error: cannot find 'SSLRead' in scope
143 | #else
144 | var received = 0
145 | if SSLRead(context, buffer, size, &received) != noErr {
| `- error: cannot find 'SSLRead' in scope
146 | try ing { -1 } // throw errno
147 | }
/host/spi-builder-workspace/Sources/TLS.swift:145:61: error: cannot find 'noErr' in scope
143 | #else
144 | var received = 0
145 | if SSLRead(context, buffer, size, &received) != noErr {
| `- error: cannot find 'noErr' in scope
146 | try ing { -1 } // throw errno
147 | }
/host/spi-builder-workspace/Sources/TLS.swift:157:13: error: cannot find 'SSLClose' in scope
155 | tls_free(context);
156 | #else
157 | SSLClose(context)
| `- error: cannot find 'SSLClose' in scope
158 | fdPtr.deallocate()
159 | #endif
/host/spi-builder-workspace/Sources/TLS.swift:167:38: error: cannot find 'kSecImportExportPassphrase' in scope
165 | open class func importCert(at path: URL, password: String) -> Certificate {
166 | let data = FileManager.default.contents(atPath: path.path)! as NSData
167 | let options: NSDictionary = [kSecImportExportPassphrase: password]
| `- error: cannot find 'kSecImportExportPassphrase' in scope
168 |
169 | var items: CFArray?
/host/spi-builder-workspace/Sources/TLS.swift:169:20: error: cannot find type 'CFArray' in scope
167 | let options: NSDictionary = [kSecImportExportPassphrase: password]
168 |
169 | var items: CFArray?
| `- error: cannot find type 'CFArray' in scope
170 | let status = SecPKCS12Import(data, options, &items)
171 | assert(status == noErr)
/host/spi-builder-workspace/Sources/TLS.swift:170:22: error: cannot find 'SecPKCS12Import' in scope
168 |
169 | var items: CFArray?
170 | let status = SecPKCS12Import(data, options, &items)
| `- error: cannot find 'SecPKCS12Import' in scope
171 | assert(status == noErr)
172 | let dictionary = (items! as [AnyObject])[0]
/host/spi-builder-workspace/Sources/TLS.swift:171:26: error: cannot find 'noErr' in scope
169 | var items: CFArray?
170 | let status = SecPKCS12Import(data, options, &items)
171 | assert(status == noErr)
| `- error: cannot find 'noErr' in scope
172 | let dictionary = (items! as [AnyObject])[0]
173 | let secIdentity = dictionary.value(forKey: kSecImportItemIdentity as String)!
/host/spi-builder-workspace/Sources/TLS.swift:173:52: error: cannot find 'kSecImportItemIdentity' in scope
171 | assert(status == noErr)
172 | let dictionary = (items! as [AnyObject])[0]
173 | let secIdentity = dictionary.value(forKey: kSecImportItemIdentity as String)!
| `- error: cannot find 'kSecImportItemIdentity' in scope
174 | let ccerts = dictionary.value(forKey: kSecImportItemCertChain as String) as! [SecCertificate]
175 |
/host/spi-builder-workspace/Sources/TLS.swift:174:47: error: cannot find 'kSecImportItemCertChain' in scope
172 | let dictionary = (items! as [AnyObject])[0]
173 | let secIdentity = dictionary.value(forKey: kSecImportItemIdentity as String)!
174 | let ccerts = dictionary.value(forKey: kSecImportItemCertChain as String) as! [SecCertificate]
| `- error: cannot find 'kSecImportItemCertChain' in scope
175 |
176 | let certs = [secIdentity] + ccerts.dropFirst().map { $0 as Any }
/host/spi-builder-workspace/Sources/TLS.swift:174:87: error: cannot find type 'SecCertificate' in scope
172 | let dictionary = (items! as [AnyObject])[0]
173 | let secIdentity = dictionary.value(forKey: kSecImportItemIdentity as String)!
174 | let ccerts = dictionary.value(forKey: kSecImportItemCertChain as String) as! [SecCertificate]
| `- error: cannot find type 'SecCertificate' in scope
175 |
176 | let certs = [secIdentity] + ccerts.dropFirst().map { $0 as Any }
/host/spi-builder-workspace/Sources/OS.swift:36:24: error: cannot find 'Darwin' in scope
34 | static let listen = Darwin.listen
35 | static let accept = Darwin.accept
36 | static let write = Darwin.write
| `- error: cannot find 'Darwin' in scope
37 | #endif
38 | }
[11/11] Compiling SocketSwift Type.swift
/host/spi-builder-workspace/Sources/Type.swift:24:51: error: cannot find 'SOCK_STREAM' in scope
22 | public init(rawValue: Int32) { self.rawValue = rawValue }
23 |
24 | public static let stream = Type(rawValue: SOCK_STREAM)
| `- error: cannot find 'SOCK_STREAM' in scope
25 | public static let datagram = Type(rawValue: SOCK_DGRAM)
26 | public static let raw = Type(rawValue: SOCK_RAW)
/host/spi-builder-workspace/Sources/Type.swift:25:53: error: cannot find 'SOCK_DGRAM' in scope
23 |
24 | public static let stream = Type(rawValue: SOCK_STREAM)
25 | public static let datagram = Type(rawValue: SOCK_DGRAM)
| `- error: cannot find 'SOCK_DGRAM' in scope
26 | public static let raw = Type(rawValue: SOCK_RAW)
27 | public static let reliablyDeliveredMessage = Type(rawValue: SOCK_RDM)
/host/spi-builder-workspace/Sources/Type.swift:26:48: error: cannot find 'SOCK_RAW' in scope
24 | public static let stream = Type(rawValue: SOCK_STREAM)
25 | public static let datagram = Type(rawValue: SOCK_DGRAM)
26 | public static let raw = Type(rawValue: SOCK_RAW)
| `- error: cannot find 'SOCK_RAW' in scope
27 | public static let reliablyDeliveredMessage = Type(rawValue: SOCK_RDM)
28 | public static let sequencedPacketStream = Type(rawValue: SOCK_SEQPACKET)
/host/spi-builder-workspace/Sources/Type.swift:27:69: error: cannot find 'SOCK_RDM' in scope
25 | public static let datagram = Type(rawValue: SOCK_DGRAM)
26 | public static let raw = Type(rawValue: SOCK_RAW)
27 | public static let reliablyDeliveredMessage = Type(rawValue: SOCK_RDM)
| `- error: cannot find 'SOCK_RDM' in scope
28 | public static let sequencedPacketStream = Type(rawValue: SOCK_SEQPACKET)
29 | }
/host/spi-builder-workspace/Sources/Type.swift:28:67: error: cannot find 'SOCK_SEQPACKET' in scope
26 | public static let raw = Type(rawValue: SOCK_RAW)
27 | public static let reliablyDeliveredMessage = Type(rawValue: SOCK_RDM)
28 | public static let sequencedPacketStream = Type(rawValue: SOCK_SEQPACKET)
| `- error: cannot find 'SOCK_SEQPACKET' in scope
29 | }
30 | }
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-4606859-2":/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
warning: 'clibressl': ignoring declared target(s) 'CLibreSSL' in the system package
warning: 'spi-builder-workspace': dependency 'clibressl' is not used by any target
warning: you may be able to install libtls using your system-packager:
apt-get install libressl
warning: you may be able to install libtls using your system-packager:
apt-get install libressl
[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/9] Emitting module SocketSwift
/host/spi-builder-workspace/Sources/OS.swift:31:24: error: cannot find 'Darwin' in scope
29 | static let write = Glibc.write
30 | #else
31 | static let close = Darwin.close
| `- error: cannot find 'Darwin' in scope
32 | static let bind = Darwin.bind
33 | static let connect = Darwin.connect
/host/spi-builder-workspace/Sources/OS.swift:32:23: error: cannot find 'Darwin' in scope
30 | #else
31 | static let close = Darwin.close
32 | static let bind = Darwin.bind
| `- error: cannot find 'Darwin' in scope
33 | static let connect = Darwin.connect
34 | static let listen = Darwin.listen
/host/spi-builder-workspace/Sources/OS.swift:33:26: error: cannot find 'Darwin' in scope
31 | static let close = Darwin.close
32 | static let bind = Darwin.bind
33 | static let connect = Darwin.connect
| `- error: cannot find 'Darwin' in scope
34 | static let listen = Darwin.listen
35 | static let accept = Darwin.accept
/host/spi-builder-workspace/Sources/OS.swift:34:25: error: cannot find 'Darwin' in scope
32 | static let bind = Darwin.bind
33 | static let connect = Darwin.connect
34 | static let listen = Darwin.listen
| `- error: cannot find 'Darwin' in scope
35 | static let accept = Darwin.accept
36 | static let write = Darwin.write
/host/spi-builder-workspace/Sources/OS.swift:35:25: error: cannot find 'Darwin' in scope
33 | static let connect = Darwin.connect
34 | static let listen = Darwin.listen
35 | static let accept = Darwin.accept
| `- error: cannot find 'Darwin' in scope
36 | static let write = Darwin.write
37 | #endif
/host/spi-builder-workspace/Sources/OS.swift:36:24: error: cannot find 'Darwin' in scope
34 | static let listen = Darwin.listen
35 | static let accept = Darwin.accept
36 | static let write = Darwin.write
| `- error: cannot find 'Darwin' in scope
37 | #endif
38 | }
/host/spi-builder-workspace/Sources/Option.swift:24:61: error: cannot find 'SO_REUSEADDR' in scope
22 | extension Socket.BaseOption {
23 | private typealias Option = Socket.Option
24 | public static let reuseAddress = Option<Bool>(rawValue: SO_REUSEADDR)
| `- error: cannot find 'SO_REUSEADDR' in scope
25 | public static let reusePort = Option<Bool>(rawValue: SO_REUSEPORT)
26 | public static let keepAlive = Option<Bool>(rawValue: SO_KEEPALIVE)
/host/spi-builder-workspace/Sources/Option.swift:25:58: error: cannot find 'SO_REUSEPORT' in scope
23 | private typealias Option = Socket.Option
24 | public static let reuseAddress = Option<Bool>(rawValue: SO_REUSEADDR)
25 | public static let reusePort = Option<Bool>(rawValue: SO_REUSEPORT)
| `- error: cannot find 'SO_REUSEPORT' in scope
26 | public static let keepAlive = Option<Bool>(rawValue: SO_KEEPALIVE)
27 | public static let debug = Option<Bool>(rawValue: SO_DEBUG)
/host/spi-builder-workspace/Sources/Option.swift:26:58: error: cannot find 'SO_KEEPALIVE' in scope
24 | public static let reuseAddress = Option<Bool>(rawValue: SO_REUSEADDR)
25 | public static let reusePort = Option<Bool>(rawValue: SO_REUSEPORT)
26 | public static let keepAlive = Option<Bool>(rawValue: SO_KEEPALIVE)
| `- error: cannot find 'SO_KEEPALIVE' in scope
27 | public static let debug = Option<Bool>(rawValue: SO_DEBUG)
28 | public static let dontRoute = Option<Bool>(rawValue: SO_DONTROUTE)
/host/spi-builder-workspace/Sources/Option.swift:27:54: error: cannot find 'SO_DEBUG' in scope
25 | public static let reusePort = Option<Bool>(rawValue: SO_REUSEPORT)
26 | public static let keepAlive = Option<Bool>(rawValue: SO_KEEPALIVE)
27 | public static let debug = Option<Bool>(rawValue: SO_DEBUG)
| `- error: cannot find 'SO_DEBUG' in scope
28 | public static let dontRoute = Option<Bool>(rawValue: SO_DONTROUTE)
29 | public static let broadcast = Option<Bool>(rawValue: SO_BROADCAST)
/host/spi-builder-workspace/Sources/Option.swift:28:58: error: cannot find 'SO_DONTROUTE' in scope
26 | public static let keepAlive = Option<Bool>(rawValue: SO_KEEPALIVE)
27 | public static let debug = Option<Bool>(rawValue: SO_DEBUG)
28 | public static let dontRoute = Option<Bool>(rawValue: SO_DONTROUTE)
| `- error: cannot find 'SO_DONTROUTE' in scope
29 | public static let broadcast = Option<Bool>(rawValue: SO_BROADCAST)
30 | public static let sendBufferSize = Option<Int32>(rawValue: SO_SNDBUF)
/host/spi-builder-workspace/Sources/Option.swift:29:58: error: cannot find 'SO_BROADCAST' in scope
27 | public static let debug = Option<Bool>(rawValue: SO_DEBUG)
28 | public static let dontRoute = Option<Bool>(rawValue: SO_DONTROUTE)
29 | public static let broadcast = Option<Bool>(rawValue: SO_BROADCAST)
| `- error: cannot find 'SO_BROADCAST' in scope
30 | public static let sendBufferSize = Option<Int32>(rawValue: SO_SNDBUF)
31 | public static let receiveBufferSize = Option<Int32>(rawValue: SO_RCVBUF)
/host/spi-builder-workspace/Sources/Option.swift:30:64: error: cannot find 'SO_SNDBUF' in scope
28 | public static let dontRoute = Option<Bool>(rawValue: SO_DONTROUTE)
29 | public static let broadcast = Option<Bool>(rawValue: SO_BROADCAST)
30 | public static let sendBufferSize = Option<Int32>(rawValue: SO_SNDBUF)
| `- error: cannot find 'SO_SNDBUF' in scope
31 | public static let receiveBufferSize = Option<Int32>(rawValue: SO_RCVBUF)
32 | public static let sendLowWaterMark = Option<Int32>(rawValue: SO_SNDLOWAT)
/host/spi-builder-workspace/Sources/Option.swift:31:67: error: cannot find 'SO_RCVBUF' in scope
29 | public static let broadcast = Option<Bool>(rawValue: SO_BROADCAST)
30 | public static let sendBufferSize = Option<Int32>(rawValue: SO_SNDBUF)
31 | public static let receiveBufferSize = Option<Int32>(rawValue: SO_RCVBUF)
| `- error: cannot find 'SO_RCVBUF' in scope
32 | public static let sendLowWaterMark = Option<Int32>(rawValue: SO_SNDLOWAT)
33 | public static let receiveLowWaterMark = Option<Int32>(rawValue: SO_RCVLOWAT)
/host/spi-builder-workspace/Sources/Option.swift:32:66: error: cannot find 'SO_SNDLOWAT' in scope
30 | public static let sendBufferSize = Option<Int32>(rawValue: SO_SNDBUF)
31 | public static let receiveBufferSize = Option<Int32>(rawValue: SO_RCVBUF)
32 | public static let sendLowWaterMark = Option<Int32>(rawValue: SO_SNDLOWAT)
| `- error: cannot find 'SO_SNDLOWAT' in scope
33 | public static let receiveLowWaterMark = Option<Int32>(rawValue: SO_RCVLOWAT)
34 | public static let sendTimeout = Option<TimeValue>(rawValue: SO_SNDTIMEO)
/host/spi-builder-workspace/Sources/Option.swift:33:69: error: cannot find 'SO_RCVLOWAT' in scope
31 | public static let receiveBufferSize = Option<Int32>(rawValue: SO_RCVBUF)
32 | public static let sendLowWaterMark = Option<Int32>(rawValue: SO_SNDLOWAT)
33 | public static let receiveLowWaterMark = Option<Int32>(rawValue: SO_RCVLOWAT)
| `- error: cannot find 'SO_RCVLOWAT' in scope
34 | public static let sendTimeout = Option<TimeValue>(rawValue: SO_SNDTIMEO)
35 | public static let receiveTimeout = Option<TimeValue>(rawValue: SO_RCVTIMEO)
/host/spi-builder-workspace/Sources/Option.swift:34:65: error: cannot find 'SO_SNDTIMEO' in scope
32 | public static let sendLowWaterMark = Option<Int32>(rawValue: SO_SNDLOWAT)
33 | public static let receiveLowWaterMark = Option<Int32>(rawValue: SO_RCVLOWAT)
34 | public static let sendTimeout = Option<TimeValue>(rawValue: SO_SNDTIMEO)
| `- error: cannot find 'SO_SNDTIMEO' in scope
35 | public static let receiveTimeout = Option<TimeValue>(rawValue: SO_RCVTIMEO)
36 |
/host/spi-builder-workspace/Sources/Option.swift:35:68: error: cannot find 'SO_RCVTIMEO' in scope
33 | public static let receiveLowWaterMark = Option<Int32>(rawValue: SO_RCVLOWAT)
34 | public static let sendTimeout = Option<TimeValue>(rawValue: SO_SNDTIMEO)
35 | public static let receiveTimeout = Option<TimeValue>(rawValue: SO_RCVTIMEO)
| `- error: cannot find 'SO_RCVTIMEO' in scope
36 |
37 | #if !os(Linux)
/host/spi-builder-workspace/Sources/Option.swift:38:61: error: cannot find 'SO_NOSIGPIPE' in scope
36 |
37 | #if !os(Linux)
38 | public static let noSignalPipe = Option<Bool>(rawValue: SO_NOSIGPIPE)
| `- error: cannot find 'SO_NOSIGPIPE' in scope
39 | #endif
40 |
/host/spi-builder-workspace/Sources/Type.swift:24:51: error: cannot find 'SOCK_STREAM' in scope
22 | public init(rawValue: Int32) { self.rawValue = rawValue }
23 |
24 | public static let stream = Type(rawValue: SOCK_STREAM)
| `- error: cannot find 'SOCK_STREAM' in scope
25 | public static let datagram = Type(rawValue: SOCK_DGRAM)
26 | public static let raw = Type(rawValue: SOCK_RAW)
/host/spi-builder-workspace/Sources/Socket.swift:118:39: error: cannot find 'SOMAXCONN' in scope
116 | }
117 |
118 | open func listen(backlog: Int32 = SOMAXCONN) throws {
| `- error: cannot find 'SOMAXCONN' in scope
119 | try ing { OS.listen(fileDescriptor, backlog) }
120 | }
/host/spi-builder-workspace/Sources/Socket.swift:211:5: warning: non-'@objc' class method in extensions cannot be overridden; use 'public' instead
209 |
210 | extension Socket {
211 | open class func tcpListening(port: Port, address: String? = nil, maxPendingConnection: Int32 = SOMAXCONN) throws -> Self {
| `- warning: non-'@objc' class method in extensions cannot be overridden; use 'public' instead
212 |
213 | let socket = try self.init(.inet)
/host/spi-builder-workspace/Sources/Socket.swift:211:100: error: cannot find 'SOMAXCONN' in scope
209 |
210 | extension Socket {
211 | open class func tcpListening(port: Port, address: String? = nil, maxPendingConnection: Int32 = SOMAXCONN) throws -> Self {
| `- error: cannot find 'SOMAXCONN' in scope
212 |
213 | let socket = try self.init(.inet)
/host/spi-builder-workspace/Sources/Socket.swift:224:5: warning: non-'@objc' instance method in extensions cannot be overridden; use 'public' instead
222 |
223 | extension Socket {
224 | open func write(_ bytes: [Byte]) throws {
| `- warning: non-'@objc' instance method in extensions cannot be overridden; use 'public' instead
225 | try self.write(bytes, length: bytes.count)
226 | }
/host/spi-builder-workspace/Sources/TLS.swift:16:36: error: cannot find type 'CFArray' in scope
14 | public typealias Certificate = (cert: Data, key: Data)
15 | #else
16 | public typealias Certificate = CFArray
| `- error: cannot find type 'CFArray' in scope
17 | #endif
18 |
/host/spi-builder-workspace/Sources/TLS.swift:32:27: error: cannot find type 'SSLContext' in scope
30 | #endif
31 |
32 | internal var context: SSLContext
| `- error: cannot find type 'SSLContext' in scope
33 | public struct Configuration {
34 | public var peer: String?
/host/spi-builder-workspace/Sources/TLS.swift:165:5: warning: non-'@objc' class method in extensions cannot be overridden; use 'public' instead
163 | extension TLS {
164 | #if !os(Linux)
165 | open class func importCert(at path: URL, password: String) -> Certificate {
| `- warning: non-'@objc' class method in extensions cannot be overridden; use 'public' instead
166 | let data = FileManager.default.contents(atPath: path.path)! as NSData
167 | let options: NSDictionary = [kSecImportExportPassphrase: password]
/host/spi-builder-workspace/Sources/TLS.swift:202:123: error: cannot find type 'OSStatus' in scope
200 |
201 | // Based on https://stackoverflow.com/a/23611166/5555803
202 | private func sslWrite(connection: SSLConnectionRef, data: UnsafeRawPointer, dataLength: UnsafeMutablePointer<Int>) -> OSStatus {
| `- error: cannot find type 'OSStatus' in scope
203 | let fd = connection.assumingMemoryBound(to: FileDescriptor.self).pointee
204 | let bytesToWrite = dataLength.pointee
/host/spi-builder-workspace/Sources/TLS.swift:202:39: error: cannot find type 'SSLConnectionRef' in scope
200 |
201 | // Based on https://stackoverflow.com/a/23611166/5555803
202 | private func sslWrite(connection: SSLConnectionRef, data: UnsafeRawPointer, dataLength: UnsafeMutablePointer<Int>) -> OSStatus {
| `- error: cannot find type 'SSLConnectionRef' in scope
203 | let fd = connection.assumingMemoryBound(to: FileDescriptor.self).pointee
204 | let bytesToWrite = dataLength.pointee
/host/spi-builder-workspace/Sources/TLS.swift:220:129: error: cannot find type 'OSStatus' in scope
218 |
219 | // Based on https://stackoverflow.com/a/23611166/5555803
220 | private func sslRead(connection: SSLConnectionRef, data: UnsafeMutableRawPointer, dataLength: UnsafeMutablePointer<Int>) -> OSStatus {
| `- error: cannot find type 'OSStatus' in scope
221 | let fd = connection.assumingMemoryBound(to: FileDescriptor.self).pointee
222 | let bytesToRead = dataLength.pointee
/host/spi-builder-workspace/Sources/TLS.swift:220:38: error: cannot find type 'SSLConnectionRef' in scope
218 |
219 | // Based on https://stackoverflow.com/a/23611166/5555803
220 | private func sslRead(connection: SSLConnectionRef, data: UnsafeMutableRawPointer, dataLength: UnsafeMutablePointer<Int>) -> OSStatus {
| `- error: cannot find type 'SSLConnectionRef' in scope
221 | let fd = connection.assumingMemoryBound(to: FileDescriptor.self).pointee
222 | let bytesToRead = dataLength.pointee
/host/spi-builder-workspace/Sources/Type.swift:25:53: error: cannot find 'SOCK_DGRAM' in scope
23 |
24 | public static let stream = Type(rawValue: SOCK_STREAM)
25 | public static let datagram = Type(rawValue: SOCK_DGRAM)
| `- error: cannot find 'SOCK_DGRAM' in scope
26 | public static let raw = Type(rawValue: SOCK_RAW)
27 | public static let reliablyDeliveredMessage = Type(rawValue: SOCK_RDM)
/host/spi-builder-workspace/Sources/Type.swift:26:48: error: cannot find 'SOCK_RAW' in scope
24 | public static let stream = Type(rawValue: SOCK_STREAM)
25 | public static let datagram = Type(rawValue: SOCK_DGRAM)
26 | public static let raw = Type(rawValue: SOCK_RAW)
| `- error: cannot find 'SOCK_RAW' in scope
27 | public static let reliablyDeliveredMessage = Type(rawValue: SOCK_RDM)
28 | public static let sequencedPacketStream = Type(rawValue: SOCK_SEQPACKET)
/host/spi-builder-workspace/Sources/Type.swift:27:69: error: cannot find 'SOCK_RDM' in scope
25 | public static let datagram = Type(rawValue: SOCK_DGRAM)
26 | public static let raw = Type(rawValue: SOCK_RAW)
27 | public static let reliablyDeliveredMessage = Type(rawValue: SOCK_RDM)
| `- error: cannot find 'SOCK_RDM' in scope
28 | public static let sequencedPacketStream = Type(rawValue: SOCK_SEQPACKET)
29 | }
/host/spi-builder-workspace/Sources/Type.swift:28:67: error: cannot find 'SOCK_SEQPACKET' in scope
26 | public static let raw = Type(rawValue: SOCK_RAW)
27 | public static let reliablyDeliveredMessage = Type(rawValue: SOCK_RDM)
28 | public static let sequencedPacketStream = Type(rawValue: SOCK_SEQPACKET)
| `- error: cannot find 'SOCK_SEQPACKET' in scope
29 | }
30 | }
[3/9] Compiling SocketSwift Protocol.swift
[4/10] Compiling SocketSwift Option.swift
/host/spi-builder-workspace/Sources/Option.swift:24:61: error: cannot find 'SO_REUSEADDR' in scope
22 | extension Socket.BaseOption {
23 | private typealias Option = Socket.Option
24 | public static let reuseAddress = Option<Bool>(rawValue: SO_REUSEADDR)
| `- error: cannot find 'SO_REUSEADDR' in scope
25 | public static let reusePort = Option<Bool>(rawValue: SO_REUSEPORT)
26 | public static let keepAlive = Option<Bool>(rawValue: SO_KEEPALIVE)
/host/spi-builder-workspace/Sources/Option.swift:25:58: error: cannot find 'SO_REUSEPORT' in scope
23 | private typealias Option = Socket.Option
24 | public static let reuseAddress = Option<Bool>(rawValue: SO_REUSEADDR)
25 | public static let reusePort = Option<Bool>(rawValue: SO_REUSEPORT)
| `- error: cannot find 'SO_REUSEPORT' in scope
26 | public static let keepAlive = Option<Bool>(rawValue: SO_KEEPALIVE)
27 | public static let debug = Option<Bool>(rawValue: SO_DEBUG)
/host/spi-builder-workspace/Sources/Option.swift:26:58: error: cannot find 'SO_KEEPALIVE' in scope
24 | public static let reuseAddress = Option<Bool>(rawValue: SO_REUSEADDR)
25 | public static let reusePort = Option<Bool>(rawValue: SO_REUSEPORT)
26 | public static let keepAlive = Option<Bool>(rawValue: SO_KEEPALIVE)
| `- error: cannot find 'SO_KEEPALIVE' in scope
27 | public static let debug = Option<Bool>(rawValue: SO_DEBUG)
28 | public static let dontRoute = Option<Bool>(rawValue: SO_DONTROUTE)
/host/spi-builder-workspace/Sources/Option.swift:27:54: error: cannot find 'SO_DEBUG' in scope
25 | public static let reusePort = Option<Bool>(rawValue: SO_REUSEPORT)
26 | public static let keepAlive = Option<Bool>(rawValue: SO_KEEPALIVE)
27 | public static let debug = Option<Bool>(rawValue: SO_DEBUG)
| `- error: cannot find 'SO_DEBUG' in scope
28 | public static let dontRoute = Option<Bool>(rawValue: SO_DONTROUTE)
29 | public static let broadcast = Option<Bool>(rawValue: SO_BROADCAST)
/host/spi-builder-workspace/Sources/Option.swift:28:58: error: cannot find 'SO_DONTROUTE' in scope
26 | public static let keepAlive = Option<Bool>(rawValue: SO_KEEPALIVE)
27 | public static let debug = Option<Bool>(rawValue: SO_DEBUG)
28 | public static let dontRoute = Option<Bool>(rawValue: SO_DONTROUTE)
| `- error: cannot find 'SO_DONTROUTE' in scope
29 | public static let broadcast = Option<Bool>(rawValue: SO_BROADCAST)
30 | public static let sendBufferSize = Option<Int32>(rawValue: SO_SNDBUF)
/host/spi-builder-workspace/Sources/Option.swift:29:58: error: cannot find 'SO_BROADCAST' in scope
27 | public static let debug = Option<Bool>(rawValue: SO_DEBUG)
28 | public static let dontRoute = Option<Bool>(rawValue: SO_DONTROUTE)
29 | public static let broadcast = Option<Bool>(rawValue: SO_BROADCAST)
| `- error: cannot find 'SO_BROADCAST' in scope
30 | public static let sendBufferSize = Option<Int32>(rawValue: SO_SNDBUF)
31 | public static let receiveBufferSize = Option<Int32>(rawValue: SO_RCVBUF)
/host/spi-builder-workspace/Sources/Option.swift:30:64: error: cannot find 'SO_SNDBUF' in scope
28 | public static let dontRoute = Option<Bool>(rawValue: SO_DONTROUTE)
29 | public static let broadcast = Option<Bool>(rawValue: SO_BROADCAST)
30 | public static let sendBufferSize = Option<Int32>(rawValue: SO_SNDBUF)
| `- error: cannot find 'SO_SNDBUF' in scope
31 | public static let receiveBufferSize = Option<Int32>(rawValue: SO_RCVBUF)
32 | public static let sendLowWaterMark = Option<Int32>(rawValue: SO_SNDLOWAT)
/host/spi-builder-workspace/Sources/Option.swift:31:67: error: cannot find 'SO_RCVBUF' in scope
29 | public static let broadcast = Option<Bool>(rawValue: SO_BROADCAST)
30 | public static let sendBufferSize = Option<Int32>(rawValue: SO_SNDBUF)
31 | public static let receiveBufferSize = Option<Int32>(rawValue: SO_RCVBUF)
| `- error: cannot find 'SO_RCVBUF' in scope
32 | public static let sendLowWaterMark = Option<Int32>(rawValue: SO_SNDLOWAT)
33 | public static let receiveLowWaterMark = Option<Int32>(rawValue: SO_RCVLOWAT)
/host/spi-builder-workspace/Sources/Option.swift:32:66: error: cannot find 'SO_SNDLOWAT' in scope
30 | public static let sendBufferSize = Option<Int32>(rawValue: SO_SNDBUF)
31 | public static let receiveBufferSize = Option<Int32>(rawValue: SO_RCVBUF)
32 | public static let sendLowWaterMark = Option<Int32>(rawValue: SO_SNDLOWAT)
| `- error: cannot find 'SO_SNDLOWAT' in scope
33 | public static let receiveLowWaterMark = Option<Int32>(rawValue: SO_RCVLOWAT)
34 | public static let sendTimeout = Option<TimeValue>(rawValue: SO_SNDTIMEO)
/host/spi-builder-workspace/Sources/Option.swift:33:69: error: cannot find 'SO_RCVLOWAT' in scope
31 | public static let receiveBufferSize = Option<Int32>(rawValue: SO_RCVBUF)
32 | public static let sendLowWaterMark = Option<Int32>(rawValue: SO_SNDLOWAT)
33 | public static let receiveLowWaterMark = Option<Int32>(rawValue: SO_RCVLOWAT)
| `- error: cannot find 'SO_RCVLOWAT' in scope
34 | public static let sendTimeout = Option<TimeValue>(rawValue: SO_SNDTIMEO)
35 | public static let receiveTimeout = Option<TimeValue>(rawValue: SO_RCVTIMEO)
/host/spi-builder-workspace/Sources/Option.swift:34:65: error: cannot find 'SO_SNDTIMEO' in scope
32 | public static let sendLowWaterMark = Option<Int32>(rawValue: SO_SNDLOWAT)
33 | public static let receiveLowWaterMark = Option<Int32>(rawValue: SO_RCVLOWAT)
34 | public static let sendTimeout = Option<TimeValue>(rawValue: SO_SNDTIMEO)
| `- error: cannot find 'SO_SNDTIMEO' in scope
35 | public static let receiveTimeout = Option<TimeValue>(rawValue: SO_RCVTIMEO)
36 |
/host/spi-builder-workspace/Sources/Option.swift:35:68: error: cannot find 'SO_RCVTIMEO' in scope
33 | public static let receiveLowWaterMark = Option<Int32>(rawValue: SO_RCVLOWAT)
34 | public static let sendTimeout = Option<TimeValue>(rawValue: SO_SNDTIMEO)
35 | public static let receiveTimeout = Option<TimeValue>(rawValue: SO_RCVTIMEO)
| `- error: cannot find 'SO_RCVTIMEO' in scope
36 |
37 | #if !os(Linux)
/host/spi-builder-workspace/Sources/Option.swift:38:61: error: cannot find 'SO_NOSIGPIPE' in scope
36 |
37 | #if !os(Linux)
38 | public static let noSignalPipe = Option<Bool>(rawValue: SO_NOSIGPIPE)
| `- error: cannot find 'SO_NOSIGPIPE' in scope
39 | #endif
40 |
[5/10] Compiling SocketSwift OS.swift
/host/spi-builder-workspace/Sources/OS.swift:31:24: error: cannot find 'Darwin' in scope
29 | static let write = Glibc.write
30 | #else
31 | static let close = Darwin.close
| `- error: cannot find 'Darwin' in scope
32 | static let bind = Darwin.bind
33 | static let connect = Darwin.connect
/host/spi-builder-workspace/Sources/OS.swift:32:23: error: cannot find 'Darwin' in scope
30 | #else
31 | static let close = Darwin.close
32 | static let bind = Darwin.bind
| `- error: cannot find 'Darwin' in scope
33 | static let connect = Darwin.connect
34 | static let listen = Darwin.listen
/host/spi-builder-workspace/Sources/OS.swift:33:26: error: cannot find 'Darwin' in scope
31 | static let close = Darwin.close
32 | static let bind = Darwin.bind
33 | static let connect = Darwin.connect
| `- error: cannot find 'Darwin' in scope
34 | static let listen = Darwin.listen
35 | static let accept = Darwin.accept
/host/spi-builder-workspace/Sources/OS.swift:34:25: error: cannot find 'Darwin' in scope
32 | static let bind = Darwin.bind
33 | static let connect = Darwin.connect
34 | static let listen = Darwin.listen
| `- error: cannot find 'Darwin' in scope
35 | static let accept = Darwin.accept
36 | static let write = Darwin.write
/host/spi-builder-workspace/Sources/OS.swift:35:25: error: cannot find 'Darwin' in scope
33 | static let connect = Darwin.connect
34 | static let listen = Darwin.listen
35 | static let accept = Darwin.accept
| `- error: cannot find 'Darwin' in scope
36 | static let write = Darwin.write
37 | #endif
/host/spi-builder-workspace/Sources/OS.swift:36:24: error: cannot find 'Darwin' in scope
34 | static let listen = Darwin.listen
35 | static let accept = Darwin.accept
36 | static let write = Darwin.write
| `- error: cannot find 'Darwin' in scope
37 | #endif
38 | }
[6/10] Compiling SocketSwift Type.swift
/host/spi-builder-workspace/Sources/Type.swift:24:51: error: cannot find 'SOCK_STREAM' in scope
22 | public init(rawValue: Int32) { self.rawValue = rawValue }
23 |
24 | public static let stream = Type(rawValue: SOCK_STREAM)
| `- error: cannot find 'SOCK_STREAM' in scope
25 | public static let datagram = Type(rawValue: SOCK_DGRAM)
26 | public static let raw = Type(rawValue: SOCK_RAW)
/host/spi-builder-workspace/Sources/Type.swift:25:53: error: cannot find 'SOCK_DGRAM' in scope
23 |
24 | public static let stream = Type(rawValue: SOCK_STREAM)
25 | public static let datagram = Type(rawValue: SOCK_DGRAM)
| `- error: cannot find 'SOCK_DGRAM' in scope
26 | public static let raw = Type(rawValue: SOCK_RAW)
27 | public static let reliablyDeliveredMessage = Type(rawValue: SOCK_RDM)
/host/spi-builder-workspace/Sources/Type.swift:26:48: error: cannot find 'SOCK_RAW' in scope
24 | public static let stream = Type(rawValue: SOCK_STREAM)
25 | public static let datagram = Type(rawValue: SOCK_DGRAM)
26 | public static let raw = Type(rawValue: SOCK_RAW)
| `- error: cannot find 'SOCK_RAW' in scope
27 | public static let reliablyDeliveredMessage = Type(rawValue: SOCK_RDM)
28 | public static let sequencedPacketStream = Type(rawValue: SOCK_SEQPACKET)
/host/spi-builder-workspace/Sources/Type.swift:27:69: error: cannot find 'SOCK_RDM' in scope
25 | public static let datagram = Type(rawValue: SOCK_DGRAM)
26 | public static let raw = Type(rawValue: SOCK_RAW)
27 | public static let reliablyDeliveredMessage = Type(rawValue: SOCK_RDM)
| `- error: cannot find 'SOCK_RDM' in scope
28 | public static let sequencedPacketStream = Type(rawValue: SOCK_SEQPACKET)
29 | }
/host/spi-builder-workspace/Sources/Type.swift:28:67: error: cannot find 'SOCK_SEQPACKET' in scope
26 | public static let raw = Type(rawValue: SOCK_RAW)
27 | public static let reliablyDeliveredMessage = Type(rawValue: SOCK_RDM)
28 | public static let sequencedPacketStream = Type(rawValue: SOCK_SEQPACKET)
| `- error: cannot find 'SOCK_SEQPACKET' in scope
29 | }
30 | }
[7/10] Compiling SocketSwift Family.swift
[8/10] Compiling SocketSwift Error.swift
[9/10] Compiling SocketSwift TLS.swift
/host/spi-builder-workspace/Sources/TLS.swift:16:36: error: cannot find type 'CFArray' in scope
14 | public typealias Certificate = (cert: Data, key: Data)
15 | #else
16 | public typealias Certificate = CFArray
| `- error: cannot find type 'CFArray' in scope
17 | #endif
18 |
/host/spi-builder-workspace/Sources/TLS.swift:32:27: error: cannot find type 'SSLContext' in scope
30 | #endif
31 |
32 | internal var context: SSLContext
| `- error: cannot find type 'SSLContext' in scope
33 | public struct Configuration {
34 | public var peer: String?
/host/spi-builder-workspace/Sources/TLS.swift:165:5: warning: non-'@objc' class method in extensions cannot be overridden; use 'public' instead
163 | extension TLS {
164 | #if !os(Linux)
165 | open class func importCert(at path: URL, password: String) -> Certificate {
| `- warning: non-'@objc' class method in extensions cannot be overridden; use 'public' instead
166 | let data = FileManager.default.contents(atPath: path.path)! as NSData
167 | let options: NSDictionary = [kSecImportExportPassphrase: password]
/host/spi-builder-workspace/Sources/TLS.swift:202:123: error: cannot find type 'OSStatus' in scope
200 |
201 | // Based on https://stackoverflow.com/a/23611166/5555803
202 | private func sslWrite(connection: SSLConnectionRef, data: UnsafeRawPointer, dataLength: UnsafeMutablePointer<Int>) -> OSStatus {
| `- error: cannot find type 'OSStatus' in scope
203 | let fd = connection.assumingMemoryBound(to: FileDescriptor.self).pointee
204 | let bytesToWrite = dataLength.pointee
/host/spi-builder-workspace/Sources/TLS.swift:202:39: error: cannot find type 'SSLConnectionRef' in scope
200 |
201 | // Based on https://stackoverflow.com/a/23611166/5555803
202 | private func sslWrite(connection: SSLConnectionRef, data: UnsafeRawPointer, dataLength: UnsafeMutablePointer<Int>) -> OSStatus {
| `- error: cannot find type 'SSLConnectionRef' in scope
203 | let fd = connection.assumingMemoryBound(to: FileDescriptor.self).pointee
204 | let bytesToWrite = dataLength.pointee
/host/spi-builder-workspace/Sources/TLS.swift:220:129: error: cannot find type 'OSStatus' in scope
218 |
219 | // Based on https://stackoverflow.com/a/23611166/5555803
220 | private func sslRead(connection: SSLConnectionRef, data: UnsafeMutableRawPointer, dataLength: UnsafeMutablePointer<Int>) -> OSStatus {
| `- error: cannot find type 'OSStatus' in scope
221 | let fd = connection.assumingMemoryBound(to: FileDescriptor.self).pointee
222 | let bytesToRead = dataLength.pointee
/host/spi-builder-workspace/Sources/TLS.swift:220:38: error: cannot find type 'SSLConnectionRef' in scope
218 |
219 | // Based on https://stackoverflow.com/a/23611166/5555803
220 | private func sslRead(connection: SSLConnectionRef, data: UnsafeMutableRawPointer, dataLength: UnsafeMutablePointer<Int>) -> OSStatus {
| `- error: cannot find type 'SSLConnectionRef' in scope
221 | let fd = connection.assumingMemoryBound(to: FileDescriptor.self).pointee
222 | let bytesToRead = dataLength.pointee
/host/spi-builder-workspace/Sources/TLS.swift:93:28: error: cannot find 'SSLCreateContext' in scope
91 | }
92 | #else
93 | self.context = SSLCreateContext(nil, config.isServer ? .serverSide : .clientSide, .streamType)!
| `- error: cannot find 'SSLCreateContext' in scope
94 | self.fdPtr.pointee = fd
95 |
/host/spi-builder-workspace/Sources/TLS.swift:93:45: error: 'nil' requires a contextual type
91 | }
92 | #else
93 | self.context = SSLCreateContext(nil, config.isServer ? .serverSide : .clientSide, .streamType)!
| `- error: 'nil' requires a contextual type
94 | self.fdPtr.pointee = fd
95 |
/host/spi-builder-workspace/Sources/TLS.swift:93:69: error: cannot infer contextual base in reference to member 'serverSide'
91 | }
92 | #else
93 | self.context = SSLCreateContext(nil, config.isServer ? .serverSide : .clientSide, .streamType)!
| `- error: cannot infer contextual base in reference to member 'serverSide'
94 | self.fdPtr.pointee = fd
95 |
/host/spi-builder-workspace/Sources/TLS.swift:93:96: error: cannot infer contextual base in reference to member 'streamType'
91 | }
92 | #else
93 | self.context = SSLCreateContext(nil, config.isServer ? .serverSide : .clientSide, .streamType)!
| `- error: cannot infer contextual base in reference to member 'streamType'
94 | self.fdPtr.pointee = fd
95 |
/host/spi-builder-workspace/Sources/TLS.swift:96:13: error: cannot find 'SSLSetIOFuncs' in scope
94 | self.fdPtr.pointee = fd
95 |
96 | SSLSetIOFuncs(context, sslRead, sslWrite)
| `- error: cannot find 'SSLSetIOFuncs' in scope
97 | SSLSetConnection(context, fdPtr)
98 |
/host/spi-builder-workspace/Sources/TLS.swift:97:13: error: cannot find 'SSLSetConnection' in scope
95 |
96 | SSLSetIOFuncs(context, sslRead, sslWrite)
97 | SSLSetConnection(context, fdPtr)
| `- error: cannot find 'SSLSetConnection' in scope
98 |
99 | if config.isServer {
/host/spi-builder-workspace/Sources/TLS.swift:100:17: error: cannot find 'SSLSetCertificate' in scope
98 |
99 | if config.isServer {
100 | SSLSetCertificate(context, config.certificate)
| `- error: cannot find 'SSLSetCertificate' in scope
101 | } else {
102 | if let peerName = config.peer {
/host/spi-builder-workspace/Sources/TLS.swift:103:21: error: cannot find 'SSLSetPeerDomainName' in scope
101 | } else {
102 | if let peerName = config.peer {
103 | SSLSetPeerDomainName(context, peerName, peerName.count)
| `- error: cannot find 'SSLSetPeerDomainName' in scope
104 | }
105 |
/host/spi-builder-workspace/Sources/TLS.swift:107:21: error: cannot find 'SSLSetSessionOption' in scope
105 |
106 | if config.allowSelfSigned {
107 | SSLSetSessionOption(context, .breakOnServerAuth, true)
| `- error: cannot find 'SSLSetSessionOption' in scope
108 | }
109 | }
/host/spi-builder-workspace/Sources/TLS.swift:107:51: error: cannot infer contextual base in reference to member 'breakOnServerAuth'
105 |
106 | if config.allowSelfSigned {
107 | SSLSetSessionOption(context, .breakOnServerAuth, true)
| `- error: cannot infer contextual base in reference to member 'breakOnServerAuth'
108 | }
109 | }
/host/spi-builder-workspace/Sources/TLS.swift:117:25: error: cannot find type 'OSStatus' in scope
115 | try ing { tls_handshake(context) }
116 | #else
117 | var status: OSStatus = -1
| `- error: cannot find type 'OSStatus' in scope
118 | repeat {
119 | status = SSLHandshake(context)
/host/spi-builder-workspace/Sources/TLS.swift:119:26: error: cannot find 'SSLHandshake' in scope
117 | var status: OSStatus = -1
118 | repeat {
119 | status = SSLHandshake(context)
| `- error: cannot find 'SSLHandshake' in scope
120 | } while status == errSSLWouldBlock
121 | if status != noErr && status != errSSLPeerAuthCompleted {
/host/spi-builder-workspace/Sources/TLS.swift:120:31: error: cannot find 'errSSLWouldBlock' in scope
118 | repeat {
119 | status = SSLHandshake(context)
120 | } while status == errSSLWouldBlock
| `- error: cannot find 'errSSLWouldBlock' in scope
121 | if status != noErr && status != errSSLPeerAuthCompleted {
122 | // print(status, SecCopyErrorMessageString(status, nil)!)
/host/spi-builder-workspace/Sources/TLS.swift:121:26: error: cannot find 'noErr' in scope
119 | status = SSLHandshake(context)
120 | } while status == errSSLWouldBlock
121 | if status != noErr && status != errSSLPeerAuthCompleted {
| `- error: cannot find 'noErr' in scope
122 | // print(status, SecCopyErrorMessageString(status, nil)!)
123 | try ing { -1 } // throw
/host/spi-builder-workspace/Sources/TLS.swift:121:45: error: cannot find 'errSSLPeerAuthCompleted' in scope
119 | status = SSLHandshake(context)
120 | } while status == errSSLWouldBlock
121 | if status != noErr && status != errSSLPeerAuthCompleted {
| `- error: cannot find 'errSSLPeerAuthCompleted' in scope
122 | // print(status, SecCopyErrorMessageString(status, nil)!)
123 | try ing { -1 } // throw
/host/spi-builder-workspace/Sources/TLS.swift:133:16: error: cannot find 'SSLWrite' in scope
131 | #else
132 | var written = 0
133 | if SSLWrite(context, buffer, size, &written) != noErr {
| `- error: cannot find 'SSLWrite' in scope
134 | try ing { -1 } // throw
135 | }
/host/spi-builder-workspace/Sources/TLS.swift:133:61: error: cannot find 'noErr' in scope
131 | #else
132 | var written = 0
133 | if SSLWrite(context, buffer, size, &written) != noErr {
| `- error: cannot find 'noErr' in scope
134 | try ing { -1 } // throw
135 | }
/host/spi-builder-workspace/Sources/TLS.swift:145:16: error: cannot find 'SSLRead' in scope
143 | #else
144 | var received = 0
145 | if SSLRead(context, buffer, size, &received) != noErr {
| `- error: cannot find 'SSLRead' in scope
146 | try ing { -1 } // throw errno
147 | }
/host/spi-builder-workspace/Sources/TLS.swift:145:61: error: cannot find 'noErr' in scope
143 | #else
144 | var received = 0
145 | if SSLRead(context, buffer, size, &received) != noErr {
| `- error: cannot find 'noErr' in scope
146 | try ing { -1 } // throw errno
147 | }
/host/spi-builder-workspace/Sources/TLS.swift:157:13: error: cannot find 'SSLClose' in scope
155 | tls_free(context);
156 | #else
157 | SSLClose(context)
| `- error: cannot find 'SSLClose' in scope
158 | fdPtr.deallocate()
159 | #endif
/host/spi-builder-workspace/Sources/TLS.swift:167:38: error: cannot find 'kSecImportExportPassphrase' in scope
165 | open class func importCert(at path: URL, password: String) -> Certificate {
166 | let data = FileManager.default.contents(atPath: path.path)! as NSData
167 | let options: NSDictionary = [kSecImportExportPassphrase: password]
| `- error: cannot find 'kSecImportExportPassphrase' in scope
168 |
169 | var items: CFArray?
/host/spi-builder-workspace/Sources/TLS.swift:169:20: error: cannot find type 'CFArray' in scope
167 | let options: NSDictionary = [kSecImportExportPassphrase: password]
168 |
169 | var items: CFArray?
| `- error: cannot find type 'CFArray' in scope
170 | let status = SecPKCS12Import(data, options, &items)
171 | assert(status == noErr)
/host/spi-builder-workspace/Sources/TLS.swift:170:22: error: cannot find 'SecPKCS12Import' in scope
168 |
169 | var items: CFArray?
170 | let status = SecPKCS12Import(data, options, &items)
| `- error: cannot find 'SecPKCS12Import' in scope
171 | assert(status == noErr)
172 | let dictionary = (items! as [AnyObject])[0]
/host/spi-builder-workspace/Sources/TLS.swift:171:26: error: cannot find 'noErr' in scope
169 | var items: CFArray?
170 | let status = SecPKCS12Import(data, options, &items)
171 | assert(status == noErr)
| `- error: cannot find 'noErr' in scope
172 | let dictionary = (items! as [AnyObject])[0]
173 | let secIdentity = dictionary.value(forKey: kSecImportItemIdentity as String)!
/host/spi-builder-workspace/Sources/TLS.swift:173:52: error: cannot find 'kSecImportItemIdentity' in scope
171 | assert(status == noErr)
172 | let dictionary = (items! as [AnyObject])[0]
173 | let secIdentity = dictionary.value(forKey: kSecImportItemIdentity as String)!
| `- error: cannot find 'kSecImportItemIdentity' in scope
174 | let ccerts = dictionary.value(forKey: kSecImportItemCertChain as String) as! [SecCertificate]
175 |
/host/spi-builder-workspace/Sources/TLS.swift:174:47: error: cannot find 'kSecImportItemCertChain' in scope
172 | let dictionary = (items! as [AnyObject])[0]
173 | let secIdentity = dictionary.value(forKey: kSecImportItemIdentity as String)!
174 | let ccerts = dictionary.value(forKey: kSecImportItemCertChain as String) as! [SecCertificate]
| `- error: cannot find 'kSecImportItemCertChain' in scope
175 |
176 | let certs = [secIdentity] + ccerts.dropFirst().map { $0 as Any }
/host/spi-builder-workspace/Sources/TLS.swift:174:87: error: cannot find type 'SecCertificate' in scope
172 | let dictionary = (items! as [AnyObject])[0]
173 | let secIdentity = dictionary.value(forKey: kSecImportItemIdentity as String)!
174 | let ccerts = dictionary.value(forKey: kSecImportItemCertChain as String) as! [SecCertificate]
| `- error: cannot find type 'SecCertificate' in scope
175 |
176 | let certs = [secIdentity] + ccerts.dropFirst().map { $0 as Any }
/host/spi-builder-workspace/Sources/OS.swift:36:24: error: cannot find 'Darwin' in scope
34 | static let listen = Darwin.listen
35 | static let accept = Darwin.accept
36 | static let write = Darwin.write
| `- error: cannot find 'Darwin' in scope
37 | #endif
38 | }
[10/10] Compiling SocketSwift Socket.swift
/host/spi-builder-workspace/Sources/Type.swift:24:51: error: cannot find 'SOCK_STREAM' in scope
22 | public init(rawValue: Int32) { self.rawValue = rawValue }
23 |
24 | public static let stream = Type(rawValue: SOCK_STREAM)
| `- error: cannot find 'SOCK_STREAM' in scope
25 | public static let datagram = Type(rawValue: SOCK_DGRAM)
26 | public static let raw = Type(rawValue: SOCK_RAW)
/host/spi-builder-workspace/Sources/Socket.swift:118:39: error: cannot find 'SOMAXCONN' in scope
116 | }
117 |
118 | open func listen(backlog: Int32 = SOMAXCONN) throws {
| `- error: cannot find 'SOMAXCONN' in scope
119 | try ing { OS.listen(fileDescriptor, backlog) }
120 | }
/host/spi-builder-workspace/Sources/Socket.swift:211:5: warning: non-'@objc' class method in extensions cannot be overridden; use 'public' instead
209 |
210 | extension Socket {
211 | open class func tcpListening(port: Port, address: String? = nil, maxPendingConnection: Int32 = SOMAXCONN) throws -> Self {
| `- warning: non-'@objc' class method in extensions cannot be overridden; use 'public' instead
212 |
213 | let socket = try self.init(.inet)
/host/spi-builder-workspace/Sources/Socket.swift:211:100: error: cannot find 'SOMAXCONN' in scope
209 |
210 | extension Socket {
211 | open class func tcpListening(port: Port, address: String? = nil, maxPendingConnection: Int32 = SOMAXCONN) throws -> Self {
| `- error: cannot find 'SOMAXCONN' in scope
212 |
213 | let socket = try self.init(.inet)
/host/spi-builder-workspace/Sources/Socket.swift:224:5: warning: non-'@objc' instance method in extensions cannot be overridden; use 'public' instead
222 |
223 | extension Socket {
224 | open func write(_ bytes: [Byte]) throws {
| `- warning: non-'@objc' instance method in extensions cannot be overridden; use 'public' instead
225 | try self.write(bytes, length: bytes.count)
226 | }
/host/spi-builder-workspace/Sources/Socket.swift:26:41: error: cannot find 'socket' in scope
24 |
25 | required public init(_ family: Family, type: Type = .stream, protocol: Protocol = .tcp) throws {
26 | self.fileDescriptor = try ing { socket(family.rawValue, type.rawValue, `protocol`.rawValue) }
| `- error: cannot find 'socket' in scope
27 | }
28 |
/host/spi-builder-workspace/Sources/OS.swift:31:24: error: cannot find 'Darwin' in scope
29 | static let write = Glibc.write
30 | #else
31 | static let close = Darwin.close
| `- error: cannot find 'Darwin' in scope
32 | static let bind = Darwin.bind
33 | static let connect = Darwin.connect
/host/spi-builder-workspace/Sources/OS.swift:36:24: error: cannot find 'Darwin' in scope
34 | static let listen = Darwin.listen
35 | static let accept = Darwin.accept
36 | static let write = Darwin.write
| `- error: cannot find 'Darwin' in scope
37 | #endif
38 | }
/host/spi-builder-workspace/Sources/Socket.swift:97:19: error: cannot find 'setsockopt' in scope
95 | var state: Any = value is Bool ? (value as! Bool == true ? 1 : 0) : value
96 |
97 | try ing { setsockopt(fileDescriptor, SOL_SOCKET, option.rawValue, &state, socklen_t(size)) }
| `- error: cannot find 'setsockopt' in scope
98 | }
99 |
/host/spi-builder-workspace/Sources/OS.swift:32:23: error: cannot find 'Darwin' in scope
30 | #else
31 | static let close = Darwin.close
32 | static let bind = Darwin.bind
| `- error: cannot find 'Darwin' in scope
33 | static let connect = Darwin.connect
34 | static let listen = Darwin.listen
/host/spi-builder-workspace/Sources/OS.swift:33:26: error: cannot find 'Darwin' in scope
31 | static let close = Darwin.close
32 | static let bind = Darwin.bind
33 | static let connect = Darwin.connect
| `- error: cannot find 'Darwin' in scope
34 | static let listen = Darwin.listen
35 | static let accept = Darwin.accept
/host/spi-builder-workspace/Sources/OS.swift:34:25: error: cannot find 'Darwin' in scope
32 | static let bind = Darwin.bind
33 | static let connect = Darwin.connect
34 | static let listen = Darwin.listen
| `- error: cannot find 'Darwin' in scope
35 | static let accept = Darwin.accept
36 | static let write = Darwin.write
/host/spi-builder-workspace/Sources/OS.swift:35:25: error: cannot find 'Darwin' in scope
33 | static let connect = Darwin.connect
34 | static let listen = Darwin.listen
35 | static let accept = Darwin.accept
| `- error: cannot find 'Darwin' in scope
36 | static let write = Darwin.write
37 | #endif
/host/spi-builder-workspace/Sources/Socket.swift:168:21: error: cannot find 'addrinfo' in scope
166 | /// - Throws: Domain name not resolved
167 | open func addresses(for host: String, port: Port) throws -> [SocketAddress] {
168 | var hints = addrinfo()
| `- error: cannot find 'addrinfo' in scope
169 |
170 | //TODO: set correct values of current socket
/host/spi-builder-workspace/Sources/Socket.swift:175:41: error: cannot find type 'addrinfo' in scope
173 | hints.ai_protocol = Protocol.tcp.rawValue
174 |
175 | var addrs: UnsafeMutablePointer<addrinfo>?
| `- error: cannot find type 'addrinfo' in scope
176 | if getaddrinfo(host, String(port), &hints, &addrs) != 0 {
177 | // unable to resolve
/host/spi-builder-workspace/Sources/Socket.swift:176:12: error: cannot find 'getaddrinfo' in scope
174 |
175 | var addrs: UnsafeMutablePointer<addrinfo>?
176 | if getaddrinfo(host, String(port), &hints, &addrs) != 0 {
| `- error: cannot find 'getaddrinfo' in scope
177 | // unable to resolve
178 | throw Error(errno: 11) //TODO: fix this thing
/host/spi-builder-workspace/Sources/Socket.swift:180:17: error: cannot find 'freeaddrinfo' in scope
178 | throw Error(errno: 11) //TODO: fix this thing
179 | }
180 | defer { freeaddrinfo(addrs) }
| `- error: cannot find 'freeaddrinfo' in scope
181 |
182 | var result: [SocketAddress] = []
/host/spi-builder-workspace/Sources/Socket.swift:183:51: error: cannot infer type of closure parameter '$0' without a type annotation
181 |
182 | var result: [SocketAddress] = []
183 | for addr in sequence(first: addrs!, next: { $0.pointee.ai_next }) {
| `- error: cannot infer type of closure parameter '$0' without a type annotation
184 | result.append(addr.pointee.ai_addr.pointee)
185 | }
/host/spi-builder-workspace/Sources/Socket.swift:202:19: warning: initialization of 'UnsafeMutableRawPointer' results in a dangling pointer
200 | var address = sockaddr_in()
201 | var len = socklen_t(MemoryLayout.size(ofValue: address))
202 | let ptr = UnsafeMutableRawPointer(&address).assumingMemoryBound(to: sockaddr.self)
| | |- note: implicit argument conversion from 'sockaddr_in' to 'UnsafeMutableRawPointer' produces a pointer valid only for the duration of the call to 'init(_:)'
| | `- note: use 'withUnsafeMutableBytes' in order to explicitly convert argument to buffer pointer valid for a defined scope
| `- warning: initialization of 'UnsafeMutableRawPointer' results in a dangling pointer
203 |
204 | try ing { getsockname(fileDescriptor, ptr, &len) }
/host/spi-builder-workspace/Sources/Socket.swift:204:19: error: cannot find 'getsockname' in scope
202 | let ptr = UnsafeMutableRawPointer(&address).assumingMemoryBound(to: sockaddr.self)
203 |
204 | try ing { getsockname(fileDescriptor, ptr, &len) }
| `- error: cannot find 'getsockname' in scope
205 |
206 | return Port(address.sin_port.bigEndian)
/host/spi-builder-workspace/Sources/Option.swift:24:61: error: cannot find 'SO_REUSEADDR' in scope
22 | extension Socket.BaseOption {
23 | private typealias Option = Socket.Option
24 | public static let reuseAddress = Option<Bool>(rawValue: SO_REUSEADDR)
| `- error: cannot find 'SO_REUSEADDR' in scope
25 | public static let reusePort = Option<Bool>(rawValue: SO_REUSEPORT)
26 | public static let keepAlive = Option<Bool>(rawValue: SO_KEEPALIVE)
/host/spi-builder-workspace/Sources/Socket.swift:233:18: error: value of type 'sockaddr_in' has no member 'sin_len'
231 | var addr = sockaddr_in() //no need to memset 0. Swift does it
232 | #if !os(Linux)
233 | addr.sin_len = UInt8(MemoryLayout<sockaddr_in>.stride)
| `- error: value of type 'sockaddr_in' has no member 'sin_len'
234 | #endif
235 | addr.sin_family = sa_family_t(AF_INET)
/host/spi-builder-workspace/Sources/Socket.swift:255:45: error: cannot convert value of type 'Int32' to expected argument type 'Int64'
253 | let milliseconds = Int32(milliseconds)
254 | #endif
255 | self.init(tv_sec: seconds, tv_usec: microseconds + milliseconds * 1000)
| `- error: cannot convert value of type 'Int32' to expected argument type 'Int64'
256 | }
257 | }
/host/spi-builder-workspace/Sources/Socket.swift:255:60: error: cannot convert value of type 'Int32' to expected argument type 'Int64'
253 | let milliseconds = Int32(milliseconds)
254 | #endif
255 | self.init(tv_sec: seconds, tv_usec: microseconds + milliseconds * 1000)
| `- error: cannot convert value of type 'Int32' to expected argument type 'Int64'
256 | }
257 | }
/host/spi-builder-workspace/Sources/Socket.swift:255:27: error: cannot convert value of type 'Int' to expected argument type 'time_t' (aka 'Int64')
253 | let milliseconds = Int32(milliseconds)
254 | #endif
255 | self.init(tv_sec: seconds, tv_usec: microseconds + milliseconds * 1000)
| `- error: cannot convert value of type 'Int' to expected argument type 'time_t' (aka 'Int64')
256 | }
257 | }
BUILD FAILURE 6.1 wasm