The Swift Package Index logo.Swift Package Index

Has it really been five years since Swift Package Index launched? Read our anniversary blog post!

Build Information

Failed to build FlightLog, reference main (5f89e3), with Swift 6.1 for Wasm on 28 May 2025 12:15:25 UTC.

Build Command

bash -c docker run --pull=always --rm -v "checkouts-4606859-3":/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/453jerry/FlightLog.git
Reference: main
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/453jerry/FlightLog
 * branch            main       -> FETCH_HEAD
 * [new branch]      main       -> origin/main
HEAD is now at 5f89e3b test(logrecordertest): fix test case to support old version of watchOS and tvOS
Cloned https://github.com/453jerry/FlightLog.git
Revision (git rev-parse @):
5f89e3b4efa7a6f55de5c80d34cc86063bdeeafc
SUCCESS checkout https://github.com/453jerry/FlightLog.git at main
========================================
Build
========================================
Selected platform:         wasm
Swift version:             6.1
Building package at path:  $PWD
https://github.com/453jerry/FlightLog.git
https://github.com/453jerry/FlightLog.git
WARNING: environment variable SUPPRESS_SWIFT_6_FLAGS is not set
{
  "dependencies" : [
  ],
  "manifest_display_name" : "FlightLog",
  "name" : "FlightLog",
  "path" : "/host/spi-builder-workspace",
  "platforms" : [
  ],
  "products" : [
    {
      "name" : "FlightLog",
      "targets" : [
        "FlightLog"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "targets" : [
    {
      "c99name" : "FlightLogTests",
      "module_type" : "SwiftTarget",
      "name" : "FlightLogTests",
      "path" : "Tests/FlightLogTests",
      "sources" : [
        "LogRecorderTests.swift",
        "LogTests.swift"
      ],
      "target_dependencies" : [
        "FlightLog"
      ],
      "type" : "test"
    },
    {
      "c99name" : "FlightLog",
      "module_type" : "SwiftTarget",
      "name" : "FlightLog",
      "path" : "Sources/FlightLog",
      "product_memberships" : [
        "FlightLog"
      ],
      "sources" : [
        "Log.swift",
        "LogReorder.swift",
        "UnitTestSupport/FileHandleFactory.swift",
        "UnitTestSupport/FileManagerProtocol.swift",
        "Utility.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "5.4"
}
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-4606859-3":/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:7e37457820e5f17452a98118754f345f2619722c485f2db0d8b666940a83afd2
Status: Image is up to date for registry.gitlab.com/finestructure/spi-images:wasm-6.1-latest
Building for debugging...
[0/2] Write sources
[1/2] Write swift-version-24593BA9C3E375BF.txt
[3/8] Compiling FlightLog FileManagerProtocol.swift
[4/8] Compiling FlightLog FileHandleFactory.swift
[5/8] Compiling FlightLog Utility.swift
/host/spi-builder-workspace/Sources/FlightLog/Utility.swift:26:21: error: cannot find 'CTL_KERN' in scope
24 |     public static func getProcessStartDate() -> Date {
25 |         let pid = ProcessInfo.processInfo.processIdentifier
26 |         var mib = [ CTL_KERN, KERN_PROC, KERN_PROC_PID, pid ]
   |                     `- error: cannot find 'CTL_KERN' in scope
27 |         var proc = kinfo_proc.init()
28 |         var size = MemoryLayout<kinfo_proc>.size
/host/spi-builder-workspace/Sources/FlightLog/Utility.swift:26:31: error: cannot find 'KERN_PROC' in scope
24 |     public static func getProcessStartDate() -> Date {
25 |         let pid = ProcessInfo.processInfo.processIdentifier
26 |         var mib = [ CTL_KERN, KERN_PROC, KERN_PROC_PID, pid ]
   |                               `- error: cannot find 'KERN_PROC' in scope
27 |         var proc = kinfo_proc.init()
28 |         var size = MemoryLayout<kinfo_proc>.size
/host/spi-builder-workspace/Sources/FlightLog/Utility.swift:26:42: error: cannot find 'KERN_PROC_PID' in scope
24 |     public static func getProcessStartDate() -> Date {
25 |         let pid = ProcessInfo.processInfo.processIdentifier
26 |         var mib = [ CTL_KERN, KERN_PROC, KERN_PROC_PID, pid ]
   |                                          `- error: cannot find 'KERN_PROC_PID' in scope
27 |         var proc = kinfo_proc.init()
28 |         var size = MemoryLayout<kinfo_proc>.size
/host/spi-builder-workspace/Sources/FlightLog/Utility.swift:27:20: error: cannot find 'kinfo_proc' in scope
25 |         let pid = ProcessInfo.processInfo.processIdentifier
26 |         var mib = [ CTL_KERN, KERN_PROC, KERN_PROC_PID, pid ]
27 |         var proc = kinfo_proc.init()
   |                    `- error: cannot find 'kinfo_proc' in scope
28 |         var size = MemoryLayout<kinfo_proc>.size
29 |         sysctl(&mib, 4, &proc, &size, nil, 0)
/host/spi-builder-workspace/Sources/FlightLog/Utility.swift:28:33: error: cannot find type 'kinfo_proc' in scope
26 |         var mib = [ CTL_KERN, KERN_PROC, KERN_PROC_PID, pid ]
27 |         var proc = kinfo_proc.init()
28 |         var size = MemoryLayout<kinfo_proc>.size
   |                                 `- error: cannot find type 'kinfo_proc' in scope
29 |         sysctl(&mib, 4, &proc, &size, nil, 0)
30 |
/host/spi-builder-workspace/Sources/FlightLog/Utility.swift:29:9: error: cannot find 'sysctl' in scope
27 |         var proc = kinfo_proc.init()
28 |         var size = MemoryLayout<kinfo_proc>.size
29 |         sysctl(&mib, 4, &proc, &size, nil, 0)
   |         `- error: cannot find 'sysctl' in scope
30 |
31 |         return Date.init(
/host/spi-builder-workspace/Sources/FlightLog/Utility.swift:29:39: error: 'nil' requires a contextual type
27 |         var proc = kinfo_proc.init()
28 |         var size = MemoryLayout<kinfo_proc>.size
29 |         sysctl(&mib, 4, &proc, &size, nil, 0)
   |                                       `- error: 'nil' requires a contextual type
30 |
31 |         return Date.init(
[6/8] Compiling FlightLog Log.swift
/host/spi-builder-workspace/Sources/FlightLog/Log.swift:42:16: warning: static property 'ignorLevelValue' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
40 |     }
41 |
42 |     static var ignorLevelValue: UInt8 = 0x0
   |                |- warning: static property 'ignorLevelValue' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
   |                |- note: convert 'ignorLevelValue' to a 'let' constant to make 'Sendable' shared state immutable
   |                |- note: add '@MainActor' to make static property 'ignorLevelValue' part of global actor 'MainActor'
   |                `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
43 |
44 |     public static func setIngore(levels: [Log]) {
/host/spi-builder-workspace/Sources/FlightLog/Log.swift:51:23: warning: static property 'outputMethod' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
49 |     }
50 |
51 |     public static var outputMethod: OutputMethod = .print
   |                       |- warning: static property 'outputMethod' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
   |                       |- note: convert 'outputMethod' to a 'let' constant to make 'Sendable' shared state immutable
   |                       |- note: add '@MainActor' to make static property 'outputMethod' part of global actor 'MainActor'
   |                       `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
52 |
53 |     /// 记录日志
[7/8] Emitting module FlightLog
/host/spi-builder-workspace/Sources/FlightLog/Log.swift:42:16: warning: static property 'ignorLevelValue' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
40 |     }
41 |
42 |     static var ignorLevelValue: UInt8 = 0x0
   |                |- warning: static property 'ignorLevelValue' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
   |                |- note: convert 'ignorLevelValue' to a 'let' constant to make 'Sendable' shared state immutable
   |                |- note: add '@MainActor' to make static property 'ignorLevelValue' part of global actor 'MainActor'
   |                `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
43 |
44 |     public static func setIngore(levels: [Log]) {
/host/spi-builder-workspace/Sources/FlightLog/Log.swift:51:23: warning: static property 'outputMethod' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
49 |     }
50 |
51 |     public static var outputMethod: OutputMethod = .print
   |                       |- warning: static property 'outputMethod' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
   |                       |- note: convert 'outputMethod' to a 'let' constant to make 'Sendable' shared state immutable
   |                       |- note: add '@MainActor' to make static property 'outputMethod' part of global actor 'MainActor'
   |                       `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
52 |
53 |     /// 记录日志
/host/spi-builder-workspace/Sources/FlightLog/LogReorder.swift:11:23: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'LogRecorder' may have shared mutable state; this is an error in the Swift 6 language mode
 8 | import Foundation
 9 |
10 | public class LogRecorder {
   |              `- note: class 'LogRecorder' does not conform to the 'Sendable' protocol
11 |     public static let shared = LogRecorder()
   |                       |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'LogRecorder' may have shared mutable state; this is an error in the Swift 6 language mode
   |                       |- note: add '@MainActor' to make static property 'shared' part of global actor 'MainActor'
   |                       `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
12 |
13 |     public let rootPath: String
[8/8] Compiling FlightLog LogReorder.swift
/host/spi-builder-workspace/Sources/FlightLog/LogReorder.swift:11:23: warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'LogRecorder' may have shared mutable state; this is an error in the Swift 6 language mode
 8 | import Foundation
 9 |
10 | public class LogRecorder {
   |              `- note: class 'LogRecorder' does not conform to the 'Sendable' protocol
11 |     public static let shared = LogRecorder()
   |                       |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'LogRecorder' may have shared mutable state; this is an error in the Swift 6 language mode
   |                       |- note: add '@MainActor' to make static property 'shared' part of global actor 'MainActor'
   |                       `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
12 |
13 |     public let rootPath: String
/host/spi-builder-workspace/Sources/FlightLog/LogReorder.swift:71:9: error: cannot find 'dup2' in scope
69 |         setvbuf(stdout, nil, _IONBF, 0)
70 |         setvbuf(stderr, nil, _IONBF, 0)
71 |         dup2(logFileHandle.fileDescriptor, STDOUT_FILENO)
   |         `- error: cannot find 'dup2' in scope
72 |         dup2(logFileHandle.fileDescriptor, STDERR_FILENO)
73 |
/host/spi-builder-workspace/Sources/FlightLog/LogReorder.swift:72:9: error: cannot find 'dup2' in scope
70 |         setvbuf(stderr, nil, _IONBF, 0)
71 |         dup2(logFileHandle.fileDescriptor, STDOUT_FILENO)
72 |         dup2(logFileHandle.fileDescriptor, STDERR_FILENO)
   |         `- error: cannot find 'dup2' in scope
73 |
74 |         self.logFilePath = filePath
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-4606859-3":/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:7e37457820e5f17452a98118754f345f2619722c485f2db0d8b666940a83afd2
Status: Image is up to date for registry.gitlab.com/finestructure/spi-images:wasm-6.1-latest
[0/1] Planning build
Building for debugging...
[0/1] Write swift-version-24593BA9C3E375BF.txt
[2/7] Compiling FlightLog LogReorder.swift
/host/spi-builder-workspace/Sources/FlightLog/LogReorder.swift:71:9: error: cannot find 'dup2' in scope
69 |         setvbuf(stdout, nil, _IONBF, 0)
70 |         setvbuf(stderr, nil, _IONBF, 0)
71 |         dup2(logFileHandle.fileDescriptor, STDOUT_FILENO)
   |         `- error: cannot find 'dup2' in scope
72 |         dup2(logFileHandle.fileDescriptor, STDERR_FILENO)
73 |
/host/spi-builder-workspace/Sources/FlightLog/LogReorder.swift:72:9: error: cannot find 'dup2' in scope
70 |         setvbuf(stderr, nil, _IONBF, 0)
71 |         dup2(logFileHandle.fileDescriptor, STDOUT_FILENO)
72 |         dup2(logFileHandle.fileDescriptor, STDERR_FILENO)
   |         `- error: cannot find 'dup2' in scope
73 |
74 |         self.logFilePath = filePath
[3/7] Compiling FlightLog Utility.swift
/host/spi-builder-workspace/Sources/FlightLog/Utility.swift:26:21: error: cannot find 'CTL_KERN' in scope
24 |     public static func getProcessStartDate() -> Date {
25 |         let pid = ProcessInfo.processInfo.processIdentifier
26 |         var mib = [ CTL_KERN, KERN_PROC, KERN_PROC_PID, pid ]
   |                     `- error: cannot find 'CTL_KERN' in scope
27 |         var proc = kinfo_proc.init()
28 |         var size = MemoryLayout<kinfo_proc>.size
/host/spi-builder-workspace/Sources/FlightLog/Utility.swift:26:31: error: cannot find 'KERN_PROC' in scope
24 |     public static func getProcessStartDate() -> Date {
25 |         let pid = ProcessInfo.processInfo.processIdentifier
26 |         var mib = [ CTL_KERN, KERN_PROC, KERN_PROC_PID, pid ]
   |                               `- error: cannot find 'KERN_PROC' in scope
27 |         var proc = kinfo_proc.init()
28 |         var size = MemoryLayout<kinfo_proc>.size
/host/spi-builder-workspace/Sources/FlightLog/Utility.swift:26:42: error: cannot find 'KERN_PROC_PID' in scope
24 |     public static func getProcessStartDate() -> Date {
25 |         let pid = ProcessInfo.processInfo.processIdentifier
26 |         var mib = [ CTL_KERN, KERN_PROC, KERN_PROC_PID, pid ]
   |                                          `- error: cannot find 'KERN_PROC_PID' in scope
27 |         var proc = kinfo_proc.init()
28 |         var size = MemoryLayout<kinfo_proc>.size
/host/spi-builder-workspace/Sources/FlightLog/Utility.swift:27:20: error: cannot find 'kinfo_proc' in scope
25 |         let pid = ProcessInfo.processInfo.processIdentifier
26 |         var mib = [ CTL_KERN, KERN_PROC, KERN_PROC_PID, pid ]
27 |         var proc = kinfo_proc.init()
   |                    `- error: cannot find 'kinfo_proc' in scope
28 |         var size = MemoryLayout<kinfo_proc>.size
29 |         sysctl(&mib, 4, &proc, &size, nil, 0)
/host/spi-builder-workspace/Sources/FlightLog/Utility.swift:28:33: error: cannot find type 'kinfo_proc' in scope
26 |         var mib = [ CTL_KERN, KERN_PROC, KERN_PROC_PID, pid ]
27 |         var proc = kinfo_proc.init()
28 |         var size = MemoryLayout<kinfo_proc>.size
   |                                 `- error: cannot find type 'kinfo_proc' in scope
29 |         sysctl(&mib, 4, &proc, &size, nil, 0)
30 |
/host/spi-builder-workspace/Sources/FlightLog/Utility.swift:29:9: error: cannot find 'sysctl' in scope
27 |         var proc = kinfo_proc.init()
28 |         var size = MemoryLayout<kinfo_proc>.size
29 |         sysctl(&mib, 4, &proc, &size, nil, 0)
   |         `- error: cannot find 'sysctl' in scope
30 |
31 |         return Date.init(
/host/spi-builder-workspace/Sources/FlightLog/Utility.swift:29:39: error: 'nil' requires a contextual type
27 |         var proc = kinfo_proc.init()
28 |         var size = MemoryLayout<kinfo_proc>.size
29 |         sysctl(&mib, 4, &proc, &size, nil, 0)
   |                                       `- error: 'nil' requires a contextual type
30 |
31 |         return Date.init(
[4/7] Compiling FlightLog FileManagerProtocol.swift
[5/7] Compiling FlightLog FileHandleFactory.swift
[6/7] Emitting module FlightLog
[7/7] Compiling FlightLog Log.swift
BUILD FAILURE 6.1 wasm