Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support installation via Swift Package Manager #2629

Closed
12 of 16 tasks
1ec5 opened this issue Sep 15, 2020 · 10 comments
Closed
12 of 16 tasks

Support installation via Swift Package Manager #2629

1ec5 opened this issue Sep 15, 2020 · 10 comments
Labels
blocked Blocked by dependency or unclarity. build Issues related to builds and dependency management.

Comments

@1ec5
Copy link
Contributor

1ec5 commented Sep 15, 2020

The navigation SDK is currently available for installation via CocoaPods and Carthage, with some of the lighterweight dependencies (MapboxDirections, Turf, etc.) also available for installation via Swift Package Manager. SPM has a brighter long-term outlook than CocoaPods and Carthage, so we should try to support it as soon as it’s ready.

The navigation SDK can only support SPM once all its dependencies also support SPM, in particular:

The following dependencies are also needed for the SPM build to be testable:

/cc @mapbox/navigation-ios @frederoni

@1ec5 1ec5 added build Issues related to builds and dependency management. blocked Blocked by dependency or unclarity. epic labels Sep 15, 2020
@frederoni
Copy link
Contributor

SPM support in MapboxMobileEvents mapbox/mapbox-events-ios#250

@1ec5
Copy link
Contributor Author

1ec5 commented Sep 16, 2020

The map SDK, MapboxCommon, and MapboxNavigationNative all require .netrc for downloading, so the changes in swiftlang/swift-package-manager#2833 swiftlang/swift-tools-support-core#88 will help to unblock SPM support in the navigation SDK.

@1ec5
Copy link
Contributor Author

1ec5 commented Nov 10, 2020

mapbox/mapbox-directions-swift#494 tracks a major gap in code coverage when testing MapboxDirections with Swift Package Manager.

@MarcoCarnevali
Copy link

@1ec5 are there any news about this?

@FestiFete
Copy link

Didn't see any updates in v1.2.0 change logs, any news about it?

@1ec5
Copy link
Contributor Author

1ec5 commented Jan 29, 2021

MapboxCoreNavigation support for SPM is progressing in #2771. MapboxNavigation support for SPM is blocked by ceeK/Solar#11 and mapbox/mapbox-gl-native#15241. Realistically speaking, MapboxNavigation support for SPM is blocked by upgrading to map SDK v10 because that’s the focus of map SDK development nowadays.

@1ec5
Copy link
Contributor Author

1ec5 commented Jan 29, 2021

The issue description above originally focused on framework dependencies, because the idea was to at least stand up SPM as an alternative build environment as part of a transition towards SPM. However, SPM is now important enough that we need to make sure the test targets also build under SPM. Of the six (six!) testing frameworks this repository depends on, only three currently support SPM. Cedar, FBSnapshotTestCase, and SnappyShrimp not only lack support for SPM but are also unmaintained. We can eliminate MapboxCoreNavigationTests’ dependency on Cedar, but for MapboxNavigationTests to fully support SPM, we’ll need to substantially streamline our testing code: #2791.

@1ec5
Copy link
Contributor Author

1ec5 commented Jan 30, 2021

As of #2771, you can install MapboxCoreNavigation using SPM. Anecdotally, using SPM saves quite a bit of time compared to Carthage if you only need MapboxCoreNavigation. I’m leaving this issue open to track installing MapboxNavigation using SPM, since that’s what most developers would be interested in. We also need to increase code coverage under SPM to where it is with Carthage: #2792.

@1ec5 1ec5 added this to the v2.0.0 milestone Jan 30, 2021
@1ec5
Copy link
Contributor Author

1ec5 commented Feb 5, 2021

The documentation script also needs to use SPM instead of Carthage to discover the most recent MapboxDirections docset to link to:

DIRECTIONS_VERSION=$(grep 'mapbox-directions-swift' Cartfile.resolved | grep -oE '"v.+?"' | grep -oE '[^"v]+')
DIRECTIONS_SYMBOLS="AttributeOptions|CoordinateBounds|Directions|DirectionsCredentials|DirectionsOptions|DirectionsPriority|DirectionsProfileIdentifier|DirectionsResult|Intersection|Lane|LaneIndication|MapMatchingResponse|Match|MatchOptions|RoadClasses|Route|RouteLeg|RouteOptions|RouteResponse|RouteStep|SpokenInstruction|Tracepoint|VisualInstruction|VisualInstruction.Component|VisualInstruction.Component.ImageRepresentation|VisualInstruction.Component.TextRepresentation|VisualInstructionBanner|Waypoint"

@1ec5
Copy link
Contributor Author

1ec5 commented Feb 20, 2021

As of #2808 and v2.0.0-alpha.1, MapboxNavigation also supports SPM. We’re still tracking some significant tail work:

@truburt truburt modified the milestones: v2.0.0, v2.0.0 (Public Preview) Mar 5, 2021
@1ec5 1ec5 closed this as completed Mar 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked Blocked by dependency or unclarity. build Issues related to builds and dependency management.
Projects
None yet
Development

No branches or pull requests

6 participants