Build Information
Failed to build WebView, reference main (6cc553
), with Swift 6.0 for macOS (SPM) on 31 Oct 2024 12:12:05 UTC.
Build Command
env DEVELOPER_DIR=/Applications/Xcode-16.1.0.app xcrun swift build --arch arm64 -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete
Build Log
========================================
RunAll
========================================
Builder version: 4.56.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/phatblat/WebView.git
Reference: main
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/phatblat/WebView
* branch main -> FETCH_HEAD
* [new branch] main -> origin/main
HEAD is now at 6cc5532 ✨ Add KeyPath subscripting
Cloned https://github.com/phatblat/WebView.git
Revision (git rev-parse @):
6cc5532aef4caa8fddd49062e2dac5c718e9e5c2
SUCCESS checkout https://github.com/phatblat/WebView.git at main
========================================
ResolveProductDependencies
========================================
Resolving dependencies ...
{
"identity": ".resolve-product-dependencies",
"name": "resolve-dependencies",
"url": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies",
"version": "unspecified",
"path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies",
"dependencies": [
{
"identity": "webview",
"name": "WebView",
"url": "https://github.com/phatblat/WebView.git",
"version": "unspecified",
"path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies/.build/checkouts/WebView",
"dependencies": [
]
}
]
}
Fetching https://github.com/phatblat/WebView.git
[1/188] Fetching webview
Fetched https://github.com/phatblat/WebView.git from cache (0.69s)
Creating working copy for https://github.com/phatblat/WebView.git
Working copy of https://github.com/phatblat/WebView.git resolved at main (6cc5532)
warning: '.resolve-product-dependencies': dependency 'webview' is not used by any target
Found 0 product dependencies
========================================
Build
========================================
Selected platform: macosSpm
Swift version: 6.0
Building package at path: $PWD
https://github.com/phatblat/WebView.git
Running build ...
env DEVELOPER_DIR=/Applications/Xcode-16.1.0.app xcrun 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--7754E27361AE5C74.txt
[3/5] Compiling WebView WebViewStore.swift
/Users/admin/builder/spi-builder-workspace/Sources/WebView/WebViewStore.swift:17:17: error: main actor-isolated default value in a nonisolated context
15 | /// Initializes a new WebView.
16 | /// - Parameter webView: Optional custom webview. Default WKWebView will be constructed if not provided.
17 | public init(webView: WKWebView = .init()) {
| `- error: main actor-isolated default value in a nonisolated context
18 | self.webView = webView
19 |
/Users/admin/builder/spi-builder-workspace/Sources/WebView/WebViewStore.swift:23:14: warning: main actor-isolated property 'preferences' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
21 | self.webView
22 | .configuration
23 | .preferences
| `- warning: main actor-isolated property 'preferences' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
24 | .setValue(true, forKey: "developerExtrasEnabled")
25 | #endif
WebKit.WKWebViewConfiguration:4:25: note: property declared here
2 | @MainActor open class WKWebViewConfiguration : NSObject, NSSecureCoding, NSCopying {
3 | open var processPool: WKProcessPool { get set }
4 | @MainActor open var preferences: WKPreferences { get set }
| `- note: property declared here
5 | open var userContentController: WKUserContentController { get set }
6 | @available(macOS 10.11, *)
/Users/admin/builder/spi-builder-workspace/Sources/WebView/WebViewStore.swift:22:14: warning: main actor-isolated property 'configuration' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
20 | #if DEBUG
21 | self.webView
22 | .configuration
| `- warning: main actor-isolated property 'configuration' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
23 | .preferences
24 | .setValue(true, forKey: "developerExtrasEnabled")
WebKit.WKWebView:3:36: note: property declared here
1 | @available(macOS 10.10, *)
2 | @MainActor open class WKWebView : NSView {
3 | @NSCopying @MainActor 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/Sources/WebView/WebViewStore.swift:51:21: warning: capture of 'self' with non-sendable type 'WebViewStore' in a `@Sendable` closure; this is an error in the Swift 6 language mode
3 |
4 | /// Provides access to webview data.
5 | public class WebViewStore: ObservableObject {
| `- note: class 'WebViewStore' does not conform to the 'Sendable' protocol
6 | private var observers = Set<NSKeyValueObservation>()
7 |
:
49 | return webView.observe(keyPath, options: [.prior]) { _, change in
50 | if change.isPrior {
51 | self.objectWillChange.send()
| `- warning: capture of 'self' with non-sendable type 'WebViewStore' in a `@Sendable` closure; this is an error in the Swift 6 language mode
52 | }
53 | }
/Users/admin/builder/spi-builder-workspace/Sources/WebView/WebViewStore.swift:58:31: warning: cannot form key path to main actor-isolated property 'title'; this is an error in the Swift 6 language mode
56 | // Observers for all KVO compliant properties
57 | observers = [
58 | subscriber(for: \.title),
| `- warning: cannot form key path to main actor-isolated property 'title'; this is an error in the Swift 6 language mode
59 | subscriber(for: \.url),
60 | subscriber(for: \.isLoading),
/Users/admin/builder/spi-builder-workspace/Sources/WebView/WebViewStore.swift:59:31: warning: cannot form key path to main actor-isolated property 'url'; this is an error in the Swift 6 language mode
57 | observers = [
58 | subscriber(for: \.title),
59 | subscriber(for: \.url),
| `- warning: cannot form key path to main actor-isolated property 'url'; this is an error in the Swift 6 language mode
60 | subscriber(for: \.isLoading),
61 | subscriber(for: \.estimatedProgress),
/Users/admin/builder/spi-builder-workspace/Sources/WebView/WebViewStore.swift:60:31: warning: cannot form key path to main actor-isolated property 'isLoading'; this is an error in the Swift 6 language mode
58 | subscriber(for: \.title),
59 | subscriber(for: \.url),
60 | subscriber(for: \.isLoading),
| `- warning: cannot form key path to main actor-isolated property 'isLoading'; this is an error in the Swift 6 language mode
61 | subscriber(for: \.estimatedProgress),
62 | subscriber(for: \.hasOnlySecureContent),
/Users/admin/builder/spi-builder-workspace/Sources/WebView/WebViewStore.swift:61:31: warning: cannot form key path to main actor-isolated property 'estimatedProgress'; this is an error in the Swift 6 language mode
59 | subscriber(for: \.url),
60 | subscriber(for: \.isLoading),
61 | subscriber(for: \.estimatedProgress),
| `- warning: cannot form key path to main actor-isolated property 'estimatedProgress'; this is an error in the Swift 6 language mode
62 | subscriber(for: \.hasOnlySecureContent),
63 | subscriber(for: \.serverTrust),
/Users/admin/builder/spi-builder-workspace/Sources/WebView/WebViewStore.swift:62:31: warning: cannot form key path to main actor-isolated property 'hasOnlySecureContent'; this is an error in the Swift 6 language mode
60 | subscriber(for: \.isLoading),
61 | subscriber(for: \.estimatedProgress),
62 | subscriber(for: \.hasOnlySecureContent),
| `- warning: cannot form key path to main actor-isolated property 'hasOnlySecureContent'; this is an error in the Swift 6 language mode
63 | subscriber(for: \.serverTrust),
64 | subscriber(for: \.canGoBack),
/Users/admin/builder/spi-builder-workspace/Sources/WebView/WebViewStore.swift:63:31: warning: cannot form key path to main actor-isolated property 'serverTrust'; this is an error in the Swift 6 language mode
61 | subscriber(for: \.estimatedProgress),
62 | subscriber(for: \.hasOnlySecureContent),
63 | subscriber(for: \.serverTrust),
| `- warning: cannot form key path to main actor-isolated property 'serverTrust'; this is an error in the Swift 6 language mode
64 | subscriber(for: \.canGoBack),
65 | subscriber(for: \.canGoForward)
/Users/admin/builder/spi-builder-workspace/Sources/WebView/WebViewStore.swift:64:31: warning: cannot form key path to main actor-isolated property 'canGoBack'; this is an error in the Swift 6 language mode
62 | subscriber(for: \.hasOnlySecureContent),
63 | subscriber(for: \.serverTrust),
64 | subscriber(for: \.canGoBack),
| `- warning: cannot form key path to main actor-isolated property 'canGoBack'; this is an error in the Swift 6 language mode
65 | subscriber(for: \.canGoForward)
66 | ]
/Users/admin/builder/spi-builder-workspace/Sources/WebView/WebViewStore.swift:65:31: warning: cannot form key path to main actor-isolated property 'canGoForward'; this is an error in the Swift 6 language mode
63 | subscriber(for: \.serverTrust),
64 | subscriber(for: \.canGoBack),
65 | subscriber(for: \.canGoForward)
| `- warning: cannot form key path to main actor-isolated property 'canGoForward'; this is an error in the Swift 6 language mode
66 | ]
67 | }
/Users/admin/builder/spi-builder-workspace/Sources/WebView/WebViewStore.swift:77:17: 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
74 | /// - html: HTML string of the new document.
75 | /// - baseURL: Optional base URL.
76 | func update(_ html: String, baseURL: URL? = nil) {
| `- note: add '@MainActor' to make instance method 'update(_:baseURL:)' part of global actor 'MainActor'
77 | webView.evaluateJavaScript("window.pageYOffset") { [weak self] object, 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
78 | guard let strongSelf = self else { return }
79 |
WebKit.WKWebView:46:15: 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 | open func evaluateJavaScript(_ javaScriptString: String, completionHandler: (@MainActor @Sendable (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/Sources/WebView/WebViewStore.swift:78:36: warning: capture of 'self' with non-sendable type 'WebViewStore?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
3 |
4 | /// Provides access to webview data.
5 | public class WebViewStore: ObservableObject {
| `- note: class 'WebViewStore' does not conform to the 'Sendable' protocol
6 | private var observers = Set<NSKeyValueObservation>()
7 |
:
76 | func update(_ html: String, baseURL: URL? = nil) {
77 | webView.evaluateJavaScript("window.pageYOffset") { [weak self] object, error in
78 | guard let strongSelf = self else { return }
| `- warning: capture of 'self' with non-sendable type 'WebViewStore?' in a `@Sendable` closure; this is an error in the Swift 6 language mode
79 |
80 | strongSelf.webView.loadHTMLString(html, baseURL: baseURL)
/Users/admin/builder/spi-builder-workspace/Sources/WebView/WebViewStore.swift:92:28: warning: call to main actor-isolated initializer 'init(source:injectionTime:forMainFrameOnly:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
88 | /// Instructs the webview to scroll the viewport.
89 | /// - Parameter yOffset: Vertical offset to scroll to.
90 | private func scrollTo(_ yOffset: Int) {
| `- note: add '@MainActor' to make instance method 'scrollTo' part of global actor 'MainActor'
91 | let script = "window.scrollTo(0, \(yOffset));"
92 | let scrollScript = WKUserScript(source: script, injectionTime: .atDocumentEnd, forMainFrameOnly: true)
| `- warning: call to main actor-isolated initializer 'init(source:injectionTime:forMainFrameOnly:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
93 | webView.configuration.userContentController.addUserScript(scrollScript)
94 | }
WebKit.WKUserScript:8:23: note: calls to initializer 'init(source:injectionTime:forMainFrameOnly:)' from outside of its actor context are implicitly asynchronous
6 | @available(swift, obsoleted: 3, renamed: "isForMainFrameOnly")
7 | open var forMainFrameOnly: Bool { get }
8 | @MainActor public init(source: String, injectionTime: WKUserScriptInjectionTime, forMainFrameOnly: Bool)
| `- note: calls to initializer 'init(source:injectionTime:forMainFrameOnly:)' from outside of its actor context are implicitly asynchronous
9 | @available(macOS 11.0, *)
10 | public init(source: String, injectionTime: WKUserScriptInjectionTime, forMainFrameOnly: Bool, in contentWorld: WKContentWorld)
/Users/admin/builder/spi-builder-workspace/Sources/WebView/WebViewStore.swift:93:53: warning: call to main actor-isolated instance method 'addUserScript' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
88 | /// Instructs the webview to scroll the viewport.
89 | /// - Parameter yOffset: Vertical offset to scroll to.
90 | private func scrollTo(_ yOffset: Int) {
| `- note: add '@MainActor' to make instance method 'scrollTo' part of global actor 'MainActor'
91 | let script = "window.scrollTo(0, \(yOffset));"
92 | let scrollScript = WKUserScript(source: script, injectionTime: .atDocumentEnd, forMainFrameOnly: true)
93 | webView.configuration.userContentController.addUserScript(scrollScript)
| `- warning: call to main actor-isolated instance method 'addUserScript' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
94 | }
95 | }
WebKit.WKUserContentController:4:26: note: calls to instance method 'addUserScript' from outside of its actor context are implicitly asynchronous
2 | @MainActor open class WKUserContentController : NSObject, NSSecureCoding {
3 | open var userScripts: [WKUserScript] { get }
4 | @MainActor open func addUserScript(_ userScript: WKUserScript)
| `- note: calls to instance method 'addUserScript' from outside of its actor context are implicitly asynchronous
5 | open func removeAllUserScripts()
6 | @available(macOS 11.0, *)
/Users/admin/builder/spi-builder-workspace/Sources/WebView/WebViewStore.swift:93:31: warning: main actor-isolated property 'userContentController' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
88 | /// Instructs the webview to scroll the viewport.
89 | /// - Parameter yOffset: Vertical offset to scroll to.
90 | private func scrollTo(_ yOffset: Int) {
| `- note: add '@MainActor' to make instance method 'scrollTo' part of global actor 'MainActor'
91 | let script = "window.scrollTo(0, \(yOffset));"
92 | let scrollScript = WKUserScript(source: script, injectionTime: .atDocumentEnd, forMainFrameOnly: true)
93 | webView.configuration.userContentController.addUserScript(scrollScript)
| `- warning: main actor-isolated property 'userContentController' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
94 | }
95 | }
WebKit.WKWebViewConfiguration:5:14: note: property declared here
3 | open var processPool: WKProcessPool { get set }
4 | @MainActor open var preferences: WKPreferences { get set }
5 | open var userContentController: WKUserContentController { get set }
| `- note: property declared here
6 | @available(macOS 10.11, *)
7 | open var websiteDataStore: WKWebsiteDataStore { get set }
/Users/admin/builder/spi-builder-workspace/Sources/WebView/WebViewStore.swift:93:17: warning: main actor-isolated property 'configuration' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
88 | /// Instructs the webview to scroll the viewport.
89 | /// - Parameter yOffset: Vertical offset to scroll to.
90 | private func scrollTo(_ yOffset: Int) {
| `- note: add '@MainActor' to make instance method 'scrollTo' part of global actor 'MainActor'
91 | let script = "window.scrollTo(0, \(yOffset));"
92 | let scrollScript = WKUserScript(source: script, injectionTime: .atDocumentEnd, forMainFrameOnly: true)
93 | webView.configuration.userContentController.addUserScript(scrollScript)
| `- warning: main actor-isolated property 'configuration' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
94 | }
95 | }
WebKit.WKWebView:3:36: note: property declared here
1 | @available(macOS 10.10, *)
2 | @MainActor open class WKWebView : NSView {
3 | @NSCopying @MainActor 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 }
error: emit-module command failed with exit code 1 (use -v to see invocation)
[4/5] Compiling WebView WebView.swift
[5/5] Emitting module WebView
/Users/admin/builder/spi-builder-workspace/Sources/WebView/WebViewStore.swift:17:17: error: main actor-isolated default value in a nonisolated context
15 | /// Initializes a new WebView.
16 | /// - Parameter webView: Optional custom webview. Default WKWebView will be constructed if not provided.
17 | public init(webView: WKWebView = .init()) {
| `- error: main actor-isolated default value in a nonisolated context
18 | self.webView = webView
19 |
BUILD FAILURE 6.0 macosSpm