CodeScanner icon indicating copy to clipboard operation
CodeScanner copied to clipboard

@MainActor warnings when calling startRunning/stopRunning on background thread

Open brunomunizaf opened this issue 1 year ago • 1 comments

Hi Paul,

Would you mind adding these two flags to your Package.swift? I'm facing @MainActor warnings that startRunning/stopRunning did not got called on the main thread.

for target in package.targets {
  if target.type == .binary { continue }
  target.swiftSettings = target.swiftSettings ?? []
  target.swiftSettings?.append(
    .unsafeFlags([
      "-Xfrontend", "-strict-concurrency=targeted",
      "-Xfrontend", "-enable-actor-data-race-checks"
    ], .when(configuration: .debug))
  )
}

brunomunizaf avatar Apr 14 '23 19:04 brunomunizaf

Hello! Feel free to open a PR to suggest your changes, and we'll be happy to review it and merge it.

nathanfallet avatar Apr 24 '23 20:04 nathanfallet