stadiamaps / ferrostar

A FOSS navigation SDK built from the ground up for the future
https://stadiamaps.github.io/ferrostar/
Other
152 stars 15 forks source link

Swift 6 warning: Main actor-isolated method cannot satisfy nonisolated protocol requirement #164

Open CatMe0w opened 2 months ago

CatMe0w commented 2 months ago

https://github.com/stadiamaps/ferrostar/blob/b8d925a991e04d529f275a36e1162441da07ef4a/apple/Sources/FerrostarCore/FerrostarCore.swift#L349

Xcode 16 gives this warning for this line in FerrostarCore package:

Main actor-isolated instance method 'locationManager(_:didUpdateLocations:)' cannot be used to satisfy nonisolated protocol requirement; this is an error in the Swift 6 language mode

ianthetechie commented 2 months ago

That's correct. It's a known limitation. As far as we are aware, the current code is safe, but due to a variety of reasons, it's not possible for us to satisfy the Swift 6 strict concurrency checker ;) Long-term we want to transition this to an actor type, but it's not high enough priority quite yet.