Save 37% off PRO during our Black Friday Sale! »

Scaling CocoaPods

Scaling CocoaPods

A lightning talk given at Square's OSCON party

4d6be90af74894fd132fb06dacec04d7?s=128

Samuel E. Giddins

July 18, 2018
Tweet

Transcript

  1. Scaling CocoaPods Samuel Giddins Scaling CocoaPods @ Square 1

  2. Samuel Giddins Mobile Developer Experience @ Square CocoaPods Core Contributor

    Scaling CocoaPods @ Square 2
  3. Mobile Developer Experience Scaling CocoaPods @ Square 3

  4. Mobile Developer Experience ➡ Owns the build system, dependency manager,

    interface with CI Scaling CocoaPods @ Square 3
  5. Mobile Developer Experience ➡ Owns the build system, dependency manager,

    interface with CI ➡ Maintains the (open source) tools used to build the app Scaling CocoaPods @ Square 3
  6. Mobile Developer Experience ➡ Owns the build system, dependency manager,

    interface with CI ➡ Maintains the (open source) tools used to build the app ➡ Keeps developers as productive as possible Scaling CocoaPods @ Square 3
  7. Mobile Developer Experience ➡ Owns the build system, dependency manager,

    interface with CI ➡ Maintains the (open source) tools used to build the app ➡ Keeps developers as productive as possible ➡ Cross platform: iOS & Android Scaling CocoaPods @ Square 3
  8. Mobile Developer Experience ➡ Owns the build system, dependency manager,

    interface with CI ➡ Maintains the (open source) tools used to build the app ➡ Keeps developers as productive as possible ➡ Cross platform: iOS & Android ➡ Develops CocoaPods features Scaling CocoaPods @ Square 3
  9. CocoaPods @ Square Scaling CocoaPods @ Square 4

  10. CocoaPods @ Square ➡ 265 total pods Scaling CocoaPods @

    Square 4
  11. CocoaPods @ Square ➡ 265 total pods ➡Pods directory is

    1005 MB Scaling CocoaPods @ Square 4
  12. CocoaPods @ Square ➡ 265 total pods ➡Pods directory is

    1005 MB ➡Over 10,000 source files Scaling CocoaPods @ Square 4
  13. CocoaPods @ Square ➡ 265 total pods ➡Pods directory is

    1005 MB ➡Over 10,000 source files ➡ Swift, Objective-C Scaling CocoaPods @ Square 4
  14. CocoaPods @ Square ➡ 265 total pods ➡Pods directory is

    1005 MB ➡Over 10,000 source files ➡ Swift, Objective-C ➡ Dynamic Frameworks, Static Libraries, Static Frameworks Scaling CocoaPods @ Square 4
  15. CocoaPods @ Square ➡ 265 total pods ➡Pods directory is

    1005 MB ➡Over 10,000 source files ➡ Swift, Objective-C ➡ Dynamic Frameworks, Static Libraries, Static Frameworks ➡ Monorepo & Multirepo Scaling CocoaPods @ Square 4
  16. CocoaPods @ Square is CocoaPods @ Scale Scaling CocoaPods @

    Square 5
  17. CocoaPods at home in a monorepo Generating a scratch workspace

    for a single pod $ pod gen Frameworks/SquareUIComponents --auto-open Describing tests in a podspec Pod::Spec.new do |s| s.test_spec 'Tests' do |ts| ts.source_files = 'Tests/**/*.{h,m}' end end Scaling CocoaPods @ Square 6
  18. Automation Removing the depending on the open-source specs repo $

    pod whitelist NAME VERSION Whitelists a (pod, version) tuple for internal Square use Automatically generating pre-built binary pods on CI $ pod bin NAME.podspec [ARTIFACT_REPO_URL] Converts the provided `NAME.podspec` into a binary version. The process includes, installing a sandbox, building the sandbox using release configuration for both device and simulator, packing the output and generate a new podspec that uses `ARTIFACT_REPO_URL` as the source. The generated podspec is also validated. Scaling CocoaPods @ Square 7
  19. CocoaPods Performance Scaling CocoaPods @ Square 8

  20. CocoaPods Performance ➡ Lots of profiling with rbspy Scaling CocoaPods

    @ Square 8
  21. CocoaPods Performance ➡ Lots of profiling with rbspy ➡ Resolver

    refactoring to make graph traversal not take forever Scaling CocoaPods @ Square 8
  22. CocoaPods Performance ➡ Lots of profiling with rbspy ➡ Resolver

    refactoring to make graph traversal not take forever ➡ Build setting generation rewrite to memoize everything Scaling CocoaPods @ Square 8
  23. Investment in Monitoring Scaling CocoaPods @ Square 9

  24. Investment in Monitoring ➡ chronometer to instrument method calls Scaling

    CocoaPods @ Square 9
  25. Investment in Monitoring ➡ chronometer to instrument method calls ➡

    Log durations to in-house logging system Scaling CocoaPods @ Square 9
  26. Investment in Monitoring ➡ chronometer to instrument method calls ➡

    Log durations to in-house logging system ➡ Roll up into dashboards visible to the entire organization Scaling CocoaPods @ Square 9
  27. Investment in Monitoring Scaling CocoaPods @ Square 10

  28. Ownership of our Destiny Scaling CocoaPods @ Square 11

  29. Ownership of our Destiny ➡ The team owns our use

    of CocoaPods, not any individual contributors Scaling CocoaPods @ Square 11
  30. Ownership of our Destiny ➡ The team owns our use

    of CocoaPods, not any individual contributors ➡ No forks, few hacks, no helplessness Scaling CocoaPods @ Square 11
  31. Ownership of our Destiny ➡ The team owns our use

    of CocoaPods, not any individual contributors ➡ No forks, few hacks, no helplessness ➡ Open Source sharing expertise with therest of the industry Scaling CocoaPods @ Square 11
  32. Continuous Re-Evaluation Scaling CocoaPods @ Square 12

  33. Continuous Re-Evaluation ➡ Even though we have core contributors, we're

    open to not using CocoaPods Scaling CocoaPods @ Square 12
  34. Continuous Re-Evaluation ➡ Even though we have core contributors, we're

    open to not using CocoaPods ➡ Taking as many lessons as possible from other tools, such as Buck and Bazel Scaling CocoaPods @ Square 12
  35. Continuous Re-Evaluation ➡ Even though we have core contributors, we're

    open to not using CocoaPods ➡ Taking as many lessons as possible from other tools, such as Buck and Bazel ➡ CocoaPods is a tool, tools are replaceable. Our expertise is forever. Scaling CocoaPods @ Square 12
  36. CocoaPods: Scaled? Scaling CocoaPods @ Square 13

  37. CocoaPods: Scaled? Scaling CocoaPods @ Square 14

  38. CocoaPods: Scaled? ➡ Last year's crisis of confidence is over

    Scaling CocoaPods @ Square 14
  39. CocoaPods: Scaled? ➡ Last year's crisis of confidence is over

    ➡ We've onboarded 2 new people to contribute to CocoaPods Scaling CocoaPods @ Square 14
  40. CocoaPods: Scaled? ➡ Last year's crisis of confidence is over

    ➡ We've onboarded 2 new people to contribute to CocoaPods ➡ Development has internal ownership (my team!) Scaling CocoaPods @ Square 14
  41. CocoaPods: Scaled? ➡ Last year's crisis of confidence is over

    ➡ We've onboarded 2 new people to contribute to CocoaPods ➡ Development has internal ownership (my team!) ➡ Performance has improved slightly, with a massive increase in: Scaling CocoaPods @ Square 14
  42. CocoaPods: Scaled? ➡ Last year's crisis of confidence is over

    ➡ We've onboarded 2 new people to contribute to CocoaPods ➡ Development has internal ownership (my team!) ➡ Performance has improved slightly, with a massive increase in: ➡features Scaling CocoaPods @ Square 14
  43. CocoaPods: Scaled? ➡ Last year's crisis of confidence is over

    ➡ We've onboarded 2 new people to contribute to CocoaPods ➡ Development has internal ownership (my team!) ➡ Performance has improved slightly, with a massive increase in: ➡features ➡# of modules Scaling CocoaPods @ Square 14
  44. CocoaPods: Scaled? ➡ Last year's crisis of confidence is over

    ➡ We've onboarded 2 new people to contribute to CocoaPods ➡ Development has internal ownership (my team!) ➡ Performance has improved slightly, with a massive increase in: ➡features ➡# of modules ➡amount of code managed by CocoaPods Scaling CocoaPods @ Square 14
  45. CocoaPods: Scaled @segiddins MDX @ Square Scaling CocoaPods @ Square

    15