Build Information
Successful build of WKWebViewJavascriptBridge with Swift 6.0 for macOS (SPM).
Swift 6 data race errors: 0
Build Command
env DEVELOPER_DIR=/Applications/Xcode-15.3.0.app xcrun --toolchain org.swift.600202405261a swift build --arch arm64 -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete
Build Log
========================================
RunAll
========================================
Builder version: 4.40.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/Lision/WKWebViewJavascriptBridge.git
Reference: master
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/Lision/WKWebViewJavascriptBridge
* branch master -> FETCH_HEAD
* [new branch] master -> origin/master
HEAD is now at 51cdc11 Merge pull request #37 from thomersch/master
Cloned https://github.com/Lision/WKWebViewJavascriptBridge.git
Revision (git rev-parse @):
51cdc110657e5ad469df712ca79632761d3fe11d
SUCCESS checkout https://github.com/Lision/WKWebViewJavascriptBridge.git at master
========================================
Build
========================================
Selected platform: macosSpm
Swift version: 6.0
Building package at path: $workDir
https://github.com/Lision/WKWebViewJavascriptBridge.git
Running build ...
env DEVELOPER_DIR=/Applications/Xcode-15.3.0.app xcrun --toolchain org.swift.600202405261a swift build --arch arm64 -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete
Building for debugging...
[0/2] Write sources
[1/2] Write swift-version-6F35C1178C84523A.txt
[3/6] Compiling WKWebViewJavascriptBridge WKWebViewJavascriptBridgeJS.swift
[4/6] Compiling WKWebViewJavascriptBridge WKWebViewJavascriptBridgeBase.swift
/Users/admin/builder/spi-builder-workspace/WKWebViewJavascriptBridge/WKWebViewJavascriptBridgeBase.swift:138:17: warning: capture of 'self' with non-sendable type 'WKWebViewJavascriptBridgeBase' in a `@Sendable` closure; this is an error in the Swift 6 language mode
22 |
23 | @available(iOS 9.0, *)
24 | public class WKWebViewJavascriptBridgeBase: NSObject {
| `- note: class 'WKWebViewJavascriptBridgeBase' does not conform to the 'Sendable' protocol
25 | var isLogEnable = false
26 |
:
136 | } else {
137 | DispatchQueue.main.async {
138 | self.delegate?.evaluateJavascript(javascript: javascriptCommand)
| `- warning: capture of 'self' with non-sendable type 'WKWebViewJavascriptBridgeBase' in a `@Sendable` closure; this is an error in the Swift 6 language mode
139 | }
140 | }
/Users/admin/builder/spi-builder-workspace/WKWebViewJavascriptBridge/WKWebViewJavascriptBridgeBase.swift:138:17: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
136 | } else {
137 | DispatchQueue.main.async {
138 | self.delegate?.evaluateJavascript(javascript: javascriptCommand)
| |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
| `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
139 | }
140 | }
[5/6] Emitting module WKWebViewJavascriptBridge
[6/6] Compiling WKWebViewJavascriptBridge WKWebViewJavascriptBridge.swift
/Users/admin/builder/spi-builder-workspace/WKWebViewJavascriptBridge/WKWebViewJavascriptBridge.swift:60:18: warning: call to main actor-isolated instance method 'evaluateJavaScript(_:completionHandler:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
57 |
58 | // MARK: - Private Funcs
59 | private func flushMessageQueue() {
| `- note: add '@MainActor' to make instance method 'flushMessageQueue()' part of global actor 'MainActor'
60 | webView?.evaluateJavaScript("WKWebViewJavascriptBridge._fetchQueue();") { (result, error) in
| `- warning: call to main actor-isolated instance method 'evaluateJavaScript(_:completionHandler:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
61 | if error != nil {
62 | print("WKWebViewJavascriptBridge: WARNING: Error when trying to fetch data from WKWebView: \(String(describing: error))")
WebKit.WKWebView:46:26: note: calls to instance method 'evaluateJavaScript(_:completionHandler:)' from outside of its actor context are implicitly asynchronous
44 | open func reloadFromOrigin() -> WKNavigation?
45 | open func stopLoading()
46 | @MainActor open func evaluateJavaScript(_ javaScriptString: String, completionHandler: ((Any?, (any Error)?) -> Void)? = nil)
| `- note: calls to instance method 'evaluateJavaScript(_:completionHandler:)' from outside of its actor context are implicitly asynchronous
47 | open func evaluateJavaScript(_ javaScriptString: String) async throws -> Any
48 | @available(macOS 11.0, *)
/Users/admin/builder/spi-builder-workspace/WKWebViewJavascriptBridge/WKWebViewJavascriptBridge.swift:71:18: warning: main actor-isolated property 'configuration' can not be referenced from a non-isolated context; this is an error in the Swift 6 language mode
68 | }
69 |
70 | private func addScriptMessageHandlers() {
| `- note: add '@MainActor' to make instance method 'addScriptMessageHandlers()' part of global actor 'MainActor'
71 | webView?.configuration.userContentController.add(LeakAvoider(delegate: self), name: iOS_Native_InjectJavascript)
| `- warning: main actor-isolated property 'configuration' can not be referenced from a non-isolated context; this is an error in the Swift 6 language mode
72 | webView?.configuration.userContentController.add(LeakAvoider(delegate: self), name: iOS_Native_FlushMessageQueue)
73 | }
WebKit.WKWebView:3:25: note: property declared here
1 | @available(macOS 10.10, *)
2 | @MainActor open class WKWebView : NSView {
3 | @NSCopying open var configuration: WKWebViewConfiguration { get }
| `- note: property declared here
4 | weak open var navigationDelegate: (any WKNavigationDelegate)? { get set }
5 | weak open var uiDelegate: (any WKUIDelegate)? { get set }
/Users/admin/builder/spi-builder-workspace/WKWebViewJavascriptBridge/WKWebViewJavascriptBridge.swift:72:18: warning: main actor-isolated property 'configuration' can not be referenced from a non-isolated context; this is an error in the Swift 6 language mode
68 | }
69 |
70 | private func addScriptMessageHandlers() {
| `- note: add '@MainActor' to make instance method 'addScriptMessageHandlers()' part of global actor 'MainActor'
71 | webView?.configuration.userContentController.add(LeakAvoider(delegate: self), name: iOS_Native_InjectJavascript)
72 | webView?.configuration.userContentController.add(LeakAvoider(delegate: self), name: iOS_Native_FlushMessageQueue)
| `- warning: main actor-isolated property 'configuration' can not be referenced from a non-isolated context; this is an error in the Swift 6 language mode
73 | }
74 |
WebKit.WKWebView:3:25: note: property declared here
1 | @available(macOS 10.10, *)
2 | @MainActor open class WKWebView : NSView {
3 | @NSCopying open var configuration: WKWebViewConfiguration { get }
| `- note: property declared here
4 | weak open var navigationDelegate: (any WKNavigationDelegate)? { get set }
5 | weak open var uiDelegate: (any WKUIDelegate)? { get set }
/Users/admin/builder/spi-builder-workspace/WKWebViewJavascriptBridge/WKWebViewJavascriptBridge.swift:76:18: warning: main actor-isolated property 'configuration' can not be referenced from a non-isolated context; this is an error in the Swift 6 language mode
73 | }
74 |
75 | private func removeScriptMessageHandlers() {
| `- note: add '@MainActor' to make instance method 'removeScriptMessageHandlers()' part of global actor 'MainActor'
76 | webView?.configuration.userContentController.removeScriptMessageHandler(forName: iOS_Native_InjectJavascript)
| `- warning: main actor-isolated property 'configuration' can not be referenced from a non-isolated context; this is an error in the Swift 6 language mode
77 | webView?.configuration.userContentController.removeScriptMessageHandler(forName: iOS_Native_FlushMessageQueue)
78 | }
WebKit.WKWebView:3:25: note: property declared here
1 | @available(macOS 10.10, *)
2 | @MainActor open class WKWebView : NSView {
3 | @NSCopying open var configuration: WKWebViewConfiguration { get }
| `- note: property declared here
4 | weak open var navigationDelegate: (any WKNavigationDelegate)? { get set }
5 | weak open var uiDelegate: (any WKUIDelegate)? { get set }
/Users/admin/builder/spi-builder-workspace/WKWebViewJavascriptBridge/WKWebViewJavascriptBridge.swift:77:18: warning: main actor-isolated property 'configuration' can not be referenced from a non-isolated context; this is an error in the Swift 6 language mode
73 | }
74 |
75 | private func removeScriptMessageHandlers() {
| `- note: add '@MainActor' to make instance method 'removeScriptMessageHandlers()' part of global actor 'MainActor'
76 | webView?.configuration.userContentController.removeScriptMessageHandler(forName: iOS_Native_InjectJavascript)
77 | webView?.configuration.userContentController.removeScriptMessageHandler(forName: iOS_Native_FlushMessageQueue)
| `- warning: main actor-isolated property 'configuration' can not be referenced from a non-isolated context; this is an error in the Swift 6 language mode
78 | }
79 | }
WebKit.WKWebView:3:25: note: property declared here
1 | @available(macOS 10.10, *)
2 | @MainActor open class WKWebView : NSView {
3 | @NSCopying open var configuration: WKWebViewConfiguration { get }
| `- note: property declared here
4 | weak open var navigationDelegate: (any WKNavigationDelegate)? { get set }
5 | weak open var uiDelegate: (any WKUIDelegate)? { get set }
/Users/admin/builder/spi-builder-workspace/WKWebViewJavascriptBridge/WKWebViewJavascriptBridge.swift:83:18: warning: call to main actor-isolated instance method 'evaluateJavaScript(_:completionHandler:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
80 |
81 | extension WKWebViewJavascriptBridge: WKWebViewJavascriptBridgeBaseDelegate {
82 | func evaluateJavascript(javascript: String, completion: CompletionHandler) {
| `- note: add '@MainActor' to make instance method 'evaluateJavascript(javascript:completion:)' part of global actor 'MainActor'
83 | webView?.evaluateJavaScript(javascript, completionHandler: completion)
| `- warning: call to main actor-isolated instance method 'evaluateJavaScript(_:completionHandler:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
84 | }
85 | }
WebKit.WKWebView:46:26: note: calls to instance method 'evaluateJavaScript(_:completionHandler:)' from outside of its actor context are implicitly asynchronous
44 | open func reloadFromOrigin() -> WKNavigation?
45 | open func stopLoading()
46 | @MainActor open func evaluateJavaScript(_ javaScriptString: String, completionHandler: ((Any?, (any Error)?) -> Void)? = nil)
| `- note: calls to instance method 'evaluateJavaScript(_:completionHandler:)' from outside of its actor context are implicitly asynchronous
47 | open func evaluateJavaScript(_ javaScriptString: String) async throws -> Any
48 | @available(macOS 11.0, *)
/Users/admin/builder/spi-builder-workspace/WKWebViewJavascriptBridge/WKWebViewJavascriptBridge.swift:60:18: warning: sending task-isolated value of type '(Any?, (any Error)?) -> Void' with later accesses to main actor-isolated context risks causing data races; this is an error in the Swift 6 language mode
58 | // MARK: - Private Funcs
59 | private func flushMessageQueue() {
60 | webView?.evaluateJavaScript("WKWebViewJavascriptBridge._fetchQueue();") { (result, error) in
| `- warning: sending task-isolated value of type '(Any?, (any Error)?) -> Void' with later accesses to main actor-isolated context risks causing data races; this is an error in the Swift 6 language mode
61 | if error != nil {
62 | print("WKWebViewJavascriptBridge: WARNING: Error when trying to fetch data from WKWebView: \(String(describing: error))")
/Users/admin/builder/spi-builder-workspace/WKWebViewJavascriptBridge/WKWebViewJavascriptBridge.swift:83:18: warning: sending task-isolated value of type 'WKWebViewJavascriptBridge.CompletionHandler' (aka 'Optional<((Optional<Any>, Optional<any Error>) -> ())>') with later accesses to main actor-isolated context risks causing data races; this is an error in the Swift 6 language mode
81 | extension WKWebViewJavascriptBridge: WKWebViewJavascriptBridgeBaseDelegate {
82 | func evaluateJavascript(javascript: String, completion: CompletionHandler) {
83 | webView?.evaluateJavaScript(javascript, completionHandler: completion)
| `- warning: sending task-isolated value of type 'WKWebViewJavascriptBridge.CompletionHandler' (aka 'Optional<((Optional<Any>, Optional<any Error>) -> ())>') with later accesses to main actor-isolated context risks causing data races; this is an error in the Swift 6 language mode
84 | }
85 | }
Build complete! (24.99s)
warning: 'spi-builder-workspace': found 1 file(s) which are unhandled; explicitly declare them as resources or exclude from the target
/Users/admin/builder/spi-builder-workspace/WKWebViewJavascriptBridge/Info.plist
Build complete.
{
"dependencies" : [
],
"manifest_display_name" : "WKWebViewJavascriptBridge",
"name" : "WKWebViewJavascriptBridge",
"path" : "/Users/admin/builder/spi-builder-workspace",
"platforms" : [
],
"products" : [
{
"name" : "WKWebViewJavascriptBridge",
"targets" : [
"WKWebViewJavascriptBridge"
],
"type" : {
"library" : [
"automatic"
]
}
}
],
"targets" : [
{
"c99name" : "WKWebViewJavascriptBridge",
"module_type" : "SwiftTarget",
"name" : "WKWebViewJavascriptBridge",
"path" : "WKWebViewJavascriptBridge",
"product_memberships" : [
"WKWebViewJavascriptBridge"
],
"sources" : [
"WKWebViewJavascriptBridge.swift",
"WKWebViewJavascriptBridgeBase.swift",
"WKWebViewJavascriptBridgeJS.swift"
],
"type" : "library"
}
],
"tools_version" : "5.5"
}
Done.