This is a staging environment. For live and up-to-date package information, visit swiftpackageindex.com.

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 markdown-webview 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/tomdai/markdown-webview.git
Reference: main
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/tomdai/markdown-webview
 * branch            main       -> FETCH_HEAD
 * [new branch]      main       -> origin/main
HEAD is now at d1c3e0a :children_crossing: (LaTeX) Improve latex coverage and add animations to copy button
Cloned https://github.com/tomdai/markdown-webview.git
Revision (git rev-parse @):
d1c3e0a855c0f36783715bd00501fa01c7bd3b98
SUCCESS checkout https://github.com/tomdai/markdown-webview.git at main
========================================
Build
========================================
Selected platform:         macosSpm
Swift version:             6.0
Building package at path:  $workDir
https://github.com/tomdai/markdown-webview.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/6] Write sources
[1/6] Copying template
[2/6] Copying default-macOS
[2/6] Copying default-iOS
[4/6] Copying script
[5/6] Write swift-version-6F35C1178C84523A.txt
[7/9] Compiling MarkdownWebView resource_bundle_accessor.swift
[8/9] Compiling MarkdownWebView MarkdownWebView.swift
/Users/admin/builder/spi-builder-workspace/Sources/MarkdownWebView/MarkdownWebView.swift:41:33: warning: main actor-isolated property 'isLoading' can not be referenced from a non-isolated context; this is an error in the Swift 6 language mode
 38 |         #endif
 39 |
 40 |         func updatePlatformView(_ platformView: CustomWebView, context _: Context) {
    |              `- note: add '@MainActor' to make instance method 'updatePlatformView(_:context:)' part of global actor 'MainActor'
 41 |             guard !platformView.isLoading else { return } /// This function might be called when the page is still loading, at which time `window.proxy` is not available yet.
    |                                 `- warning: main actor-isolated property 'isLoading' can not be referenced from a non-isolated context; this is an error in the Swift 6 language mode
 42 |             platformView.updateMarkdownContent(markdownContent)
 43 |         }
WebKit.WKWebView:32:25: note: property declared here
 30 |     @available(swift, obsoleted: 3, renamed: "url")
 31 |     open var URL: URL? { get }
 32 |     @MainActor open var isLoading: Bool { get }
    |                         `- note: property declared here
 33 |     @available(swift, obsoleted: 3, renamed: "isLoading")
 34 |     open var loading: Bool { get }
/Users/admin/builder/spi-builder-workspace/Sources/MarkdownWebView/MarkdownWebView.swift:42:26: warning: call to main actor-isolated instance method 'updateMarkdownContent' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
 38 |         #endif
 39 |
 40 |         func updatePlatformView(_ platformView: CustomWebView, context _: Context) {
    |              `- note: add '@MainActor' to make instance method 'updatePlatformView(_:context:)' part of global actor 'MainActor'
 41 |             guard !platformView.isLoading else { return } /// This function might be called when the page is still loading, at which time `window.proxy` is not available yet.
 42 |             platformView.updateMarkdownContent(markdownContent)
    |                          `- warning: call to main actor-isolated instance method 'updateMarkdownContent' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
 43 |         }
 44 |
    :
190 |             #endif
191 |
192 |             func updateMarkdownContent(_ markdownContent: String) {
    |                  `- note: calls to instance method 'updateMarkdownContent' from outside of its actor context are implicitly asynchronous
193 |                 guard let markdownContentBase64Encoded = markdownContent.data(using: .utf8)?.base64EncodedString() else { return }
194 |
/Users/admin/builder/spi-builder-workspace/Sources/MarkdownWebView/MarkdownWebView.swift:65:33: warning: call to main actor-isolated initializer 'init()' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
 63 |             init(parent: MarkdownWebView) {
 64 |                 self.parent = parent
 65 |                 platformView = .init()
    |                                 `- warning: call to main actor-isolated initializer 'init()' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
 66 |                 super.init()
 67 |
WebKit.WKWebView:206:24: note: calls to initializer 'init()' from outside of its actor context are implicitly asynchronous
204 |     open var inspectable: Bool { get set }
205 |     public convenience init(frame frameRect: NSRect)
206 |     public convenience init()
    |                        `- note: calls to initializer 'init()' from outside of its actor context are implicitly asynchronous
207 | }
/Users/admin/builder/spi-builder-workspace/Sources/MarkdownWebView/MarkdownWebView.swift:68:30: warning: main actor-isolated property 'navigationDelegate' can not be mutated from a non-isolated context; this is an error in the Swift 6 language mode
 66 |                 super.init()
 67 |
 68 |                 platformView.navigationDelegate = self
    |                              `- warning: main actor-isolated property 'navigationDelegate' can not be mutated from a non-isolated context; this is an error in the Swift 6 language mode
 69 |
 70 |                 #if DEBUG && os(iOS)
WebKit.WKWebView:4:19: note: mutation of this property is only permitted within the actor
  2 | @MainActor open class WKWebView : NSView {
  3 |     @NSCopying open var configuration: WKWebViewConfiguration { get }
  4 |     weak open var navigationDelegate: (any WKNavigationDelegate)? { get set }
    |                   `- note: mutation of this property is only permitted within the actor
  5 |     weak open var uiDelegate: (any WKUIDelegate)? { get set }
  6 |     @available(swift, obsoleted: 3, renamed: "uiDelegate")
