Upgrade to Pro — share decks privately, control downloads, hide ads and more …

BuckOutsideValley.pdf

Bruno Rocha
November 09, 2019
97

 BuckOutsideValley.pdf

Bruno Rocha

November 09, 2019
Tweet

Transcript

  1. Tons of developers Several apps that share components Giant codebases

    Developers work in very localized squads (localized changes) Valley Companies Ability to create 
 internal helper tools
  2. iFood 1. 40+ Developers 2. Four apps that need to

    share components 3. Developers work in very specialized squads 4. Most pull requests are very localized
  3. No project conflicts Automatic management of modules Easy way to

    share components
 between projects Build only what was changed, both locally and in the CI All apps in one repo Valley Companies
  4. App A Project A App B Project B Library C

    Library C Builds Library C, then App A
  5. App A Project A App B Project B Library C

    Library C Builds Library C, then App A Builds Library C again, then App B
  6. Builds Library C, then App A Builds App B only

    //MyApps:AppA Projects A/B //MyApps:AppB //MyLibs:LibraryC
  7. Buck Caches (Rulekeys) //MyLibs:LibraryC Hash of dependencies Compiler flags Compiler

    version Buck version Source contents 3fb80a353db183675fd561b284bc5085
  8. CI Builds PR 1 PR 2 PR 3 30 minutes

    30 minutes 30 minutes
  9. CI Builds PR 1 PR 2 PR 3 30 minutes

    5 minutes 3 minutes Cache Cache
  10. App A Library B Library A Library D Library C

    Saving time while testing iFood with Xcode: All PRs tested all modules
  11. App A Library B Library A Library D Library C

    iFood with Buck: PRs only test the affected graph Saving time while testing
  12. iFood’s Build/Test CI Evolution Xcode: ~32 minutes Buck + Cache:

    ~21 minutes Buck + Cache + Only Test Graph: ~9 minutes
  13. iFood’s Modularization Evolution Xcode: Create a podspec
 Create an example

    project
 Create the files
 Add it to the podfile
 Make our CI run the example’s tests
 Hope changes won’t break the spec Buck: Just create a folder!