The Swift Package Index logo.Swift Package Index

Track the adoption of Swift 6 strict concurrency checks for data race safety. How many packages are Ready for Swift 6?

Build Information

Failed to build SwiftObjCBridge, reference 0.0.2 (1aba3c), with Swift 6.0 for Linux on 2 Nov 2024 11:28:06 UTC.

Build Command

bash -c docker run --pull=always --rm -v "checkouts-4609320-0":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:basic-6.0-latest swift build --triple x86_64-unknown-linux-gnu -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete 2>&1

Build Log

========================================
RunAll
========================================
Builder version: 4.56.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/helje5/SwiftObjCBridge.git
Reference: 0.0.2
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/helje5/SwiftObjCBridge
 * tag               0.0.2      -> FETCH_HEAD
HEAD is now at 1aba3cd Travis: Do not build on Linux
Cloned https://github.com/helje5/SwiftObjCBridge.git
Revision (git rev-parse @):
1aba3cdb23e006ebffd474ed4d5bb7945faf4196
SUCCESS checkout https://github.com/helje5/SwiftObjCBridge.git at 0.0.2
========================================
Build
========================================
Selected platform:         linux
Swift version:             6.0
Building package at path:  $PWD
https://github.com/helje5/SwiftObjCBridge.git
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-4609320-0":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:basic-6.0-latest swift build --triple x86_64-unknown-linux-gnu -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete 2>&1
basic-6.0-latest: Pulling from finestructure/spi-images
Digest: sha256:47d26c99ca4f1ac0a332c85fd5b13ff4390e72115219984a57a68fe9d1063a05
Status: Image is up to date for registry.gitlab.com/finestructure/spi-images:basic-6.0-latest
Building for debugging...
[0/2] Write sources
[1/2] Write swift-version-24593BA9C3E375BF.txt
error: emit-module command failed with exit code 1 (use -v to see invocation)
[3/4] Emitting module SwiftObjCBridge
/host/spi-builder-workspace/Sources/SwiftObjCBridge/SwiftObjCBridge.swift:115:12: warning: let 'ObjC' is not concurrency-safe because non-'Sendable' type 'ObjCRuntime' may have shared mutable state; this is an error in the Swift 6 language mode
  7 |
  8 | @dynamicMemberLookup
  9 | public struct ObjCRuntime {
    |               `- note: consider making struct 'ObjCRuntime' conform to the 'Sendable' protocol
 10 |
 11 |     public typealias Args = KeyValuePairs<String, Any>
    :
113 | }
114 |
115 | public let ObjC = ObjCRuntime()
    |            |- warning: let 'ObjC' is not concurrency-safe because non-'Sendable' type 'ObjCRuntime' may have shared mutable state; this is an error in the Swift 6 language mode
    |            |- note: annotate 'ObjC' with '@MainActor' if property should only be accessed from the main actor
    |            `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
116 |
/host/spi-builder-workspace/Sources/SwiftObjCBridge/SwiftObjCBridge.swift:28:28: error: cannot find 'sel_getUid' in scope
 26 |                 $0 + $1.key + ":"
 27 |             }
 28 |             let selector = sel_getUid(stringSelector)
    |                            `- error: cannot find 'sel_getUid' in scope
 29 |
 30 |             guard let isa = object_getClass(target),
/host/spi-builder-workspace/Sources/SwiftObjCBridge/SwiftObjCBridge.swift:30:29: error: cannot find 'object_getClass' in scope
 28 |             let selector = sel_getUid(stringSelector)
 29 |
 30 |             guard let isa = object_getClass(target),
    |                             `- error: cannot find 'object_getClass' in scope
 31 |                   let i = class_getInstanceMethod(isa, selector) else {
 32 |                 return Object(handle: nil)
/host/spi-builder-workspace/Sources/SwiftObjCBridge/SwiftObjCBridge.swift:31:27: error: cannot find 'class_getInstanceMethod' in scope
 29 |
 30 |             guard let isa = object_getClass(target),
 31 |                   let i = class_getInstanceMethod(isa, selector) else {
    |                           `- error: cannot find 'class_getInstanceMethod' in scope
 32 |                 return Object(handle: nil)
 33 |             }
/host/spi-builder-workspace/Sources/SwiftObjCBridge/SwiftObjCBridge.swift:34:21: error: cannot find 'method_getImplementation' in scope
 32 |                 return Object(handle: nil)
 33 |             }
 34 |             let m = method_getImplementation(i)
    |                     `- error: cannot find 'method_getImplementation' in scope
 35 |
 36 |             var buf = [ Int8 ](repeating: 0, count: 46)
/host/spi-builder-workspace/Sources/SwiftObjCBridge/SwiftObjCBridge.swift:37:13: error: cannot find 'method_getReturnType' in scope
 35 |
 36 |             var buf = [ Int8 ](repeating: 0, count: 46)
 37 |             method_getReturnType(i, &buf, buf.count)
    |             `- error: cannot find 'method_getReturnType' in scope
 38 |             let returnType = String(cString: &buf)
 39 |
/host/spi-builder-workspace/Sources/SwiftObjCBridge/SwiftObjCBridge.swift:41:31: error: cannot find type 'Selector' in scope
 39 |
 40 |             typealias M0 = @convention(c)
 41 |                 ( AnyObject?, Selector ) -> UnsafeRawPointer?
    |                               `- error: cannot find type 'Selector' in scope
 42 |             typealias M1 = @convention(c)
 43 |                 ( AnyObject?, Selector, AnyObject? ) -> UnsafeRawPointer?
/host/spi-builder-workspace/Sources/SwiftObjCBridge/SwiftObjCBridge.swift:43:31: error: cannot find type 'Selector' in scope
 41 |                 ( AnyObject?, Selector ) -> UnsafeRawPointer?
 42 |             typealias M1 = @convention(c)
 43 |                 ( AnyObject?, Selector, AnyObject? ) -> UnsafeRawPointer?
    |                               `- error: cannot find type 'Selector' in scope
 44 |
 45 |             let result : UnsafeRawPointer?
/host/spi-builder-workspace/Sources/SwiftObjCBridge/SwiftObjCBridge.swift:48:39: error: generic parameter 'U' could not be inferred
 46 |             switch arguments.count {
 47 |                 case 0:
 48 |                     let typedMethod = unsafeBitCast(m, to: M0.self)
    |                                       `- error: generic parameter 'U' could not be inferred
 49 |                     result = typedMethod(target, selector)
 50 |                 case 1:
Swift.unsafeBitCast:1:24: note: in call to function 'unsafeBitCast(_:to:)'
1 | @inlinable public func unsafeBitCast<T, U>(_ x: T, to type: U.Type) -> U
  |                        `- note: in call to function 'unsafeBitCast(_:to:)'
/host/spi-builder-workspace/Sources/SwiftObjCBridge/SwiftObjCBridge.swift:51:39: error: generic parameter 'U' could not be inferred
 49 |                     result = typedMethod(target, selector)
 50 |                 case 1:
 51 |                     let typedMethod = unsafeBitCast(m, to: M1.self)
    |                                       `- error: generic parameter 'U' could not be inferred
 52 |                     result = typedMethod(target, selector,
 53 |                                          arguments[0].value as AnyObject)
Swift.unsafeBitCast:1:24: note: in call to function 'unsafeBitCast(_:to:)'
1 | @inlinable public func unsafeBitCast<T, U>(_ x: T, to type: U.Type) -> U
  |                        `- note: in call to function 'unsafeBitCast(_:to:)'
[4/4] Compiling SwiftObjCBridge SwiftObjCBridge.swift
/host/spi-builder-workspace/Sources/SwiftObjCBridge/SwiftObjCBridge.swift:115:12: warning: let 'ObjC' is not concurrency-safe because non-'Sendable' type 'ObjCRuntime' may have shared mutable state; this is an error in the Swift 6 language mode
  7 |
  8 | @dynamicMemberLookup
  9 | public struct ObjCRuntime {
    |               `- note: consider making struct 'ObjCRuntime' conform to the 'Sendable' protocol
 10 |
 11 |     public typealias Args = KeyValuePairs<String, Any>
    :
113 | }
114 |
115 | public let ObjC = ObjCRuntime()
    |            |- warning: let 'ObjC' is not concurrency-safe because non-'Sendable' type 'ObjCRuntime' may have shared mutable state; this is an error in the Swift 6 language mode
    |            |- note: annotate 'ObjC' with '@MainActor' if property should only be accessed from the main actor
    |            `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
116 |
/host/spi-builder-workspace/Sources/SwiftObjCBridge/SwiftObjCBridge.swift:28:28: error: cannot find 'sel_getUid' in scope
 26 |                 $0 + $1.key + ":"
 27 |             }
 28 |             let selector = sel_getUid(stringSelector)
    |                            `- error: cannot find 'sel_getUid' in scope
 29 |
 30 |             guard let isa = object_getClass(target),
/host/spi-builder-workspace/Sources/SwiftObjCBridge/SwiftObjCBridge.swift:30:29: error: cannot find 'object_getClass' in scope
 28 |             let selector = sel_getUid(stringSelector)
 29 |
 30 |             guard let isa = object_getClass(target),
    |                             `- error: cannot find 'object_getClass' in scope
 31 |                   let i = class_getInstanceMethod(isa, selector) else {
 32 |                 return Object(handle: nil)
/host/spi-builder-workspace/Sources/SwiftObjCBridge/SwiftObjCBridge.swift:31:27: error: cannot find 'class_getInstanceMethod' in scope
 29 |
 30 |             guard let isa = object_getClass(target),
 31 |                   let i = class_getInstanceMethod(isa, selector) else {
    |                           `- error: cannot find 'class_getInstanceMethod' in scope
 32 |                 return Object(handle: nil)
 33 |             }
