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 SwiftScraper, reference main (6d4daf), with Swift 6.0 for macOS (SPM) on 16 Apr 2025 08:58:21 UTC.

Swift 6 data race errors: 0

Build Command

env DEVELOPER_DIR=/Applications/Xcode-16.2.0.app xcrun swift build --arch arm64

Build Log

========================================
RunAll
========================================
Builder version: 4.60.1
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/Nef10/SwiftScraper.git
Reference: main
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/Nef10/SwiftScraper
 * branch            main       -> FETCH_HEAD
 * [new branch]      main       -> origin/main
HEAD is now at 6d4daf9 Bump swift-actions/setup-swift from 2.2.0 to 2.3.0
Cloned https://github.com/Nef10/SwiftScraper.git
Revision (git rev-parse @):
6d4daf90817501b84665bcf51ed4ca7c6206f36c
SUCCESS checkout https://github.com/Nef10/SwiftScraper.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": "swiftscraper",
      "name": "SwiftScraper",
      "url": "https://github.com/Nef10/SwiftScraper.git",
      "version": "unspecified",
      "path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies/.build/checkouts/SwiftScraper",
      "dependencies": [
      ]
    }
  ]
}
Fetching https://github.com/Nef10/SwiftScraper.git
[1/1413] Fetching swiftscraper
Fetched https://github.com/Nef10/SwiftScraper.git from cache (0.91s)
Creating working copy for https://github.com/Nef10/SwiftScraper.git
Working copy of https://github.com/Nef10/SwiftScraper.git resolved at main (6d4daf9)
warning: '.resolve-product-dependencies': dependency 'swiftscraper' 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/Nef10/SwiftScraper.git
https://github.com/Nef10/SwiftScraper.git
{
  "dependencies" : [
  ],
  "manifest_display_name" : "SwiftScraper",
  "name" : "SwiftScraper",
  "path" : "/Users/admin/builder/spi-builder-workspace",
  "platforms" : [
    {
      "name" : "ios",
      "version" : "14.0"
    },
    {
      "name" : "macos",
      "version" : "11.0"
    }
  ],
  "products" : [
    {
      "name" : "SwiftScraper",
      "targets" : [
        "SwiftScraper"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "targets" : [
    {
      "c99name" : "SwiftScraperTests",
      "module_type" : "SwiftTarget",
      "name" : "SwiftScraperTests",
      "path" : "Tests/SwiftScraperTests",
      "resources" : [
        {
          "path" : "/Users/admin/builder/spi-builder-workspace/Tests/SwiftScraperTests/Resources/page1.html",
          "rule" : {
            "process" : {
            }
          }
        },
        {
          "path" : "/Users/admin/builder/spi-builder-workspace/Tests/SwiftScraperTests/Resources/page2.html",
          "rule" : {
            "process" : {
            }
          }
        },
        {
          "path" : "/Users/admin/builder/spi-builder-workspace/Tests/SwiftScraperTests/Resources/waitTest.html",
          "rule" : {
            "process" : {
            }
          }
        },
        {
          "path" : "/Users/admin/builder/spi-builder-workspace/Tests/SwiftScraperTests/StepRunnerTests.js",
          "rule" : {
            "process" : {
            }
          }
        }
      ],
      "sources" : [
        "JavaScriptGeneratorTests.swift",
        "StepRunnerTests.swift",
        "Steps/AsyncProcessStepTests.swift",
        "Steps/AsyncScriptStepTests.swift",
        "Steps/DownloadStepTests.swift",
        "Steps/OpenPageStepTests.swift",
        "Steps/PageChangeStepTests.swift",
        "Steps/ProcessStepTests.swift",
        "Steps/ScriptStepTests.swift",
        "Steps/WaitForConditionStepTests.swift",
        "Steps/WaitStepTests.swift",
        "SwiftScraperErrorTests.swift"
      ],
      "target_dependencies" : [
        "SwiftScraper"
      ],
      "type" : "test"
    },
    {
      "c99name" : "SwiftScraper",
      "module_type" : "SwiftTarget",
      "name" : "SwiftScraper",
      "path" : "Sources/SwiftScraper",
      "product_memberships" : [
        "SwiftScraper"
      ],
      "resources" : [
        {
          "path" : "/Users/admin/builder/spi-builder-workspace/Sources/SwiftScraper/Resources/SwiftScraper.js",
          "rule" : {
            "process" : {
            }
          }
        }
      ],
      "sources" : [
        "Browser.swift",
        "JavaScriptGenerator.swift",
        "StepRunner.swift",
        "Steps/AsyncProcessStep.swift",
        "Steps/AsyncScriptStep.swift",
        "Steps/Common/NavigableStep.swift",
        "Steps/Common/Step.swift",
        "Steps/Common/StepCompletionCallback.swift",
        "Steps/Common/StepFlowResult.swift",
        "Steps/DownloadStep.swift",
        "Steps/OpenPageStep.swift",
        "Steps/PageChangeStep.swift",
        "Steps/ProcessStep.swift",
        "Steps/ScriptStep.swift",
        "Steps/WaitForConditionStep.swift",
        "Steps/WaitStep.swift",
        "SwiftScraperError.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "5.5"
}
Running build ...
env DEVELOPER_DIR=/Applications/Xcode-16.2.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/3] Write sources
[0/3] Copying SwiftScraper.js
[2/3] Write swift-version-5BDAB9E9C0126B9D.txt
[4/21] Compiling SwiftScraper WaitForConditionStep.swift
/Users/admin/builder/spi-builder-workspace/Sources/SwiftScraper/Steps/WaitForConditionStep.swift:56:17: warning: call to main actor-isolated instance method 'runScript(functionName:params:completion:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
49 |     }
50 |
51 |     func handleTimer() {
   |          `- note: add '@MainActor' to make instance method 'handleTimer()' part of global actor 'MainActor'
52 |         guard let startRunDate, let browser, let model, let completion else {
53 |              return
54 |         }
55 |         let params = getParameters()
56 |         browser.runScript(functionName: assertionName, params: params) { [weak self] result in
   |                 `- warning: call to main actor-isolated instance method 'runScript(functionName:params:completion:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
57 |             guard let self else {
58 |                 return
/Users/admin/builder/spi-builder-workspace/Sources/SwiftScraper/Browser.swift:212:10: note: calls to instance method 'runScript(functionName:params:completion:)' from outside of its actor context are implicitly asynchronous
210 |
211 |     /// Run some JavaScript with error handling and logging.
212 |     func runScript(functionName: String, params: [Any] = [], completion: @escaping ScriptResponseResultCallback) {
    |          `- note: calls to instance method 'runScript(functionName:params:completion:)' from outside of its actor context are implicitly asynchronous
213 |         guard let script = try? JavaScriptGenerator.generateScript(moduleName: moduleName,
214 |                                                                    functionName: functionName,
/Users/admin/builder/spi-builder-workspace/Sources/SwiftScraper/Steps/WaitForConditionStep.swift:56:17: warning: sending 'params' risks causing data races; this is an error in the Swift 6 language mode
54 |         }
55 |         let params = getParameters()
56 |         browser.runScript(functionName: assertionName, params: params) { [weak self] result in
   |                 |- warning: sending 'params' risks causing data races; this is an error in the Swift 6 language mode
   |                 `- note: sending task-isolated 'params' to main actor-isolated instance method 'runScript(functionName:params:completion:)' risks causing data races between main actor-isolated and task-isolated uses
57 |             guard let self else {
58 |                 return
/Users/admin/builder/spi-builder-workspace/Sources/SwiftScraper/Steps/WaitForConditionStep.swift:56:17: warning: sending task-isolated value of type '(ScriptResponseResult) -> Void' (aka '(Result<Optional<Any>, SwiftScraperError>) -> ()') with later accesses to main actor-isolated context risks causing data races; this is an error in the Swift 6 language mode
54 |         }
55 |         let params = getParameters()
56 |         browser.runScript(functionName: assertionName, params: params) { [weak self] result in
   |                 `- warning: sending task-isolated value of type '(ScriptResponseResult) -> Void' (aka '(Result<Optional<Any>, SwiftScraperError>) -> ()') with later accesses to main actor-isolated context risks causing data races; this is an error in the Swift 6 language mode
57 |             guard let self else {
58 |                 return
/Users/admin/builder/spi-builder-workspace/Sources/SwiftScraper/Steps/WaitForConditionStep.swift:71:29: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
69 |                     } else {
70 |                         DispatchQueue.main.asyncAfter(deadline: .now() + Constants.refreshInterval) { [weak self] in
71 |                             self?.handleTimer()
   |                             |- 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
72 |                         }
73 |                     }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftScraper/Steps/WaitStep.swift:25:13: warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
23 |     public func run(with _: Browser, model: JSON, completion: @escaping StepCompletionCallback) {
24 |         DispatchQueue.main.asyncAfter(deadline: .now() + waitTimeInSeconds) {
25 |             completion(.proceed(model))
   |             |- warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
   |             `- note: task-isolated 'completion' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
26 |         }
27 |     }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftScraper/Steps/WaitStep.swift:25:33: warning: sending 'model' risks causing data races; this is an error in the Swift 6 language mode
23 |     public func run(with _: Browser, model: JSON, completion: @escaping StepCompletionCallback) {
24 |         DispatchQueue.main.asyncAfter(deadline: .now() + waitTimeInSeconds) {
25 |             completion(.proceed(model))
   |                                 |- warning: sending 'model' risks causing data races; this is an error in the Swift 6 language mode
   |                                 `- note: task-isolated 'model' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
26 |         }
27 |     }
[5/21] Compiling SwiftScraper WaitStep.swift
/Users/admin/builder/spi-builder-workspace/Sources/SwiftScraper/Steps/WaitForConditionStep.swift:56:17: warning: call to main actor-isolated instance method 'runScript(functionName:params:completion:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
49 |     }
50 |
51 |     func handleTimer() {
   |          `- note: add '@MainActor' to make instance method 'handleTimer()' part of global actor 'MainActor'
52 |         guard let startRunDate, let browser, let model, let completion else {
53 |              return
54 |         }
55 |         let params = getParameters()
56 |         browser.runScript(functionName: assertionName, params: params) { [weak self] result in
   |                 `- warning: call to main actor-isolated instance method 'runScript(functionName:params:completion:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
57 |             guard let self else {
58 |                 return
/Users/admin/builder/spi-builder-workspace/Sources/SwiftScraper/Browser.swift:212:10: note: calls to instance method 'runScript(functionName:params:completion:)' from outside of its actor context are implicitly asynchronous
210 |
211 |     /// Run some JavaScript with error handling and logging.
212 |     func runScript(functionName: String, params: [Any] = [], completion: @escaping ScriptResponseResultCallback) {
    |          `- note: calls to instance method 'runScript(functionName:params:completion:)' from outside of its actor context are implicitly asynchronous
213 |         guard let script = try? JavaScriptGenerator.generateScript(moduleName: moduleName,
214 |                                                                    functionName: functionName,
/Users/admin/builder/spi-builder-workspace/Sources/SwiftScraper/Steps/WaitForConditionStep.swift:56:17: warning: sending 'params' risks causing data races; this is an error in the Swift 6 language mode
54 |         }
55 |         let params = getParameters()
56 |         browser.runScript(functionName: assertionName, params: params) { [weak self] result in
   |                 |- warning: sending 'params' risks causing data races; this is an error in the Swift 6 language mode
   |                 `- note: sending task-isolated 'params' to main actor-isolated instance method 'runScript(functionName:params:completion:)' risks causing data races between main actor-isolated and task-isolated uses
57 |             guard let self else {
58 |                 return
/Users/admin/builder/spi-builder-workspace/Sources/SwiftScraper/Steps/WaitForConditionStep.swift:56:17: warning: sending task-isolated value of type '(ScriptResponseResult) -> Void' (aka '(Result<Optional<Any>, SwiftScraperError>) -> ()') with later accesses to main actor-isolated context risks causing data races; this is an error in the Swift 6 language mode
54 |         }
55 |         let params = getParameters()
56 |         browser.runScript(functionName: assertionName, params: params) { [weak self] result in
   |                 `- warning: sending task-isolated value of type '(ScriptResponseResult) -> Void' (aka '(Result<Optional<Any>, SwiftScraperError>) -> ()') with later accesses to main actor-isolated context risks causing data races; this is an error in the Swift 6 language mode
57 |             guard let self else {
58 |                 return
/Users/admin/builder/spi-builder-workspace/Sources/SwiftScraper/Steps/WaitForConditionStep.swift:71:29: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
69 |                     } else {
70 |                         DispatchQueue.main.asyncAfter(deadline: .now() + Constants.refreshInterval) { [weak self] in
71 |                             self?.handleTimer()
   |                             |- 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
72 |                         }
73 |                     }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftScraper/Steps/WaitStep.swift:25:13: warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
23 |     public func run(with _: Browser, model: JSON, completion: @escaping StepCompletionCallback) {
24 |         DispatchQueue.main.asyncAfter(deadline: .now() + waitTimeInSeconds) {
25 |             completion(.proceed(model))
   |             |- warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
   |             `- note: task-isolated 'completion' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
26 |         }
27 |     }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftScraper/Steps/WaitStep.swift:25:33: warning: sending 'model' risks causing data races; this is an error in the Swift 6 language mode
23 |     public func run(with _: Browser, model: JSON, completion: @escaping StepCompletionCallback) {
24 |         DispatchQueue.main.asyncAfter(deadline: .now() + waitTimeInSeconds) {
25 |             completion(.proceed(model))
   |                                 |- warning: sending 'model' risks causing data races; this is an error in the Swift 6 language mode
   |                                 `- note: task-isolated 'model' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
26 |         }
27 |     }
[6/22] Compiling SwiftScraper Step.swift
[7/22] Compiling SwiftScraper StepCompletionCallback.swift
[8/22] Compiling SwiftScraper OpenPageStep.swift
/Users/admin/builder/spi-builder-workspace/Sources/SwiftScraper/Steps/OpenPageStep.swift:26:17: warning: call to main actor-isolated instance method 'load(path:completion:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
23 |     }
24 |
25 |     public func run(with browser: Browser, model: JSON, completion: @escaping StepCompletionCallback) {
   |                 `- note: add '@MainActor' to make instance method 'run(with:model:completion:)' part of global actor 'MainActor'
26 |         browser.load(path: path) { [weak self] result in
   |                 `- warning: call to main actor-isolated instance method 'load(path:completion:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
27 |             guard let self else {
28 |                 return
/Users/admin/builder/spi-builder-workspace/Sources/SwiftScraper/Browser.swift:205:10: note: calls to instance method 'load(path:completion:)' from outside of its actor context are implicitly asynchronous
203 |
204 |     /// Loads a page with the given path into the WebView.
205 |     func load(path: String, completion: @escaping NavigationCallback) {
    |          `- note: calls to instance method 'load(path:completion:)' from outside of its actor context are implicitly asynchronous
206 |         self.navigationCallback = completion
207 |         sheduleTimeoutTimer()
/Users/admin/builder/spi-builder-workspace/Sources/SwiftScraper/Steps/PageChangeStep.swift:46:17: warning: call to main actor-isolated instance method 'runPageChangeScript(functionName:params:completion:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
37 |     }
38 |
39 |     public func run(with browser: Browser, model: JSON, completion: @escaping StepCompletionCallback) {
   |                 `- note: add '@MainActor' to make instance method 'run(with:model:completion:)' part of global actor 'MainActor'
40 |         let params: [Any]
41 |         if paramsKeys.isEmpty {
   :
44 |             params = paramsKeys.map { model[$0] ?? NSNull() }
45 |         }
46 |         browser.runPageChangeScript(functionName: functionName, params: params) { [weak self] result in
   |                 `- warning: call to main actor-isolated instance method 'runPageChangeScript(functionName:params:completion:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
47 |             guard let self else {
48 |                 return
/Users/admin/builder/spi-builder-workspace/Sources/SwiftScraper/Browser.swift:239:10: note: calls to instance method 'runPageChangeScript(functionName:params:completion:)' from outside of its actor context are implicitly asynchronous
237 |
238 |     /// Run some JavaScript that results in a page being loaded (i.e. navigation happens).
239 |     func runPageChangeScript(functionName: String, params: [Any] = [], completion: @escaping NavigationCallback) {
    |          `- note: calls to instance method 'runPageChangeScript(functionName:params:completion:)' from outside of its actor context are implicitly asynchronous
240 |         self.navigationCallback = completion
241 |         sheduleTimeoutTimer()
/Users/admin/builder/spi-builder-workspace/Sources/SwiftScraper/Steps/OpenPageStep.swift:26:17: warning: sending task-isolated value of type '(NavigationResult) -> Void' (aka '(Result<(), SwiftScraperError>) -> ()') with later accesses to main actor-isolated context risks causing data races; this is an error in the Swift 6 language mode
24 |
25 |     public func run(with browser: Browser, model: JSON, completion: @escaping StepCompletionCallback) {
26 |         browser.load(path: path) { [weak self] result in
   |                 `- warning: sending task-isolated value of type '(NavigationResult) -> Void' (aka '(Result<(), SwiftScraperError>) -> ()') with later accesses to main actor-isolated context risks causing data races; this is an error in the Swift 6 language mode
27 |             guard let self else {
28 |                 return
/Users/admin/builder/spi-builder-workspace/Sources/SwiftScraper/Steps/PageChangeStep.swift:46:17: warning: sending 'params' risks causing data races; this is an error in the Swift 6 language mode
44 |             params = paramsKeys.map { model[$0] ?? NSNull() }
45 |         }
46 |         browser.runPageChangeScript(functionName: functionName, params: params) { [weak self] result in
   |                 |- warning: sending 'params' risks causing data races; this is an error in the Swift 6 language mode
   |                 `- note: sending task-isolated 'params' to main actor-isolated instance method 'runPageChangeScript(functionName:params:completion:)' risks causing data races between main actor-isolated and task-isolated uses
47 |             guard let self else {
48 |                 return
/Users/admin/builder/spi-builder-workspace/Sources/SwiftScraper/Steps/PageChangeStep.swift:46:17: warning: sending task-isolated value of type '(NavigationResult) -> Void' (aka '(Result<(), SwiftScraperError>) -> ()') with later accesses to main actor-isolated context risks causing data races; this is an error in the Swift 6 language mode
44 |             params = paramsKeys.map { model[$0] ?? NSNull() }
45 |         }
46 |         browser.runPageChangeScript(functionName: functionName, params: params) { [weak self] result in
   |                 `- warning: sending task-isolated value of type '(NavigationResult) -> Void' (aka '(Result<(), SwiftScraperError>) -> ()') with later accesses to main actor-isolated context risks causing data races; this is an error in the Swift 6 language mode
47 |             guard let self else {
48 |                 return
[9/22] Compiling SwiftScraper PageChangeStep.swift
/Users/admin/builder/spi-builder-workspace/Sources/SwiftScraper/Steps/OpenPageStep.swift:26:17: warning: call to main actor-isolated instance method 'load(path:completion:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
23 |     }
24 |
25 |     public func run(with browser: Browser, model: JSON, completion: @escaping StepCompletionCallback) {
   |                 `- note: add '@MainActor' to make instance method 'run(with:model:completion:)' part of global actor 'MainActor'
26 |         browser.load(path: path) { [weak self] result in
   |                 `- warning: call to main actor-isolated instance method 'load(path:completion:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
27 |             guard let self else {
28 |                 return
/Users/admin/builder/spi-builder-workspace/Sources/SwiftScraper/Browser.swift:205:10: note: calls to instance method 'load(path:completion:)' from outside of its actor context are implicitly asynchronous
203 |
204 |     /// Loads a page with the given path into the WebView.
205 |     func load(path: String, completion: @escaping NavigationCallback) {
    |          `- note: calls to instance method 'load(path:completion:)' from outside of its actor context are implicitly asynchronous
206 |         self.navigationCallback = completion
207 |         sheduleTimeoutTimer()
/Users/admin/builder/spi-builder-workspace/Sources/SwiftScraper/Steps/PageChangeStep.swift:46:17: warning: call to main actor-isolated instance method 'runPageChangeScript(functionName:params:completion:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
37 |     }
38 |
39 |     public func run(with browser: Browser, model: JSON, completion: @escaping StepCompletionCallback) {
   |                 `- note: add '@MainActor' to make instance method 'run(with:model:completion:)' part of global actor 'MainActor'
40 |         let params: [Any]
41 |         if paramsKeys.isEmpty {
   :
44 |             params = paramsKeys.map { model[$0] ?? NSNull() }
45 |         }
46 |         browser.runPageChangeScript(functionName: functionName, params: params) { [weak self] result in
   |                 `- warning: call to main actor-isolated instance method 'runPageChangeScript(functionName:params:completion:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
47 |             guard let self else {
48 |                 return
/Users/admin/builder/spi-builder-workspace/Sources/SwiftScraper/Browser.swift:239:10: note: calls to instance method 'runPageChangeScript(functionName:params:completion:)' from outside of its actor context are implicitly asynchronous
237 |
238 |     /// Run some JavaScript that results in a page being loaded (i.e. navigation happens).
239 |     func runPageChangeScript(functionName: String, params: [Any] = [], completion: @escaping NavigationCallback) {
    |          `- note: calls to instance method 'runPageChangeScript(functionName:params:completion:)' from outside of its actor context are implicitly asynchronous
240 |         self.navigationCallback = completion
241 |         sheduleTimeoutTimer()
/Users/admin/builder/spi-builder-workspace/Sources/SwiftScraper/Steps/OpenPageStep.swift:26:17: warning: sending task-isolated value of type '(NavigationResult) -> Void' (aka '(Result<(), SwiftScraperError>) -> ()') with later accesses to main actor-isolated context risks causing data races; this is an error in the Swift 6 language mode
24 |
25 |     public func run(with browser: Browser, model: JSON, completion: @escaping StepCompletionCallback) {
26 |         browser.load(path: path) { [weak self] result in
   |                 `- warning: sending task-isolated value of type '(NavigationResult) -> Void' (aka '(Result<(), SwiftScraperError>) -> ()') with later accesses to main actor-isolated context risks causing data races; this is an error in the Swift 6 language mode
27 |             guard let self else {
28 |                 return
/Users/admin/builder/spi-builder-workspace/Sources/SwiftScraper/Steps/PageChangeStep.swift:46:17: warning: sending 'params' risks causing data races; this is an error in the Swift 6 language mode
44 |             params = paramsKeys.map { model[$0] ?? NSNull() }
45 |         }
46 |         browser.runPageChangeScript(functionName: functionName, params: params) { [weak self] result in
   |                 |- warning: sending 'params' risks causing data races; this is an error in the Swift 6 language mode
   |                 `- note: sending task-isolated 'params' to main actor-isolated instance method 'runPageChangeScript(functionName:params:completion:)' risks causing data races between main actor-isolated and task-isolated uses
47 |             guard let self else {
48 |                 return
/Users/admin/builder/spi-builder-workspace/Sources/SwiftScraper/Steps/PageChangeStep.swift:46:17: warning: sending task-isolated value of type '(NavigationResult) -> Void' (aka '(Result<(), SwiftScraperError>) -> ()') with later accesses to main actor-isolated context risks causing data races; this is an error in the Swift 6 language mode
44 |             params = paramsKeys.map { model[$0] ?? NSNull() }
45 |         }
46 |         browser.runPageChangeScript(functionName: functionName, params: params) { [weak self] result in
   |                 `- warning: sending task-isolated value of type '(NavigationResult) -> Void' (aka '(Result<(), SwiftScraperError>) -> ()') with later accesses to main actor-isolated context risks causing data races; this is an error in the Swift 6 language mode
47 |             guard let self else {
48 |                 return
[10/22] Compiling SwiftScraper AsyncScriptStep.swift
/Users/admin/builder/spi-builder-workspace/Sources/SwiftScraper/Steps/AsyncScriptStep.swift:51:17: warning: call to main actor-isolated instance method 'runAsyncScript(functionName:params:completion:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
49 |         completion: @escaping ScriptResponseResultCallback
50 |     ) {
51 |         browser.runAsyncScript(functionName: functionName, params: params, completion: completion)
   |                 `- warning: call to main actor-isolated instance method 'runAsyncScript(functionName:params:completion:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
52 |     }
53 | }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftScraper/Browser.swift:251:10: note: calls to instance method 'runAsyncScript(functionName:params:completion:)' from outside of its actor context are implicitly asynchronous
249 |
250 |     /// Run JavaScript asynchronously - the completion is called when a script message is received back from JavaScript
251 |     func runAsyncScript(functionName: String, params: [Any] = [], completion: @escaping ScriptResponseResultCallback) {
    |          `- note: calls to instance method 'runAsyncScript(functionName:params:completion:)' from outside of its actor context are implicitly asynchronous
252 |         self.asyncScriptCallback = completion
253 |         runScript(functionName: functionName, params: params) { result in
/Users/admin/builder/spi-builder-workspace/Sources/SwiftScraper/Steps/Common/NavigableStep.swift:30:17: warning: call to main actor-isolated instance method 'runScript(functionName:params:completion:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
23 |     /// - parameter model: A JSON model that allows data to be passed from step to step in the pipeline.
24 |     /// - parameter completion: The completion called to indicate success or failure.
25 |     func assertNavigation(with browser: Browser, model: JSON, completion: @escaping StepCompletionCallback) {
   |          `- note: add '@MainActor' to make instance method 'assertNavigation(with:model:completion:)' part of global actor 'MainActor'
26 |         guard let assertionName = self.assertionName else {
27 |             completion(.proceed(model))
28 |             return
29 |         }
30 |         browser.runScript(functionName: assertionName) { result in
   |                 `- warning: call to main actor-isolated instance method 'runScript(functionName:params:completion:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
31 |             switch result {
32 |             case .success(let isOk as Bool) where isOk:
/Users/admin/builder/spi-builder-workspace/Sources/SwiftScraper/Browser.swift:212:10: note: calls to instance method 'runScript(functionName:params:completion:)' from outside of its actor context are implicitly asynchronous
210 |
211 |     /// Run some JavaScript with error handling and logging.
212 |     func runScript(functionName: String, params: [Any] = [], completion: @escaping ScriptResponseResultCallback) {
    |          `- note: calls to instance method 'runScript(functionName:params:completion:)' from outside of its actor context are implicitly asynchronous
213 |         guard let script = try? JavaScriptGenerator.generateScript(moduleName: moduleName,
214 |                                                                    functionName: functionName,
/Users/admin/builder/spi-builder-workspace/Sources/SwiftScraper/Steps/AsyncScriptStep.swift:51:17: warning: sending 'params' risks causing data races; this is an error in the Swift 6 language mode
49 |         completion: @escaping ScriptResponseResultCallback
50 |     ) {
51 |         browser.runAsyncScript(functionName: functionName, params: params, completion: completion)
   |                 |- warning: sending 'params' risks causing data races; this is an error in the Swift 6 language mode
   |                 `- note: sending task-isolated 'params' to main actor-isolated instance method 'runAsyncScript(functionName:params:completion:)' risks causing data races between main actor-isolated and task-isolated uses
52 |     }
53 | }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftScraper/Steps/AsyncScriptStep.swift:51:17: warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
49 |         completion: @escaping ScriptResponseResultCallback
50 |     ) {
51 |         browser.runAsyncScript(functionName: functionName, params: params, completion: completion)
   |                 |- warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
   |                 `- note: sending task-isolated 'completion' to main actor-isolated instance method 'runAsyncScript(functionName:params:completion:)' risks causing data races between main actor-isolated and task-isolated uses
52 |     }
53 | }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftScraper/Steps/Common/NavigableStep.swift:30:17: warning: sending task-isolated value of type '(ScriptResponseResult) -> Void' (aka '(Result<Optional<Any>, SwiftScraperError>) -> ()') with later accesses to main actor-isolated context risks causing data races; this is an error in the Swift 6 language mode
28 |             return
29 |         }
30 |         browser.runScript(functionName: assertionName) { result in
   |                 `- warning: sending task-isolated value of type '(ScriptResponseResult) -> Void' (aka '(Result<Optional<Any>, SwiftScraperError>) -> ()') with later accesses to main actor-isolated context risks causing data races; this is an error in the Swift 6 language mode
31 |             switch result {
32 |             case .success(let isOk as Bool) where isOk:
[11/22] Compiling SwiftScraper NavigableStep.swift
/Users/admin/builder/spi-builder-workspace/Sources/SwiftScraper/Steps/AsyncScriptStep.swift:51:17: warning: call to main actor-isolated instance method 'runAsyncScript(functionName:params:completion:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
49 |         completion: @escaping ScriptResponseResultCallback
50 |     ) {
51 |         browser.runAsyncScript(functionName: functionName, params: params, completion: completion)
   |                 `- warning: call to main actor-isolated instance method 'runAsyncScript(functionName:params:completion:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
52 |     }
53 | }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftScraper/Browser.swift:251:10: note: calls to instance method 'runAsyncScript(functionName:params:completion:)' from outside of its actor context are implicitly asynchronous
249 |
250 |     /// Run JavaScript asynchronously - the completion is called when a script message is received back from JavaScript
251 |     func runAsyncScript(functionName: String, params: [Any] = [], completion: @escaping ScriptResponseResultCallback) {
    |          `- note: calls to instance method 'runAsyncScript(functionName:params:completion:)' from outside of its actor context are implicitly asynchronous
252 |         self.asyncScriptCallback = completion
253 |         runScript(functionName: functionName, params: params) { result in
/Users/admin/builder/spi-builder-workspace/Sources/SwiftScraper/Steps/Common/NavigableStep.swift:30:17: warning: call to main actor-isolated instance method 'runScript(functionName:params:completion:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
23 |     /// - parameter model: A JSON model that allows data to be passed from step to step in the pipeline.
24 |     /// - parameter completion: The completion called to indicate success or failure.
25 |     func assertNavigation(with browser: Browser, model: JSON, completion: @escaping StepCompletionCallback) {
   |          `- note: add '@MainActor' to make instance method 'assertNavigation(with:model:completion:)' part of global actor 'MainActor'
26 |         guard let assertionName = self.assertionName else {
27 |             completion(.proceed(model))
28 |             return
29 |         }
30 |         browser.runScript(functionName: assertionName) { result in
   |                 `- warning: call to main actor-isolated instance method 'runScript(functionName:params:completion:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
31 |             switch result {
32 |             case .success(let isOk as Bool) where isOk:
/Users/admin/builder/spi-builder-workspace/Sources/SwiftScraper/Browser.swift:212:10: note: calls to instance method 'runScript(functionName:params:completion:)' from outside of its actor context are implicitly asynchronous
210 |
211 |     /// Run some JavaScript with error handling and logging.
212 |     func runScript(functionName: String, params: [Any] = [], completion: @escaping ScriptResponseResultCallback) {
    |          `- note: calls to instance method 'runScript(functionName:params:completion:)' from outside of its actor context are implicitly asynchronous
213 |         guard let script = try? JavaScriptGenerator.generateScript(moduleName: moduleName,
214 |                                                                    functionName: functionName,
/Users/admin/builder/spi-builder-workspace/Sources/SwiftScraper/Steps/AsyncScriptStep.swift:51:17: warning: sending 'params' risks causing data races; this is an error in the Swift 6 language mode
49 |         completion: @escaping ScriptResponseResultCallback
50 |     ) {
51 |         browser.runAsyncScript(functionName: functionName, params: params, completion: completion)
   |                 |- warning: sending 'params' risks causing data races; this is an error in the Swift 6 language mode
   |                 `- note: sending task-isolated 'params' to main actor-isolated instance method 'runAsyncScript(functionName:params:completion:)' risks causing data races between main actor-isolated and task-isolated uses
52 |     }
53 | }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftScraper/Steps/AsyncScriptStep.swift:51:17: warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
49 |         completion: @escaping ScriptResponseResultCallback
50 |     ) {
51 |         browser.runAsyncScript(functionName: functionName, params: params, completion: completion)
   |                 |- warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
   |                 `- note: sending task-isolated 'completion' to main actor-isolated instance method 'runAsyncScript(functionName:params:completion:)' risks causing data races between main actor-isolated and task-isolated uses
52 |     }
53 | }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftScraper/Steps/Common/NavigableStep.swift:30:17: warning: sending task-isolated value of type '(ScriptResponseResult) -> Void' (aka '(Result<Optional<Any>, SwiftScraperError>) -> ()') with later accesses to main actor-isolated context risks causing data races; this is an error in the Swift 6 language mode
28 |             return
29 |         }
30 |         browser.runScript(functionName: assertionName) { result in
   |                 `- warning: sending task-isolated value of type '(ScriptResponseResult) -> Void' (aka '(Result<Optional<Any>, SwiftScraperError>) -> ()') with later accesses to main actor-isolated context risks causing data races; this is an error in the Swift 6 language mode
31 |             switch result {
32 |             case .success(let isOk as Bool) where isOk:
[12/22] Compiling SwiftScraper resource_bundle_accessor.swift
[13/22] Compiling SwiftScraper ProcessStep.swift
/Users/admin/builder/spi-builder-workspace/Sources/SwiftScraper/Steps/ScriptStep.swift:80:17: warning: call to main actor-isolated instance method 'runScript(functionName:params:completion:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
72 |     }
73 |
74 |     func runScript(
   |          `- note: add '@MainActor' to make instance method 'runScript(browser:functionName:params:completion:)' part of global actor 'MainActor'
75 |         browser: Browser,
76 |         functionName: String,
   :
78 |         completion: @escaping ScriptResponseResultCallback
79 |     ) {
80 |         browser.runScript(functionName: functionName, params: params, completion: completion)
   |                 `- warning: call to main actor-isolated instance method 'runScript(functionName:params:completion:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
81 |     }
82 |
/Users/admin/builder/spi-builder-workspace/Sources/SwiftScraper/Browser.swift:212:10: note: calls to instance method 'runScript(functionName:params:completion:)' from outside of its actor context are implicitly asynchronous
210 |
211 |     /// Run some JavaScript with error handling and logging.
212 |     func runScript(functionName: String, params: [Any] = [], completion: @escaping ScriptResponseResultCallback) {
    |          `- note: calls to instance method 'runScript(functionName:params:completion:)' from outside of its actor context are implicitly asynchronous
213 |         guard let script = try? JavaScriptGenerator.generateScript(moduleName: moduleName,
214 |                                                                    functionName: functionName,
/Users/admin/builder/spi-builder-workspace/Sources/SwiftScraper/Steps/ScriptStep.swift:80:17: warning: sending 'params' risks causing data races; this is an error in the Swift 6 language mode
78 |         completion: @escaping ScriptResponseResultCallback
79 |     ) {
80 |         browser.runScript(functionName: functionName, params: params, completion: completion)
   |                 |- warning: sending 'params' risks causing data races; this is an error in the Swift 6 language mode
   |                 `- note: sending task-isolated 'params' to main actor-isolated instance method 'runScript(functionName:params:completion:)' risks causing data races between main actor-isolated and task-isolated uses
81 |     }
82 |
/Users/admin/builder/spi-builder-workspace/Sources/SwiftScraper/Steps/ScriptStep.swift:80:17: warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
78 |         completion: @escaping ScriptResponseResultCallback
79 |     ) {
80 |         browser.runScript(functionName: functionName, params: params, completion: completion)
   |                 |- warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
   |                 `- note: sending task-isolated 'completion' to main actor-isolated instance method 'runScript(functionName:params:completion:)' risks causing data races between main actor-isolated and task-isolated uses
81 |     }
82 |
[14/22] Compiling SwiftScraper ScriptStep.swift
/Users/admin/builder/spi-builder-workspace/Sources/SwiftScraper/Steps/ScriptStep.swift:80:17: warning: call to main actor-isolated instance method 'runScript(functionName:params:completion:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
72 |     }
73 |
74 |     func runScript(
   |          `- note: add '@MainActor' to make instance method 'runScript(browser:functionName:params:completion:)' part of global actor 'MainActor'
75 |         browser: Browser,
76 |         functionName: String,
   :
78 |         completion: @escaping ScriptResponseResultCallback
79 |     ) {
80 |         browser.runScript(functionName: functionName, params: params, completion: completion)
   |                 `- warning: call to main actor-isolated instance method 'runScript(functionName:params:completion:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
81 |     }
82 |
/Users/admin/builder/spi-builder-workspace/Sources/SwiftScraper/Browser.swift:212:10: note: calls to instance method 'runScript(functionName:params:completion:)' from outside of its actor context are implicitly asynchronous
210 |
211 |     /// Run some JavaScript with error handling and logging.
212 |     func runScript(functionName: String, params: [Any] = [], completion: @escaping ScriptResponseResultCallback) {
    |          `- note: calls to instance method 'runScript(functionName:params:completion:)' from outside of its actor context are implicitly asynchronous
213 |         guard let script = try? JavaScriptGenerator.generateScript(moduleName: moduleName,
214 |                                                                    functionName: functionName,
/Users/admin/builder/spi-builder-workspace/Sources/SwiftScraper/Steps/ScriptStep.swift:80:17: warning: sending 'params' risks causing data races; this is an error in the Swift 6 language mode
78 |         completion: @escaping ScriptResponseResultCallback
79 |     ) {
80 |         browser.runScript(functionName: functionName, params: params, completion: completion)
   |                 |- warning: sending 'params' risks causing data races; this is an error in the Swift 6 language mode
   |                 `- note: sending task-isolated 'params' to main actor-isolated instance method 'runScript(functionName:params:completion:)' risks causing data races between main actor-isolated and task-isolated uses
81 |     }
82 |
/Users/admin/builder/spi-builder-workspace/Sources/SwiftScraper/Steps/ScriptStep.swift:80:17: warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
78 |         completion: @escaping ScriptResponseResultCallback
79 |     ) {
80 |         browser.runScript(functionName: functionName, params: params, completion: completion)
   |                 |- warning: sending 'completion' risks causing data races; this is an error in the Swift 6 language mode
   |                 `- note: sending task-isolated 'completion' to main actor-isolated instance method 'runScript(functionName:params:completion:)' risks causing data races between main actor-isolated and task-isolated uses
81 |     }
82 |
[15/22] Compiling SwiftScraper SwiftScraperError.swift
[16/22] Compiling SwiftScraper StepFlowResult.swift
/Users/admin/builder/spi-builder-workspace/Sources/SwiftScraper/Steps/DownloadStep.swift:49:1: error: type 'DownloadStep' does not conform to protocol 'WKDownloadDelegate'
47 |
48 | @available(iOS 14.5, macOS 11.3, *)
49 | extension DownloadStep: WKDownloadDelegate {
   | `- error: type 'DownloadStep' does not conform to protocol 'WKDownloadDelegate'
50 |
51 |     public func download(_: WKDownload, decideDestinationUsing _: URLResponse, suggestedFilename: String, completionHandler: @escaping (URL?) -> Void) {
   |                 `- note: candidate has non-matching type '(WKDownload, URLResponse, String, @escaping (URL?) -> Void) -> ()'
52 |         let temporaryDir = NSTemporaryDirectory()
53 |         let fileName = temporaryDir + "/" + suggestedFilename + UUID().description
WebKit.WKDownloadDelegate:5:10: note: protocol requires function 'download(_:decideDestinationUsing:suggestedFilename:)' with type '(WKDownload, URLResponse, String) async -> URL?'
 1 | @MainActor public protocol WKDownloadDelegate : NSObjectProtocol {
 2 |     @available(macOS 11.3, *)
 3 |     func download(_ download: WKDownload, decideDestinationUsing response: URLResponse, suggestedFilename: String, completionHandler: @escaping @MainActor @Sendable (URL?) -> Void)
   |          `- note: protocol requires function 'download(_:decideDestinationUsing:suggestedFilename:completionHandler:)' with type '(WKDownload, URLResponse, String, @escaping @MainActor @Sendable (URL?) -> Void) -> Void'
 4 |     @available(macOS 11.3, *)
 5 |     func download(_ download: WKDownload, decideDestinationUsing response: URLResponse, suggestedFilename: String) async -> URL?
   |          `- note: protocol requires function 'download(_:decideDestinationUsing:suggestedFilename:)' with type '(WKDownload, URLResponse, String) async -> URL?'
 6 |     @available(swift, obsoleted: 3, renamed: "download(_:decideDestinationUsing:suggestedFilename:completionHandler:)")
 7 |     func download(_ download: WKDownload, decideDestinationUsingResponse response: URLResponse, suggestedFilename: String, completionHandler: @escaping @MainActor @Sendable (URL?) -> Void)
/Users/admin/builder/spi-builder-workspace/Sources/SwiftScraper/Steps/DownloadStep.swift:41:25: warning: call to main actor-isolated instance method 'startDownload(using:completionHandler:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
36 |     }
37 |
38 |     public func run(with browser: Browser, model: JSON, completion: @escaping StepCompletionCallback) {
   |                 `- note: add '@MainActor' to make instance method 'run(with:model:completion:)' part of global actor 'MainActor'
39 |         self.completion = completion
40 |         self.model = model
41 |         browser.webView.startDownload(using: URLRequest(url: url)) { download in
   |                         `- warning: call to main actor-isolated instance method 'startDownload(using:completionHandler:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
42 |             download.delegate = self
43 |         }
WebKit.WKWebView:144:26: note: calls to instance method 'startDownload(using:completionHandler:)' from outside of its actor context are implicitly asynchronous
142 |     open class func handlesURLScheme(_ urlScheme: String) -> Bool
143 |     @available(macOS 11.3, *)
144 |     @MainActor open func startDownload(using request: URLRequest, completionHandler: @escaping @MainActor @Sendable (WKDownload) -> Void)
    |                          `- note: calls to instance method 'startDownload(using:completionHandler:)' from outside of its actor context are implicitly asynchronous
145 |     @available(macOS 11.3, *)
146 |     open func startDownload(using request: URLRequest) async -> WKDownload
/Users/admin/builder/spi-builder-workspace/Sources/SwiftScraper/Steps/DownloadStep.swift:41:17: warning: main actor-isolated property 'webView' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
36 |     }
37 |
38 |     public func run(with browser: Browser, model: JSON, completion: @escaping StepCompletionCallback) {
   |                 `- note: add '@MainActor' to make instance method 'run(with:model:completion:)' part of global actor 'MainActor'
39 |         self.completion = completion
40 |         self.model = model
41 |         browser.webView.startDownload(using: URLRequest(url: url)) { download in
   |                 `- warning: main actor-isolated property 'webView' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
42 |             download.delegate = self
43 |         }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftScraper/Browser.swift:50:29: note: property declared here
 48 |     private let logger = Logger()
 49 |     /// The webview itself
 50 |     public private(set) var webView: WKWebView!
    |                             `- note: property declared here
 51 |     private let userContentController = WKUserContentController()
 52 |     private var navigationCallback: NavigationCallback?
[17/22] Compiling SwiftScraper DownloadStep.swift
/Users/admin/builder/spi-builder-workspace/Sources/SwiftScraper/Steps/DownloadStep.swift:49:1: error: type 'DownloadStep' does not conform to protocol 'WKDownloadDelegate'
47 |
48 | @available(iOS 14.5, macOS 11.3, *)
49 | extension DownloadStep: WKDownloadDelegate {
   | `- error: type 'DownloadStep' does not conform to protocol 'WKDownloadDelegate'
50 |
51 |     public func download(_: WKDownload, decideDestinationUsing _: URLResponse, suggestedFilename: String, completionHandler: @escaping (URL?) -> Void) {
   |                 `- note: candidate has non-matching type '(WKDownload, URLResponse, String, @escaping (URL?) -> Void) -> ()'
52 |         let temporaryDir = NSTemporaryDirectory()
53 |         let fileName = temporaryDir + "/" + suggestedFilename + UUID().description
WebKit.WKDownloadDelegate:5:10: note: protocol requires function 'download(_:decideDestinationUsing:suggestedFilename:)' with type '(WKDownload, URLResponse, String) async -> URL?'
 1 | @MainActor public protocol WKDownloadDelegate : NSObjectProtocol {
 2 |     @available(macOS 11.3, *)
 3 |     func download(_ download: WKDownload, decideDestinationUsing response: URLResponse, suggestedFilename: String, completionHandler: @escaping @MainActor @Sendable (URL?) -> Void)
   |          `- note: protocol requires function 'download(_:decideDestinationUsing:suggestedFilename:completionHandler:)' with type '(WKDownload, URLResponse, String, @escaping @MainActor @Sendable (URL?) -> Void) -> Void'
 4 |     @available(macOS 11.3, *)
 5 |     func download(_ download: WKDownload, decideDestinationUsing response: URLResponse, suggestedFilename: String) async -> URL?
   |          `- note: protocol requires function 'download(_:decideDestinationUsing:suggestedFilename:)' with type '(WKDownload, URLResponse, String) async -> URL?'
 6 |     @available(swift, obsoleted: 3, renamed: "download(_:decideDestinationUsing:suggestedFilename:completionHandler:)")
 7 |     func download(_ download: WKDownload, decideDestinationUsingResponse response: URLResponse, suggestedFilename: String, completionHandler: @escaping @MainActor @Sendable (URL?) -> Void)
/Users/admin/builder/spi-builder-workspace/Sources/SwiftScraper/Steps/DownloadStep.swift:41:25: warning: call to main actor-isolated instance method 'startDownload(using:completionHandler:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
36 |     }
37 |
38 |     public func run(with browser: Browser, model: JSON, completion: @escaping StepCompletionCallback) {
   |                 `- note: add '@MainActor' to make instance method 'run(with:model:completion:)' part of global actor 'MainActor'
39 |         self.completion = completion
40 |         self.model = model
41 |         browser.webView.startDownload(using: URLRequest(url: url)) { download in
   |                         `- warning: call to main actor-isolated instance method 'startDownload(using:completionHandler:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
42 |             download.delegate = self
43 |         }
WebKit.WKWebView:144:26: note: calls to instance method 'startDownload(using:completionHandler:)' from outside of its actor context are implicitly asynchronous
142 |     open class func handlesURLScheme(_ urlScheme: String) -> Bool
143 |     @available(macOS 11.3, *)
144 |     @MainActor open func startDownload(using request: URLRequest, completionHandler: @escaping @MainActor @Sendable (WKDownload) -> Void)
    |                          `- note: calls to instance method 'startDownload(using:completionHandler:)' from outside of its actor context are implicitly asynchronous
145 |     @available(macOS 11.3, *)
146 |     open func startDownload(using request: URLRequest) async -> WKDownload
/Users/admin/builder/spi-builder-workspace/Sources/SwiftScraper/Steps/DownloadStep.swift:41:17: warning: main actor-isolated property 'webView' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
36 |     }
37 |
38 |     public func run(with browser: Browser, model: JSON, completion: @escaping StepCompletionCallback) {
   |                 `- note: add '@MainActor' to make instance method 'run(with:model:completion:)' part of global actor 'MainActor'
39 |         self.completion = completion
40 |         self.model = model
41 |         browser.webView.startDownload(using: URLRequest(url: url)) { download in
   |                 `- warning: main actor-isolated property 'webView' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
42 |             download.delegate = self
43 |         }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftScraper/Browser.swift:50:29: note: property declared here
 48 |     private let logger = Logger()
 49 |     /// The webview itself
 50 |     public private(set) var webView: WKWebView!
    |                             `- note: property declared here
 51 |     private let userContentController = WKUserContentController()
 52 |     private var navigationCallback: NavigationCallback?
[18/22] Compiling SwiftScraper Browser.swift
/Users/admin/builder/spi-builder-workspace/Sources/SwiftScraper/Browser.swift:161:19: warning: main actor-isolated property 'timer' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
 52 |     private var navigationCallback: NavigationCallback?
 53 |     private var asyncScriptCallback: ScriptResponseResultCallback?
 54 |     private var timer: Timer?
    |                 `- note: property declared here
 55 |
 56 |     // MARK: - Setup
    :
159 |     private func sheduleTimeoutTimer() {
160 |         timer = Timer.scheduledTimer(withTimeInterval: Constants.navigationTimeout, repeats: false) { [weak self] _ in
161 |             self?.timer?.invalidate()
    |                   `- warning: main actor-isolated property 'timer' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
162 |             if let navigationCallback = self?.navigationCallback {
163 |                 self?.navigationCallback = nil
/Users/admin/builder/spi-builder-workspace/Sources/SwiftScraper/Browser.swift:162:47: warning: main actor-isolated property 'navigationCallback' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
 50 |     public private(set) var webView: WKWebView!
 51 |     private let userContentController = WKUserContentController()
 52 |     private var navigationCallback: NavigationCallback?
    |                 `- note: property declared here
 53 |     private var asyncScriptCallback: ScriptResponseResultCallback?
 54 |     private var timer: Timer?
    :
160 |         timer = Timer.scheduledTimer(withTimeInterval: Constants.navigationTimeout, repeats: false) { [weak self] _ in
161 |             self?.timer?.invalidate()
162 |             if let navigationCallback = self?.navigationCallback {
    |                                               `- warning: main actor-isolated property 'navigationCallback' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
163 |                 self?.navigationCallback = nil
164 |                 navigationCallback(.failure(.timeout))
/Users/admin/builder/spi-builder-workspace/Sources/SwiftScraper/Browser.swift:163:23: warning: main actor-isolated property 'navigationCallback' can not be mutated from a Sendable closure; this is an error in the Swift 6 language mode
 50 |     public private(set) var webView: WKWebView!
 51 |     private let userContentController = WKUserContentController()
 52 |     private var navigationCallback: NavigationCallback?
    |                 `- note: mutation of this property is only permitted within the actor
 53 |     private var asyncScriptCallback: ScriptResponseResultCallback?
 54 |     private var timer: Timer?
    :
161 |             self?.timer?.invalidate()
162 |             if let navigationCallback = self?.navigationCallback {
163 |                 self?.navigationCallback = nil
    |                       `- warning: main actor-isolated property 'navigationCallback' can not be mutated from a Sendable closure; this is an error in the Swift 6 language mode
164 |                 navigationCallback(.failure(.timeout))
165 |             }
[19/22] Compiling SwiftScraper JavaScriptGenerator.swift
/Users/admin/builder/spi-builder-workspace/Sources/SwiftScraper/Browser.swift:161:19: warning: main actor-isolated property 'timer' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
 52 |     private var navigationCallback: NavigationCallback?
 53 |     private var asyncScriptCallback: ScriptResponseResultCallback?
 54 |     private var timer: Timer?
    |                 `- note: property declared here
 55 |
 56 |     // MARK: - Setup
    :
159 |     private func sheduleTimeoutTimer() {
160 |         timer = Timer.scheduledTimer(withTimeInterval: Constants.navigationTimeout, repeats: false) { [weak self] _ in
161 |             self?.timer?.invalidate()
    |                   `- warning: main actor-isolated property 'timer' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
162 |             if let navigationCallback = self?.navigationCallback {
163 |                 self?.navigationCallback = nil
/Users/admin/builder/spi-builder-workspace/Sources/SwiftScraper/Browser.swift:162:47: warning: main actor-isolated property 'navigationCallback' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
 50 |     public private(set) var webView: WKWebView!
 51 |     private let userContentController = WKUserContentController()
 52 |     private var navigationCallback: NavigationCallback?
    |                 `- note: property declared here
 53 |     private var asyncScriptCallback: ScriptResponseResultCallback?
 54 |     private var timer: Timer?
    :
160 |         timer = Timer.scheduledTimer(withTimeInterval: Constants.navigationTimeout, repeats: false) { [weak self] _ in
161 |             self?.timer?.invalidate()
162 |             if let navigationCallback = self?.navigationCallback {
    |                                               `- warning: main actor-isolated property 'navigationCallback' can not be referenced from a Sendable closure; this is an error in the Swift 6 language mode
163 |                 self?.navigationCallback = nil
164 |                 navigationCallback(.failure(.timeout))
/Users/admin/builder/spi-builder-workspace/Sources/SwiftScraper/Browser.swift:163:23: warning: main actor-isolated property 'navigationCallback' can not be mutated from a Sendable closure; this is an error in the Swift 6 language mode
 50 |     public private(set) var webView: WKWebView!
 51 |     private let userContentController = WKUserContentController()
 52 |     private var navigationCallback: NavigationCallback?
    |                 `- note: mutation of this property is only permitted within the actor
 53 |     private var asyncScriptCallback: ScriptResponseResultCallback?
 54 |     private var timer: Timer?
    :
161 |             self?.timer?.invalidate()
162 |             if let navigationCallback = self?.navigationCallback {
163 |                 self?.navigationCallback = nil
    |                       `- warning: main actor-isolated property 'navigationCallback' can not be mutated from a Sendable closure; this is an error in the Swift 6 language mode
164 |                 navigationCallback(.failure(.timeout))
165 |             }
error: emit-module command failed with exit code 1 (use -v to see invocation)
[20/22] Compiling SwiftScraper StepRunner.swift
/Users/admin/builder/spi-builder-workspace/Sources/SwiftScraper/StepRunner.swift:118:23: warning: call to main actor-isolated initializer 'init(moduleName:scriptBundle:customUserAgent:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
116 |         completion: (() -> Void)? = nil
117 |     ) throws {
118 |         browser = try Browser(moduleName: moduleName, scriptBundle: scriptBundle, customUserAgent: customUserAgent)
    |                       `- warning: call to main actor-isolated initializer 'init(moduleName:scriptBundle:customUserAgent:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
119 |         self.steps = steps
120 |         self.completion = completion
/Users/admin/builder/spi-builder-workspace/Sources/SwiftScraper/Browser.swift:64:5: note: calls to initializer 'init(moduleName:scriptBundle:customUserAgent:)' from outside of its actor context are implicitly asynchronous
 62 |     /// - parameter scriptBundle: The bundle from which to load the JavaScript file. Defaults to the main bundle.
 63 |     /// - parameter customUserAgent: The custom user agent string (only works for iOS 9+).
 64 |     init(moduleName: String, scriptBundle: Bundle = Bundle.main, customUserAgent: String? = nil) throws {
    |     `- note: calls to initializer 'init(moduleName:scriptBundle:customUserAgent:)' from outside of its actor context are implicitly asynchronous
 65 |         self.moduleName = moduleName
 66 |         super.init()
/Users/admin/builder/spi-builder-workspace/Sources/SwiftScraper/StepRunner.swift:174:17: warning: call to main actor-isolated instance method 'insertIntoView(parent:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
171 |     ///
172 |     /// Useful if the app would like to see the scraping in the foreground.
173 |     public func insertWebViewIntoView(parent: PlatformView) {
    |                 `- note: add '@MainActor' to make instance method 'insertWebViewIntoView(parent:)' part of global actor 'MainActor'
174 |         browser.insertIntoView(parent: parent)
    |                 `- warning: call to main actor-isolated instance method 'insertIntoView(parent:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
175 |     }
176 | }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftScraper/Browser.swift:191:10: note: calls to instance method 'insertIntoView(parent:)' from outside of its actor context are implicitly asynchronous
189 |     /// Insert the WebView at index 0 of the given parent view,
190 |     /// using AutoLayout to pin all 4 sides to the parent.
191 |     func insertIntoView(parent: PlatformView) {
    |          `- note: calls to instance method 'insertIntoView(parent:)' from outside of its actor context are implicitly asynchronous
192 |         #if canImport(UIKit)
193 |         parent.insertSubview(webView, at: 0)
[21/22] Compiling SwiftScraper AsyncProcessStep.swift
/Users/admin/builder/spi-builder-workspace/Sources/SwiftScraper/StepRunner.swift:118:23: warning: call to main actor-isolated initializer 'init(moduleName:scriptBundle:customUserAgent:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
116 |         completion: (() -> Void)? = nil
117 |     ) throws {
118 |         browser = try Browser(moduleName: moduleName, scriptBundle: scriptBundle, customUserAgent: customUserAgent)
    |                       `- warning: call to main actor-isolated initializer 'init(moduleName:scriptBundle:customUserAgent:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
119 |         self.steps = steps
120 |         self.completion = completion
/Users/admin/builder/spi-builder-workspace/Sources/SwiftScraper/Browser.swift:64:5: note: calls to initializer 'init(moduleName:scriptBundle:customUserAgent:)' from outside of its actor context are implicitly asynchronous
 62 |     /// - parameter scriptBundle: The bundle from which to load the JavaScript file. Defaults to the main bundle.
 63 |     /// - parameter customUserAgent: The custom user agent string (only works for iOS 9+).
 64 |     init(moduleName: String, scriptBundle: Bundle = Bundle.main, customUserAgent: String? = nil) throws {
    |     `- note: calls to initializer 'init(moduleName:scriptBundle:customUserAgent:)' from outside of its actor context are implicitly asynchronous
 65 |         self.moduleName = moduleName
 66 |         super.init()
/Users/admin/builder/spi-builder-workspace/Sources/SwiftScraper/StepRunner.swift:174:17: warning: call to main actor-isolated instance method 'insertIntoView(parent:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
171 |     ///
172 |     /// Useful if the app would like to see the scraping in the foreground.
173 |     public func insertWebViewIntoView(parent: PlatformView) {
    |                 `- note: add '@MainActor' to make instance method 'insertWebViewIntoView(parent:)' part of global actor 'MainActor'
174 |         browser.insertIntoView(parent: parent)
    |                 `- warning: call to main actor-isolated instance method 'insertIntoView(parent:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
175 |     }
176 | }
/Users/admin/builder/spi-builder-workspace/Sources/SwiftScraper/Browser.swift:191:10: note: calls to instance method 'insertIntoView(parent:)' from outside of its actor context are implicitly asynchronous
189 |     /// Insert the WebView at index 0 of the given parent view,
190 |     /// using AutoLayout to pin all 4 sides to the parent.
191 |     func insertIntoView(parent: PlatformView) {
    |          `- note: calls to instance method 'insertIntoView(parent:)' from outside of its actor context are implicitly asynchronous
192 |         #if canImport(UIKit)
193 |         parent.insertSubview(webView, at: 0)
[22/22] Emitting module SwiftScraper
/Users/admin/builder/spi-builder-workspace/Sources/SwiftScraper/Steps/DownloadStep.swift:49:1: error: type 'DownloadStep' does not conform to protocol 'WKDownloadDelegate'
47 |
48 | @available(iOS 14.5, macOS 11.3, *)
49 | extension DownloadStep: WKDownloadDelegate {
   | `- error: type 'DownloadStep' does not conform to protocol 'WKDownloadDelegate'
50 |
51 |     public func download(_: WKDownload, decideDestinationUsing _: URLResponse, suggestedFilename: String, completionHandler: @escaping (URL?) -> Void) {
   |                 `- note: candidate has non-matching type '(WKDownload, URLResponse, String, @escaping (URL?) -> Void) -> ()'
52 |         let temporaryDir = NSTemporaryDirectory()
53 |         let fileName = temporaryDir + "/" + suggestedFilename + UUID().description
WebKit.WKDownloadDelegate:5:10: note: protocol requires function 'download(_:decideDestinationUsing:suggestedFilename:)' with type '(WKDownload, URLResponse, String) async -> URL?'
 1 | @MainActor public protocol WKDownloadDelegate : NSObjectProtocol {
 2 |     @available(macOS 11.3, *)
 3 |     func download(_ download: WKDownload, decideDestinationUsing response: URLResponse, suggestedFilename: String, completionHandler: @escaping @MainActor @Sendable (URL?) -> Void)
   |          `- note: protocol requires function 'download(_:decideDestinationUsing:suggestedFilename:completionHandler:)' with type '(WKDownload, URLResponse, String, @escaping @MainActor @Sendable (URL?) -> Void) -> Void'
 4 |     @available(macOS 11.3, *)
 5 |     func download(_ download: WKDownload, decideDestinationUsing response: URLResponse, suggestedFilename: String) async -> URL?
   |          `- note: protocol requires function 'download(_:decideDestinationUsing:suggestedFilename:)' with type '(WKDownload, URLResponse, String) async -> URL?'
 6 |     @available(swift, obsoleted: 3, renamed: "download(_:decideDestinationUsing:suggestedFilename:completionHandler:)")
 7 |     func download(_ download: WKDownload, decideDestinationUsingResponse response: URLResponse, suggestedFilename: String, completionHandler: @escaping @MainActor @Sendable (URL?) -> Void)
Running build ...
env DEVELOPER_DIR=/Applications/Xcode-16.2.0.app xcrun swift build --arch arm64
[0/1] Planning build
Building for debugging...
[0/1] Write swift-version-5BDAB9E9C0126B9D.txt
[2/19] Compiling SwiftScraper OpenPageStep.swift
[3/19] Compiling SwiftScraper PageChangeStep.swift
[4/19] Compiling SwiftScraper ProcessStep.swift
[5/19] Compiling SwiftScraper ScriptStep.swift
[6/19] Compiling SwiftScraper WaitForConditionStep.swift
[7/19] Compiling SwiftScraper WaitStep.swift
[8/19] Compiling SwiftScraper SwiftScraperError.swift
[9/20] Compiling SwiftScraper Step.swift
[10/20] Compiling SwiftScraper StepCompletionCallback.swift
[11/20] Compiling SwiftScraper StepFlowResult.swift
/Users/admin/builder/spi-builder-workspace/Sources/SwiftScraper/Steps/DownloadStep.swift:9:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'WebKit'
 7 |
 8 | import Foundation
 9 | import WebKit
   | `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'WebKit'
10 |
11 | // MARK: - DownloadStep
[12/20] Compiling SwiftScraper DownloadStep.swift
/Users/admin/builder/spi-builder-workspace/Sources/SwiftScraper/Steps/DownloadStep.swift:9:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'WebKit'
 7 |
 8 | import Foundation
 9 | import WebKit
   | `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'WebKit'
10 |
11 | // MARK: - DownloadStep
[13/20] Compiling SwiftScraper AsyncScriptStep.swift
[14/20] Compiling SwiftScraper NavigableStep.swift
[15/20] Compiling SwiftScraper StepRunner.swift
[16/20] Compiling SwiftScraper AsyncProcessStep.swift
[17/20] Compiling SwiftScraper Browser.swift
[18/20] Compiling SwiftScraper JavaScriptGenerator.swift
[19/20] Emitting module SwiftScraper
/Users/admin/builder/spi-builder-workspace/Sources/SwiftScraper/Steps/DownloadStep.swift:9:1: warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'WebKit'
 7 |
 8 | import Foundation
 9 | import WebKit
   | `- warning: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'WebKit'
10 |
11 | // MARK: - DownloadStep
[20/20] Compiling SwiftScraper resource_bundle_accessor.swift
Build complete! (1.01s)
Build complete.
{
  "dependencies" : [
  ],
  "manifest_display_name" : "SwiftScraper",
  "name" : "SwiftScraper",
  "path" : "/Users/admin/builder/spi-builder-workspace",
  "platforms" : [
    {
      "name" : "ios",
      "version" : "14.0"
    },
    {
      "name" : "macos",
      "version" : "11.0"
    }
  ],
  "products" : [
    {
      "name" : "SwiftScraper",
      "targets" : [
        "SwiftScraper"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "targets" : [
    {
      "c99name" : "SwiftScraperTests",
      "module_type" : "SwiftTarget",
      "name" : "SwiftScraperTests",
      "path" : "Tests/SwiftScraperTests",
      "resources" : [
        {
          "path" : "/Users/admin/builder/spi-builder-workspace/Tests/SwiftScraperTests/Resources/page1.html",
          "rule" : {
            "process" : {
            }
          }
        },
        {
          "path" : "/Users/admin/builder/spi-builder-workspace/Tests/SwiftScraperTests/Resources/page2.html",
          "rule" : {
            "process" : {
            }
          }
        },
        {
          "path" : "/Users/admin/builder/spi-builder-workspace/Tests/SwiftScraperTests/Resources/waitTest.html",
          "rule" : {
            "process" : {
            }
          }
        },
        {
          "path" : "/Users/admin/builder/spi-builder-workspace/Tests/SwiftScraperTests/StepRunnerTests.js",
          "rule" : {
            "process" : {
            }
          }
        }
      ],
      "sources" : [
        "JavaScriptGeneratorTests.swift",
        "StepRunnerTests.swift",
        "Steps/AsyncProcessStepTests.swift",
        "Steps/AsyncScriptStepTests.swift",
        "Steps/DownloadStepTests.swift",
        "Steps/OpenPageStepTests.swift",
        "Steps/PageChangeStepTests.swift",
        "Steps/ProcessStepTests.swift",
        "Steps/ScriptStepTests.swift",
        "Steps/WaitForConditionStepTests.swift",
        "Steps/WaitStepTests.swift",
        "SwiftScraperErrorTests.swift"
      ],
      "target_dependencies" : [
        "SwiftScraper"
      ],
      "type" : "test"
    },
    {
      "c99name" : "SwiftScraper",
      "module_type" : "SwiftTarget",
      "name" : "SwiftScraper",
      "path" : "Sources/SwiftScraper",
      "product_memberships" : [
        "SwiftScraper"
      ],
      "resources" : [
        {
          "path" : "/Users/admin/builder/spi-builder-workspace/Sources/SwiftScraper/Resources/SwiftScraper.js",
          "rule" : {
            "process" : {
            }
          }
        }
      ],
      "sources" : [
        "Browser.swift",
        "JavaScriptGenerator.swift",
        "StepRunner.swift",
        "Steps/AsyncProcessStep.swift",
        "Steps/AsyncScriptStep.swift",
        "Steps/Common/NavigableStep.swift",
        "Steps/Common/Step.swift",
        "Steps/Common/StepCompletionCallback.swift",
        "Steps/Common/StepFlowResult.swift",
        "Steps/DownloadStep.swift",
        "Steps/OpenPageStep.swift",
        "Steps/PageChangeStep.swift",
        "Steps/ProcessStep.swift",
        "Steps/ScriptStep.swift",
        "Steps/WaitForConditionStep.swift",
        "Steps/WaitStep.swift",
        "SwiftScraperError.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "5.5"
}
Done.