Spotify

Switching Build Systems, Seamlessly

Oct 1, 2023Patrick Balestra, Staff Engineer
Switching Build Systems, Seamlessly
SummaryAI, from the source post

This post details the technical challenges and solutions involved in migrating Spotify's iOS application from the Xcode build system to Bazel. It covers the motivation for adopting Bazel (faster builds, improved developer productivity), the strategy for a seamless migration (side-by-side operation, custom Ruby DSL for project declarations, automated BUILD.bazel file generation), the impact on build times (reduction from ~80 minutes to ~20 minutes for CI feedback loop), the cost of maintaining dual systems, the integration with Xcode via rules_xcodeproj for local development, and the rigorous process for releasing with Bazel, including side-by-side build comparisons and phased rollouts. It highlights the use of Bazel's remote cache and remote execution (RBE) and tools like BuildBuddy for insights and optimization.

More from the Build System Migration trail