Skip to content

@MainActor warnings when calling startRunning/stopRunning on background thread #105

@brunomunizaf

Description

@brunomunizaf

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))
  )
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions