Successfully reported this slideshow.
Your SlideShare is downloading. ×

Buck outside Valley

Ad

Buck Build outside
Silicon Valley
Bruno Rocha - Software Engineer
+

Ad

Tons of developers
Several apps that share components
Giant codebases
Developers work in very localized squads
(localized ...

Ad

iFood
1. 40+ Developers
2. Four apps that need to share components
3. Developers work in very specialized squads
4. Most p...

Ad

Ad

Ad

Ad

Ad

Ad

Ad

Ad

Ad

Ad

Ad

Ad

Ad

Ad

Ad

Ad

Ad

Ad

Ad

Ad

Ad

Ad

Ad

Ad

Ad

Ad

Ad

Ad

Ad

Ad

Ad

Ad

Ad

Ad

Ad

Ad

Check these out next

1 of 39 Ad
1 of 39 Ad
Advertisement

More Related Content

Advertisement

Buck outside Valley

  1. 1. Buck Build outside Silicon Valley Bruno Rocha - Software Engineer +
  2. 2. 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
  3. 3. 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
  4. 4. .pbxproj con fl icts
  5. 5. Maintaining modules is hard
  6. 6. Huge build times
  7. 7. No project con fl icts 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
  8. 8. Monorepo Build Systems
  9. 9. Bazel Build Buck Build Monorepo Build Systems
  10. 10. App App Splash Checkout Pro fi le Login Architecture Client Keychain … More modules = less builds!
  11. 11. Multirepos vs Monorepos App A Repo 1 App B Library C Repo 2 Repo 3 App A Repo 1 App B Library C
  12. 12. 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
  13. 13. Builds Library C, then App A Builds App B only //MyApps:AppA Projects A/B //MyApps:AppB //MyLibs:LibraryC
  14. 14. Buck Caches (Rulekeys) //MyLibs:LibraryC Hash of dependencies Compiler fl ags Compiler version Buck version Source contents 3fb80a353db183675fd561b284bc5085
  15. 15. 💻 🤖 💻 💻 🤖 🤖 CI Builds PR 1 PR 2 PR 3 30 minutes 30 minutes 30 minutes
  16. 16. 💻 🤖 💻 💻 🤖 🤖 CI Builds PR 1 PR 2 PR 3 30 minutes 5 minutes 3 minutes Cache Cache
  17. 17. 💻 💻 💻 🖥 Network Cache Upload Cache Download Remote Cache
  18. 18. Creating iOS Apps with Buck Defining rules and using the build system
  19. 19. .buckcon fi g
  20. 20. Buck Rules (Libraries & Tests)
  21. 21. Building Libraries //Libraries/uUserData:UserData {root}{BUCK fi le path}{Rule name}
  22. 22. Build Trace buck-out/logs/build.trace
  23. 23. Testing Libraries
  24. 24. App A Library B Library A Library D Library C Saving time while testing iFood with Xcode: All PRs tested all modules
  25. 25. App A Library B Library A Library D Library C iFood with Buck: PRs only test the affected graph Saving time while testing
  26. 26. Buck Rules (iOS Apps)
  27. 27. Building iOS Apps buck install {rule} -r
  28. 28. Visual Studio Code + SourceKit-LSP + CodeLLDB
  29. 29. Xcode Project Generation
  30. 30. iFood’s Build/Test CI Evolution Xcode: ~32 minutes Buck + Cache: ~21 minutes Buck + Cache + Only Test Graph: ~9 minutes
  31. 31. iFood’s .pbxproj Con fl icts Evolution Xcode: All the time Buck: None at all
  32. 32. iFood’s Modularization Evolution Xcode: Create a podspec
 Create an example project
 Create the fi les
 Add it to the pod fi le
 Make our CI run the example’s tests
 Hope changes won’t break the spec Buck: Just create a folder!
  33. 33. airbnb/BuckSample
  34. 34. 😱 Buck Slack
  35. 35. #VemProiFood + swiftrocks.com @rockthebruno Obrigado!

×