/host/spi-builder-workspace/Sources/SwiftObjCBridge/SwiftObjCBridge.swift:34:21: error: cannot find 'method_getImplementation' in scope
 32 |                 return Object(handle: nil)
 33 |             }
 34 |             let m = method_getImplementation(i)
    |                     `- error: cannot find 'method_getImplementation' in scope
 35 |
 36 |             var buf = [ Int8 ](repeating: 0, count: 46)
/host/spi-builder-workspace/Sources/SwiftObjCBridge/SwiftObjCBridge.swift:37:13: error: cannot find 'method_getReturnType' in scope
 35 |
 36 |             var buf = [ Int8 ](repeating: 0, count: 46)
 37 |             method_getReturnType(i, &buf, buf.count)
    |             `- error: cannot find 'method_getReturnType' in scope
 38 |             let returnType = String(cString: &buf)
 39 |
/host/spi-builder-workspace/Sources/SwiftObjCBridge/SwiftObjCBridge.swift:41:31: error: cannot find type 'Selector' in scope
 39 |
 40 |             typealias M0 = @convention(c)
 41 |                 ( AnyObject?, Selector ) -> UnsafeRawPointer?
    |                               `- error: cannot find type 'Selector' in scope
 42 |             typealias M1 = @convention(c)
 43 |                 ( AnyObject?, Selector, AnyObject? ) -> UnsafeRawPointer?
/host/spi-builder-workspace/Sources/SwiftObjCBridge/SwiftObjCBridge.swift:43:31: error: cannot find type 'Selector' in scope
 41 |                 ( AnyObject?, Selector ) -> UnsafeRawPointer?
 42 |             typealias M1 = @convention(c)
 43 |                 ( AnyObject?, Selector, AnyObject? ) -> UnsafeRawPointer?
    |                               `- error: cannot find type 'Selector' in scope
 44 |
 45 |             let result : UnsafeRawPointer?
