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

Successful build of WebView, reference 0.1.1 (f41d4b), with Swift 6.1 for macOS (SPM) on 25 Apr 2025 01:20:20 UTC.

Swift 6 data race errors: 1

Build Command

env DEVELOPER_DIR=/Applications/Xcode-16.3.0.app xcrun swift build --arch arm64 -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

Build Log

========================================
RunAll
========================================
Builder version: 4.61.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/phatblat/WebView.git
Reference: 0.1.1
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/phatblat/WebView
 * tag               0.1.1      -> FETCH_HEAD
HEAD is now at f41d4b7 🐛 Fix compile error on iOS
Cloned https://github.com/phatblat/WebView.git
Revision (git rev-parse @):
f41d4b73c19bdb4b0227fd43b2d464d6c2e8d64e
SUCCESS checkout https://github.com/phatblat/WebView.git at 0.1.1
========================================
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.63s)
Creating working copy for https://github.com/phatblat/WebView.git
Working copy of https://github.com/phatblat/WebView.git resolved at 0.1.1 (f41d4b7)
warning: '.resolve-product-dependencies': dependency 'webview' is not used by any target
Found 0 product dependencies
========================================
Build
========================================
Selected platform:         macosSpm
Swift version:             6.1
Building package at path:  $PWD
https://github.com/phatblat/WebView.git
https://github.com/phatblat/WebView.git
{
  "dependencies" : [
  ],
  "manifest_display_name" : "WebView",
  "name" : "WebView",
  "path" : "/Users/admin/builder/spi-builder-workspace",
  "platforms" : [
    {
      "name" : "ios",
      "version" : "13.0"
    },
    {
      "name" : "watchos",
      "version" : "6.0"
    },
    {
      "name" : "tvos",
      "version" : "13.0"
    },
    {
      "name" : "macos",
      "version" : "10.15"
    }
  ],
  "products" : [
    {
      "name" : "WebView",
      "targets" : [
        "WebView"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "targets" : [
    {
      "c99name" : "WebViewTests",
      "module_type" : "SwiftTarget",
      "name" : "WebViewTests",
      "path" : "Tests/WebViewTests",
      "sources" : [
        "WebViewTests.swift"
      ],
      "target_dependencies" : [
        "WebView"
      ],
      "type" : "test"
    },
    {
      "c99name" : "WebView",
      "module_type" : "SwiftTarget",
      "name" : "WebView",
      "path" : "Sources/WebView",
      "product_memberships" : [
        "WebView"
      ],
      "sources" : [
        "NSViewContainerView.swift",
        "UIViewContainerView.swift",
        "WebView.swift",
        "WebViewStore.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "5.2"
}
Running build ...
env DEVELOPER_DIR=/Applications/Xcode-16.3.0.app xcrun swift build --arch arm64 -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
Building for debugging...
[0/2] Write sources
[1/2] Write swift-version-2F0A5646E1D333AE.txt
[3/7] Compiling WebView WebViewStore.swift
/Users/admin/builder/spi-builder-workspace/Sources/WebView/WebViewStore.swift:13:17: warning: main actor-isolated default value in a nonisolated context; this is an error in the Swift 6 language mode
11 |     }
12 |
13 |     public init(webView: WKWebView = .init()) {
   |                 `- warning: main actor-isolated default value in a nonisolated context; this is an error in the Swift 6 language mode
14 |         self.webView = webView
15 |
/Users/admin/builder/spi-builder-workspace/Sources/WebView/WebViewStore.swift:19:12: warning: main actor-isolated property 'preferences' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
17 |         self.webView
18 |           .configuration
19 |           .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
20 |           .setValue(true, forKey: "developerExtrasEnabled")
21 |         #endif
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebViewConfiguration.h:114:46: note: property declared here
112 | /*! @abstract The preference settings to be used by the web view.
113 | */
114 | @property (nonatomic, strong) WKPreferences *preferences;
    |                                              `- note: property declared here
115 |
116 | /*! @abstract The user content controller to associate with the web view.
/Users/admin/builder/spi-builder-workspace/Sources/WebView/WebViewStore.swift:18:12: warning: main actor-isolated property 'configuration' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
16 |         #if DEBUG
17 |         self.webView
18 |           .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
19 |           .preferences
20 |           .setValue(true, forKey: "developerExtrasEnabled")
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebView.h:91:63: note: property declared here
 89 | /*! @abstract A copy of the configuration with which the web view was
 90 |  initialized. */
 91 | @property (nonatomic, readonly, copy) WKWebViewConfiguration *configuration;
    |                                                               `- note: property declared here
 92 |
 93 | /*! @abstract The web view's navigation delegate. */
/Users/admin/builder/spi-builder-workspace/Sources/WebView/WebViewStore.swift:30:21: warning: capture of 'self' with non-sendable type 'WebViewStore' in a '@Sendable' closure
 2 | import Combine
 3 |
 4 | public class WebViewStore: ObservableObject {
   |              `- note: class 'WebViewStore' does not conform to the 'Sendable' protocol
 5 |     private var observers = Set<NSKeyValueObservation>()
 6 |
   :
28 |             return webView.observe(keyPath, options: [.prior]) { _, change in
29 |                 if change.isPrior {
30 |                     self.objectWillChange.send()
   |                     `- warning: capture of 'self' with non-sendable type 'WebViewStore' in a '@Sendable' closure
31 |                 }
32 |             }
/Users/admin/builder/spi-builder-workspace/Sources/WebView/WebViewStore.swift:37:31: warning: cannot form key path to main actor-isolated property 'title'; this is an error in the Swift 6 language mode
35 |         // Observers for all KVO compliant properties
36 |         observers = [
37 |             subscriber(for: \.title),
   |                               `- warning: cannot form key path to main actor-isolated property 'title'; this is an error in the Swift 6 language mode
38 |             subscriber(for: \.url),
39 |             subscriber(for: \.isLoading),
/Users/admin/builder/spi-builder-workspace/Sources/WebView/WebViewStore.swift:38:31: warning: cannot form key path to main actor-isolated property 'url'; this is an error in the Swift 6 language mode
36 |         observers = [
37 |             subscriber(for: \.title),
38 |             subscriber(for: \.url),
   |                               `- warning: cannot form key path to main actor-isolated property 'url'; this is an error in the Swift 6 language mode
39 |             subscriber(for: \.isLoading),
40 |             subscriber(for: \.estimatedProgress),
/Users/admin/builder/spi-builder-workspace/Sources/WebView/WebViewStore.swift:39:31: warning: cannot form key path to main actor-isolated property 'isLoading'; this is an error in the Swift 6 language mode
37 |             subscriber(for: \.title),
38 |             subscriber(for: \.url),
39 |             subscriber(for: \.isLoading),
   |                               `- warning: cannot form key path to main actor-isolated property 'isLoading'; this is an error in the Swift 6 language mode
40 |             subscriber(for: \.estimatedProgress),
41 |             subscriber(for: \.hasOnlySecureContent),
/Users/admin/builder/spi-builder-workspace/Sources/WebView/WebViewStore.swift:40:31: warning: cannot form key path to main actor-isolated property 'estimatedProgress'; this is an error in the Swift 6 language mode
38 |             subscriber(for: \.url),
39 |             subscriber(for: \.isLoading),
40 |             subscriber(for: \.estimatedProgress),
   |                               `- warning: cannot form key path to main actor-isolated property 'estimatedProgress'; this is an error in the Swift 6 language mode
41 |             subscriber(for: \.hasOnlySecureContent),
42 |             subscriber(for: \.serverTrust),
/Users/admin/builder/spi-builder-workspace/Sources/WebView/WebViewStore.swift:41:31: warning: cannot form key path to main actor-isolated property 'hasOnlySecureContent'; this is an error in the Swift 6 language mode
39 |             subscriber(for: \.isLoading),
40 |             subscriber(for: \.estimatedProgress),
41 |             subscriber(for: \.hasOnlySecureContent),
   |                               `- warning: cannot form key path to main actor-isolated property 'hasOnlySecureContent'; this is an error in the Swift 6 language mode
42 |             subscriber(for: \.serverTrust),
43 |             subscriber(for: \.canGoBack),
/Users/admin/builder/spi-builder-workspace/Sources/WebView/WebViewStore.swift:42:31: warning: cannot form key path to main actor-isolated property 'serverTrust'; this is an error in the Swift 6 language mode
40 |             subscriber(for: \.estimatedProgress),
41 |             subscriber(for: \.hasOnlySecureContent),
42 |             subscriber(for: \.serverTrust),
   |                               `- warning: cannot form key path to main actor-isolated property 'serverTrust'; this is an error in the Swift 6 language mode
43 |             subscriber(for: \.canGoBack),
44 |             subscriber(for: \.canGoForward)
/Users/admin/builder/spi-builder-workspace/Sources/WebView/WebViewStore.swift:43:31: warning: cannot form key path to main actor-isolated property 'canGoBack'; this is an error in the Swift 6 language mode
41 |             subscriber(for: \.hasOnlySecureContent),
42 |             subscriber(for: \.serverTrust),
43 |             subscriber(for: \.canGoBack),
   |                               `- warning: cannot form key path to main actor-isolated property 'canGoBack'; this is an error in the Swift 6 language mode
44 |             subscriber(for: \.canGoForward)
45 |         ]
/Users/admin/builder/spi-builder-workspace/Sources/WebView/WebViewStore.swift:44:31: warning: cannot form key path to main actor-isolated property 'canGoForward'; this is an error in the Swift 6 language mode
42 |             subscriber(for: \.serverTrust),
43 |             subscriber(for: \.canGoBack),
44 |             subscriber(for: \.canGoForward)
   |                               `- warning: cannot form key path to main actor-isolated property 'canGoForward'; this is an error in the Swift 6 language mode
45 |         ]
46 |     }
/Users/admin/builder/spi-builder-workspace/Sources/WebView/WebViewStore.swift:59: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
56 |
57 | extension WebViewStore {
58 |     func update(_ HTML: String, baseURL: URL) {
   |          `- note: add '@MainActor' to make instance method 'update(_:baseURL:)' part of global actor 'MainActor'
59 |         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
60 |             self?.webView.loadHTMLString(HTML, baseURL: baseURL)
61 |
WebKit.WKWebView.evaluateJavaScript:2:22: note: calls to instance method 'evaluateJavaScript(_:completionHandler:)' from outside of its actor context are implicitly asynchronous
1 | class WKWebView {
2 | @MainActor 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
3 |
/Users/admin/builder/spi-builder-workspace/Sources/WebView/WebViewStore.swift:70: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
66 |     }
67 |
68 |     private func scrollTo(_ YOffset: Int) {
   |                  `- note: add '@MainActor' to make instance method 'scrollTo' part of global actor 'MainActor'
69 |         let script = "window.scrollTo(0, \(YOffset));"
70 |         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
71 |         self.webView.configuration.userContentController.addUserScript(scrollScript)
72 |     }
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKUserScript.h:64:1: note: calls to initializer 'init(source:injectionTime:forMainFrameOnly:)' from outside of its actor context are implicitly asynchronous
62 |  @discussion Calling this method is the same as calling `initWithSource:injectionTime:forMainFrameOnly:inContentWorld:` with a `contentWorld` value of `WKContentWorld.pageWorld`
63 |  */
64 | - (instancetype)initWithSource:(NSString *)source injectionTime:(WKUserScriptInjectionTime)injectionTime forMainFrameOnly:(BOOL)forMainFrameOnly;
   | `- note: calls to initializer 'init(source:injectionTime:forMainFrameOnly:)' from outside of its actor context are implicitly asynchronous
65 |
66 | /*! @abstract Returns an initialized user script that can be added to a @link WKUserContentController @/link.
/Users/admin/builder/spi-builder-workspace/Sources/WebView/WebViewStore.swift:71:58: warning: call to main actor-isolated instance method 'addUserScript' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
66 |     }
67 |
68 |     private func scrollTo(_ YOffset: Int) {
   |                  `- note: add '@MainActor' to make instance method 'scrollTo' part of global actor 'MainActor'
69 |         let script = "window.scrollTo(0, \(YOffset));"
70 |         let scrollScript = WKUserScript(source: script, injectionTime: .atDocumentEnd, forMainFrameOnly: true)
71 |         self.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
72 |     }
73 | }
WebKit.WKUserContentController.addUserScript:2:22: note: calls to instance method 'addUserScript' from outside of its actor context are implicitly asynchronous
1 | class WKUserContentController {
2 | @MainActor open func addUserScript(_ userScript: WKUserScript)}
  |                      `- note: calls to instance method 'addUserScript' from outside of its actor context are implicitly asynchronous
3 |
/Users/admin/builder/spi-builder-workspace/Sources/WebView/WebViewStore.swift:71:36: warning: main actor-isolated property 'userContentController' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
66 |     }
67 |
68 |     private func scrollTo(_ YOffset: Int) {
   |                  `- note: add '@MainActor' to make instance method 'scrollTo' part of global actor 'MainActor'
69 |         let script = "window.scrollTo(0, \(YOffset));"
70 |         let scrollScript = WKUserScript(source: script, injectionTime: .atDocumentEnd, forMainFrameOnly: true)
71 |         self.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
72 |     }
73 | }
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebViewConfiguration.h:118:56: note: property declared here
116 | /*! @abstract The user content controller to associate with the web view.
117 | */
118 | @property (nonatomic, strong) WKUserContentController *userContentController;
    |                                                        `- note: property declared here
119 |
120 | /*! @abstract The web extension controller to associate with the web view.
/Users/admin/builder/spi-builder-workspace/Sources/WebView/WebViewStore.swift:71:22: warning: main actor-isolated property 'configuration' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
66 |     }
67 |
68 |     private func scrollTo(_ YOffset: Int) {
   |                  `- note: add '@MainActor' to make instance method 'scrollTo' part of global actor 'MainActor'
69 |         let script = "window.scrollTo(0, \(YOffset));"
70 |         let scrollScript = WKUserScript(source: script, injectionTime: .atDocumentEnd, forMainFrameOnly: true)
71 |         self.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
72 |     }
73 | }
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebView.h:91:63: note: property declared here
 89 | /*! @abstract A copy of the configuration with which the web view was
 90 |  initialized. */
 91 | @property (nonatomic, readonly, copy) WKWebViewConfiguration *configuration;
    |                                                               `- note: property declared here
 92 |
 93 | /*! @abstract The web view's navigation delegate. */
/Users/admin/builder/spi-builder-workspace/Sources/WebView/WebViewStore.swift:60:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
58 |     func update(_ HTML: String, baseURL: URL) {
59 |         webView.evaluateJavaScript("window.pageYOffset") { [weak self] object, error in
60 |             self?.webView.loadHTMLString(HTML, baseURL: baseURL)
   |             |- 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
61 |
62 |             if let offset = object as? Int {
[4/7] Compiling WebView UIViewContainerView.swift
[5/7] Compiling WebView WebView.swift
[6/7] Emitting module WebView
/Users/admin/builder/spi-builder-workspace/Sources/WebView/WebViewStore.swift:13:17: warning: main actor-isolated default value in a nonisolated context; this is an error in the Swift 6 language mode
11 |     }
12 |
13 |     public init(webView: WKWebView = .init()) {
   |                 `- warning: main actor-isolated default value in a nonisolated context; this is an error in the Swift 6 language mode
14 |         self.webView = webView
15 |
[7/7] Compiling WebView NSViewContainerView.swift
Build complete! (7.91s)
Build complete.
{
  "dependencies" : [
  ],
  "manifest_display_name" : "WebView",
  "name" : "WebView",
  "path" : "/Users/admin/builder/spi-builder-workspace",
  "platforms" : [
    {
      "name" : "ios",
      "version" : "13.0"
    },
    {
      "name" : "watchos",
      "version" : "6.0"
    },
    {
      "name" : "tvos",
      "version" : "13.0"
    },
    {
      "name" : "macos",
      "version" : "10.15"
    }
  ],
  "products" : [
    {
      "name" : "WebView",
      "targets" : [
        "WebView"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "targets" : [
    {
      "c99name" : "WebViewTests",
      "module_type" : "SwiftTarget",
      "name" : "WebViewTests",
      "path" : "Tests/WebViewTests",
      "sources" : [
        "WebViewTests.swift"
      ],
      "target_dependencies" : [
        "WebView"
      ],
      "type" : "test"
    },
    {
      "c99name" : "WebView",
      "module_type" : "SwiftTarget",
      "name" : "WebView",
      "path" : "Sources/WebView",
      "product_memberships" : [
        "WebView"
      ],
      "sources" : [
        "NSViewContainerView.swift",
        "UIViewContainerView.swift",
        "WebView.swift",
        "WebViewStore.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "5.2"
}
Done.