Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Delete old iOS, macOS codebases; clean up CMake configuration #16228

Merged
merged 5 commits into from
Feb 28, 2020

Conversation

1ec5
Copy link
Contributor

@1ec5 1ec5 commented Feb 25, 2020

A little housekeeping:

  • Deleted implementation files, headers, resources, and scripts specific to the iOS and macOS map SDKs, which are now maintained in gl-native-ios.
  • Updated readmes to point to the gl-native-ios repository.
  • Synchronized the iOS and macOS CMake configurations, both of which had omissions and duplicate entries.
  • The macOS CMake configuration listed a bunch of SDK-specific source files that should never have been part of the CMake build system. (The macOS map SDK is built from a checked-in Xcode project.) These extraneous references were dead code that produced over a hundred pedantic warnings due to a difference in C++ and Objective-C coding standards. For example:
    /path/to/mapbox-gl-native-ios/vendor/mapbox-gl-native/platform/darwin/src/NSExpression+MGLAdditions.mm:101:68: Unused parameter 'attributedExpressions'
    

/cc @mapbox/maps-ios @tmpsantos

@1ec5 1ec5 added iOS Mapbox Maps SDK for iOS build macOS Mapbox Maps SDK for macOS labels Feb 25, 2020
@1ec5 1ec5 self-assigned this Feb 25, 2020
@1ec5
Copy link
Contributor Author

1ec5 commented Feb 25, 2020

As a side benefit, the baselines build is showing that the size of mbgl-glfw, mbgl-offline, and mbgl-render has gone down by 12%, 23%, and 12%, respectively.

diff --git a/metrics/binary-size/macos-xcode11/metrics.json b/metrics/binary-size/macos-xcode11/metrics.json
index 7bd94ba99..3c7bafd20 100644
--- a/metrics/binary-size/macos-xcode11/metrics.json
+++ b/metrics/binary-size/macos-xcode11/metrics.json
@@ -3,17 +3,17 @@
         [
             "mbgl-glfw",
             "/tmp/attach/install/macos-xcode11-release/bin/mbgl-glfw",
-            5677792
+            4989624
         ],
         [
             "mbgl-offline",
             "/tmp/attach/install/macos-xcode11-release/bin/mbgl-offline",
-            5542252
+            4290368
         ],
         [
             "mbgl-render",
             "/tmp/attach/install/macos-xcode11-release/bin/mbgl-render",
-            5588368
+            4904264
         ]
     ]
 }
\ No newline at end of file

@chloekraw
Copy link
Contributor

Nice, thanks @1ec5!

Copy link
Contributor

@tmpsantos tmpsantos left a comment

Choose a reason for hiding this comment

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

@1ec5 thank you for this. Is it also possible to apply the patch generated by the baseline bot and also remove the files?

@1ec5 1ec5 force-pushed the 1ec5-cmake-darwin-cleanup branch 2 times, most recently from b3b8db9 to aa8e7d6 Compare February 27, 2020 22:30
@1ec5
Copy link
Contributor Author

1ec5 commented Feb 27, 2020

I’ve deleted all the dead code I could find, along with unused resources and scripts.

In the course of performing refactors, @mapbox/gl-native has been editing the abandoned iOS/macOS map SDK codebase that this PR is deleting. Not all of these changes have made their way to the gl-native-ios repository. I tried my best to port over these changes in mapbox/mapbox-gl-native-ios#181, with the caveat that I’ve only upgraded to v1.2.0 so far. Any changes since then, like #16238, still need to be ported when we upgrade again. If you’ve made any changes that weren’t in response to a compiler error or test failure, please double-check that mapbox/mapbox-gl-native-ios#181 contains your changes. Thanks!

For historical reasons, developers may come here when looking for the Mapbox Maps SDK. Direct them to the right repository so they don’t get confused thinking Mapbox only provides a C++ library.
@1ec5 1ec5 changed the title Clean up iOS, macOS CMake configuration Delete old iOS, macOS codebases; clean up CMake configuration Feb 27, 2020
@1ec5 1ec5 merged commit 8229bd1 into master Feb 28, 2020
@1ec5 1ec5 deleted the 1ec5-cmake-darwin-cleanup branch February 28, 2020 01:14
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
build iOS Mapbox Maps SDK for iOS macOS Mapbox Maps SDK for macOS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants