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

Enable library evolution and prepare v2.0.0-alpha.2 #133

Merged
merged 6 commits into from
Feb 9, 2021

Conversation

macdrevx
Copy link
Contributor

@macdrevx macdrevx commented Feb 9, 2021

  • Enables library evolution in the Xcode project
  • Enables library evolution in the podspec
  • Updates version numbers for v2.0.0-alpha.2 release
  • Configures build settings for generating XCFrameworks
  • Adds a script to generate an XCFramework
  • Configures the Package.swift to use binary distribution

pushd "$TURF_BUILD_DIR"
zip -r "Turf.xcframework.zip" "Turf.xcframework"
popd

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this something we'd want to make part of CI. Or leave it as is since the xcframework is a stop gap?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's leave it as-is since it's a stop gap solution. I included it for transparency so that anyone can see how the XCFramework was generated.

Copy link
Contributor

@1ec5 1ec5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The build setting change and limited platform support would normally be unmergeable. However, this PR targets a branch from which we’ll tag an alpha that’s specifically intended as a stopgap to unblock mapbox/mapbox-navigation-ios#2629 and mapbox/mapbox-navigation-ios#2794 for a prerelease. Once the map SDK migrates to source-based distribution, this branch and the corresponding one in mapbox-directions-swift will go away and we’ll continue to build as before.

It looks like the rest of the changes are consistent with running scripts/update-version.sh.


let package = Package(
name: "Turf",
platforms: [.iOS(.v10), .macOS(.v10_12)],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this binary being built for macOS? If not, remove that item from the array to make incompatibility clearer to anyone who accidentally ends up with this prerelease.

Turf and MapboxDirections both support macOS, tvOS, watchOS, and Linux in addition to iOS. Normally we would not be able to regress support for these platforms, but we’ll do so for this alpha only.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The binary was built for iOS and macOS.

@1ec5
Copy link
Contributor

1ec5 commented Feb 9, 2021

FYI, Linux builds are failing because they’re still on Swift 5, whereas this PR now requires Swift 5.3:

$ swift build

/home/travis/build/mapbox/turf-swift: error: package at '/home/travis/build/mapbox/turf-swift' is using Swift tools version 5.3.0 but the installed version is 5.0.0

The command "swift build" exited with 1.

Feel free to address that issue if you’re familiar with Travis configuration, but otherwise you can merge without getting those builds to pass, since this PR would break support for Linux anyways.

@macdrevx macdrevx merged commit d347d36 into library-evolution-enabled Feb 9, 2021
@macdrevx macdrevx deleted the ah/alpha.2 branch February 9, 2021 22:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants