CodeScanner
CodeScanner copied to clipboard
@MainActor warnings when calling startRunning/stopRunning on background thread
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))
)
}
Hello! Feel free to open a PR to suggest your changes, and we'll be happy to review it and merge it.