/Users/admin/builder/spi-builder-workspace/Sources/MarkdownWebView/MarkdownWebView.swift:77:30: warning: call to main actor-isolated instance method 'setContentHuggingPriority(_:for:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
 75 |
 76 |                 /// So that the `View` adjusts its height automatically.
 77 |                 platformView.setContentHuggingPriority(.required, for: .vertical)
    |                              `- warning: call to main actor-isolated instance method 'setContentHuggingPriority(_:for:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
 78 |
 79 |                 /// Disables scrolling.
AppKit.NSView:30:26: note: calls to instance method 'setContentHuggingPriority(_:for:)' from outside of its actor context are implicitly asynchronous
28 |     open func contentHuggingPriorityForOrientation(_ orientation: NSLayoutConstraint.Orientation) -> NSLayoutConstraint.Priority
29 |     @available(macOS 10.7, *)
30 |     @MainActor open func setContentHuggingPriority(_ priority: NSLayoutConstraint.Priority, for orientation: NSLayoutConstraint.Orientation)
   |                          `- note: calls to instance method 'setContentHuggingPriority(_:for:)' from outside of its actor context are implicitly asynchronous
31 |     @available(macOS 10.7, *)
32 |     @available(swift, obsoleted: 3, renamed: "setContentHuggingPriority(_:for:)")
/Users/admin/builder/spi-builder-workspace/Sources/MarkdownWebView/MarkdownWebView.swift:93:30: warning: main actor-isolated property 'configuration' can not be mutated from a non-isolated context; this is an error in the Swift 6 language mode
 91 |
 92 |                 /// Receive messages from the web view.
 93 |                 platformView.configuration.userContentController = .init()
    |                              `- warning: main actor-isolated property 'configuration' can not be mutated from a non-isolated context; this is an error in the Swift 6 language mode
 94 |                 platformView.configuration.userContentController.add(self, name: "sizeChangeHandler")
 95 |                 platformView.configuration.userContentController.add(self, name: "renderedContentHandler")
WebKit.WKWebView:3:25: note: mutation of this property is only permitted within the actor
  1 | @available(macOS 10.10, *)
  2 | @MainActor open class WKWebView : NSView {
  3 |     @NSCopying open var configuration: WKWebViewConfiguration { get }
    |                         `- note: mutation of this property is only permitted within the actor
  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/MarkdownWebView/MarkdownWebView.swift:94:30: 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
 92 |                 /// Receive messages from the web view.
 93 |                 platformView.configuration.userContentController = .init()
 94 |                 platformView.configuration.userContentController.add(self, name: "sizeChangeHandler")
    |                              `- 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
 95 |                 platformView.configuration.userContentController.add(self, name: "renderedContentHandler")
 96 |                 platformView.configuration.userContentController.add(self, name: "copyToPasteboard")
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/Sources/MarkdownWebView/MarkdownWebView.swift:95:30: 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
 93 |                 platformView.configuration.userContentController = .init()
 94 |                 platformView.configuration.userContentController.add(self, name: "sizeChangeHandler")
 95 |                 platformView.configuration.userContentController.add(self, name: "renderedContentHandler")
    |                              `- 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
 96 |                 platformView.configuration.userContentController.add(self, name: "copyToPasteboard")
 97 |
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/Sources/MarkdownWebView/MarkdownWebView.swift:96:30: 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
 94 |                 platformView.configuration.userContentController.add(self, name: "sizeChangeHandler")
 95 |                 platformView.configuration.userContentController.add(self, name: "renderedContentHandler")
 96 |                 platformView.configuration.userContentController.add(self, name: "copyToPasteboard")
    |                              `- 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
 97 |
 98 |                 #if os(macOS)
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/Sources/MarkdownWebView/MarkdownWebView.swift:116:30: warning: call to main actor-isolated instance method 'loadHTMLString(_:baseURL:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
114 |                     .replacingOccurrences(of: "PLACEHOLDER_SCRIPT", with: script)
115 |                     .replacingOccurrences(of: "PLACEHOLDER_STYLESHEET", with: self.parent.customStylesheet ?? defaultStylesheet)
116 |                 platformView.loadHTMLString(htmlString, baseURL: nil)
    |                              `- warning: call to main actor-isolated instance method 'loadHTMLString(_:baseURL:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
117 |             }
118 |
WebKit.WKWebView:19:15: note: calls to instance method 'loadHTMLString(_:baseURL:)' from outside of its actor context are implicitly asynchronous
 17 |     @available(swift, obsoleted: 3, renamed: "loadFileURL(_:allowingReadAccessTo:)")
 18 |     open func loadFileURL(_ URL: URL, allowingReadAccessToURL readAccessURL: URL) -> WKNavigation?
 19 |     open func loadHTMLString(_ string: String, baseURL: URL?) -> WKNavigation?
    |               `- note: calls to instance method 'loadHTMLString(_:baseURL:)' from outside of its actor context are implicitly asynchronous
 20 |     @available(macOS 10.11, *)
 21 |     open func load(_ data: Data, mimeType MIMEType: String, characterEncodingName: String, baseURL: URL) -> WKNavigation?
/Users/admin/builder/spi-builder-workspace/Sources/MarkdownWebView/MarkdownWebView.swift:121:45: warning: call to main actor-isolated instance method 'updateMarkdownContent' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
118 |
119 |             /// Update the content on first finishing loading.
120 |             public func webView(_ webView: WKWebView, didFinish _: WKNavigation!) {
    |                         `- note: add '@MainActor' to make instance method 'webView(_:didFinish:)' part of global actor 'MainActor'
121 |                 (webView as! CustomWebView).updateMarkdownContent(parent.markdownContent)
    |                                             `- warning: call to main actor-isolated instance method 'updateMarkdownContent' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
122 |             }
123 |
    :
190 |             #endif
191 |
192 |             func updateMarkdownContent(_ markdownContent: String) {
    |                  `- note: calls to instance method 'updateMarkdownContent' from outside of its actor context are implicitly asynchronous