/host/spi-builder-workspace/Sources/SwiftObjCBridge/SwiftObjCBridge.swift:48:39: error: generic parameter 'U' could not be inferred
 46 |             switch arguments.count {
 47 |                 case 0:
 48 |                     let typedMethod = unsafeBitCast(m, to: M0.self)
    |                                       `- error: generic parameter 'U' could not be inferred
 49 |                     result = typedMethod(target, selector)
 50 |                 case 1:
Swift.unsafeBitCast:1:24: note: in call to function 'unsafeBitCast(_:to:)'
1 | @inlinable public func unsafeBitCast<T, U>(_ x: T, to type: U.Type) -> U
  |                        `- note: in call to function 'unsafeBitCast(_:to:)'
/host/spi-builder-workspace/Sources/SwiftObjCBridge/SwiftObjCBridge.swift:51:39: error: generic parameter 'U' could not be inferred
 49 |                     result = typedMethod(target, selector)
 50 |                 case 1:
 51 |                     let typedMethod = unsafeBitCast(m, to: M1.self)
    |                                       `- error: generic parameter 'U' could not be inferred
 52 |                     result = typedMethod(target, selector,
 53 |                                          arguments[0].value as AnyObject)
Swift.unsafeBitCast:1:24: note: in call to function 'unsafeBitCast(_:to:)'
1 | @inlinable public func unsafeBitCast<T, U>(_ x: T, to type: U.Type) -> U
  |                        `- note: in call to function 'unsafeBitCast(_:to:)'
/host/spi-builder-workspace/Sources/SwiftObjCBridge/SwiftObjCBridge.swift:95:59: error: argument type 'AnyClass' (aka 'any AnyObject.Type') expected to be an instance of a class or class-constrained type
 93 |
 94 |         public subscript(dynamicMember key: String) -> Callable {
 95 |             return Callable(instance: Object(handle: self.handle),
    |                                                           `- error: argument type 'AnyClass' (aka 'any AnyObject.Type') expected to be an instance of a class or class-constrained type
 96 |                             baseName: key)
 97 |         }
/host/spi-builder-workspace/Sources/SwiftObjCBridge/SwiftObjCBridge.swift:111:30: error: cannot find 'objc_lookUpClass' in scope
109 |
110 |     public subscript(dynamicMember key: String) -> Class {
111 |         return Class(handle: objc_lookUpClass(key))
    |                              `- error: cannot find 'objc_lookUpClass' in scope
112 |     }
113 | }
BUILD FAILURE 6.0 linux