mapbox / mapbox-navigation-ios

Turn-by-turn navigation logic and UI in Swift on iOS
https://docs.mapbox.com/ios/navigation/
Other
855 stars 304 forks source link

Xcode takes forever to resolve packages #4140

Open azarovalex opened 1 year ago

azarovalex commented 1 year ago

Due to a bug in SPM, usage of some specific versions of Mapbox SDK results in endless resolving of SPM packages. For example, these versions together will crash both Xcode and swift build command, even in an empty project:

.package(url: "https://github.com/mapbox/mapbox-navigation-ios.git", from: "2.8.0-beta.2"),
.package(url: "https://github.com/mapbox/mapbox-search-ios.git", from: "1.0.0-beta.33")

I can reproduce it even when building SPM from sources. PubGrub algorithm used in SPM is too hard to debug.

As a workaround users can pin MapboxCommon to a specific version.

azarovalex commented 1 year ago

So, this is blocked upstream by the Swift Package Manager: https://github.com/apple/swift-package-manager/issues/5763

1ec5 commented 1 year ago

Possibly pelated to #4047, in which MapboxNavigation ended up having to pin a specific version of MapboxCommon because SPM resolved the wrong version for the MapboxCommon dependency in MapboxMaps and MapboxNavigationNative.