193 |                 guard let markdownContentBase64Encoded = markdownContent.data(using: .utf8)?.base64EncodedString() else { return }
194 |
/Users/admin/builder/spi-builder-workspace/Sources/MarkdownWebView/MarkdownWebView.swift:150:40: warning: main actor-isolated property 'contentHeight' can not be referenced from a non-isolated context; this is an error in the Swift 6 language mode
144 |             }
145 |
146 |             public func userContentController(_: WKUserContentController, didReceive message: WKScriptMessage) {
    |                         `- note: add '@MainActor' to make instance method 'userContentController(_:didReceive:)' part of global actor 'MainActor'
147 |                 switch message.name {
148 |                 case "sizeChangeHandler":
149 |                     guard let contentHeight = message.body as? CGFloat,
150 |                           platformView.contentHeight != contentHeight
    |                                        `- warning: main actor-isolated property 'contentHeight' can not be referenced from a non-isolated context; this is an error in the Swift 6 language mode
151 |                     else { return }
152 |                     platformView.contentHeight = contentHeight
    :
169 |
170 |         public class CustomWebView: WKWebView {
171 |             var contentHeight: CGFloat = 0
    |                 `- note: property declared here
172 |
173 |             override public var intrinsicContentSize: CGSize {
/Users/admin/builder/spi-builder-workspace/Sources/MarkdownWebView/MarkdownWebView.swift:152:34: warning: main actor-isolated property 'contentHeight' can not be mutated from a non-isolated context; this is an error in the Swift 6 language mode
144 |             }
145 |
146 |             public func userContentController(_: WKUserContentController, didReceive message: WKScriptMessage) {
    |                         `- note: add '@MainActor' to make instance method 'userContentController(_:didReceive:)' part of global actor 'MainActor'
147 |                 switch message.name {
148 |                 case "sizeChangeHandler":
    :
150 |                           platformView.contentHeight != contentHeight
151 |                     else { return }
152 |                     platformView.contentHeight = contentHeight
    |                                  `- warning: main actor-isolated property 'contentHeight' can not be mutated from a non-isolated context; this is an error in the Swift 6 language mode
153 |                     platformView.invalidateIntrinsicContentSize()
154 |                 case "renderedContentHandler":
    :
169 |
170 |         public class CustomWebView: WKWebView {
171 |             var contentHeight: CGFloat = 0
    |                 `- note: mutation of this property is only permitted within the actor
172 |
173 |             override public var intrinsicContentSize: CGSize {
/Users/admin/builder/spi-builder-workspace/Sources/MarkdownWebView/MarkdownWebView.swift:153:34: warning: call to main actor-isolated instance method 'invalidateIntrinsicContentSize()' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
144 |             }
145 |
146 |             public func userContentController(_: WKUserContentController, didReceive message: WKScriptMessage) {
    |                         `- note: add '@MainActor' to make instance method 'userContentController(_:didReceive:)' part of global actor 'MainActor'
147 |                 switch message.name {
148 |                 case "sizeChangeHandler":
    :
151 |                     else { return }
152 |                     platformView.contentHeight = contentHeight
153 |                     platformView.invalidateIntrinsicContentSize()
    |                                  `- warning: call to main actor-isolated instance method 'invalidateIntrinsicContentSize()' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
154 |                 case "renderedContentHandler":
155 |                     guard let renderedContentHandler = parent.renderedContentHandler,
AppKit.NSView:23:15: note: calls to instance method 'invalidateIntrinsicContentSize()' from outside of its actor context are implicitly asynchronous
21 |     @MainActor open var intrinsicContentSize: NSSize { get }
22 |     @available(macOS 10.7, *)
23 |     open func invalidateIntrinsicContentSize()
   |               `- note: calls to instance method 'invalidateIntrinsicContentSize()' from outside of its actor context are implicitly asynchronous
24 |     @available(macOS 10.7, *)
25 |     open func contentHuggingPriority(for orientation: NSLayoutConstraint.Orientation) -> NSLayoutConstraint.Priority
/Users/admin/builder/spi-builder-workspace/Sources/MarkdownWebView/MarkdownWebView.swift:121:45: warning: sending 'self.parent.markdownContent' risks causing data races; this is an error in the Swift 6 language mode
119 |             /// Update the content on first finishing loading.
120 |             public func webView(_ webView: WKWebView, didFinish _: WKNavigation!) {
121 |                 (webView as! CustomWebView).updateMarkdownContent(parent.markdownContent)
    |                                             |- warning: sending 'self.parent.markdownContent' risks causing data races; this is an error in the Swift 6 language mode
    |                                             `- note: sending task-isolated 'self.parent.markdownContent' to main actor-isolated instance method 'updateMarkdownContent' risks causing data races between main actor-isolated and task-isolated uses
122 |             }
123 |
[9/9] Emitting module MarkdownWebView
Build complete! (32.75s)
Build complete.
{
  "dependencies" : [
  ],
  "manifest_display_name" : "markdown-webview",
  "name" : "markdown-webview",
  "path" : "/Users/admin/builder/spi-builder-workspace",
  "platforms" : [
    {
      "name" : "macos",
      "version" : "11.0"
    },
    {
      "name" : "ios",
      "version" : "14.0"
    }
  ],
  "products" : [
    {
      "name" : "MarkdownWebView",
      "targets" : [
        "MarkdownWebView"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "targets" : [
    {
      "c99name" : "MarkdownWebView",
      "module_type" : "SwiftTarget",
      "name" : "MarkdownWebView",
      "path" : "Sources/MarkdownWebView",
      "product_memberships" : [
        "MarkdownWebView"
      ],
      "resources" : [
        {
          "path" : "/Users/admin/builder/spi-builder-workspace/Sources/MarkdownWebView/Resources/stylesheets/default-macOS",
          "rule" : {
            "copy" : {
            }
          }
        },
        {
          "path" : "/Users/admin/builder/spi-builder-workspace/Sources/MarkdownWebView/Resources/script",
          "rule" : {
            "copy" : {
            }
          }
        },
        {
          "path" : "/Users/admin/builder/spi-builder-workspace/Sources/MarkdownWebView/Resources/template",
          "rule" : {
            "copy" : {
            }
          }
        },
        {
          "path" : "/Users/admin/builder/spi-builder-workspace/Sources/MarkdownWebView/Resources/stylesheets/default-iOS",
          "rule" : {
            "copy" : {
            }
          }
        }
      ],
      "sources" : [
        "MarkdownWebView.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "5.8"
}
Done.
This is a staging environment. For live and up-to-date package information, visit swiftpackageindex.com.