Published Sep 3, 2019

SE-Radio-Episode-231:-Joshua-Suereth-and-Matthew-Farwell-on-SBT-and-Software-Builds

Explore the evolution and distinct functionalities of SBT, a Scala build tool, as Joshua Suereth and Matthew Farwell delve into its unique features, compare it with Gradle and Maven, and discuss strategies for adapting build systems to suit modern software development and microservices architectures.
Episode Highlights
Software Engineering Radio - the podcast for professional software developers logo

Popular Clips

Episode Highlights

  • Task Management

    SBT's task management system is a sophisticated mechanism that relies heavily on settings and definitions. explains that settings in SBT are dynamic and can be rerun, tracking their dependencies to ensure accurate task execution. This is akin to Excel, where changing a cell value updates dependent cells automatically 1. Definitions, on the other hand, are static and serve as foundational elements within the build state, allowing for the creation of new items and values 2. Suereth notes, "In Excel, if I change the value of a cell, the other cells that depend on it are updated automatically. This is the same case with SBT."

    In Excel, if I change the value of a cell, the other cells that depend on it are updated automatically. This is the same case with SBT.

    ---

    This dynamic nature of settings allows developers to experiment with different configurations without disrupting the build process.

       

    Parallel Execution

    SBT's ability to execute tasks in parallel is a standout feature that enhances build efficiency. By meticulously tracking task dependencies, SBT enables the computation of task graphs in parallel, a process that likens to the parallelism in makefiles 3. This approach requires tasks to return files they modify, ensuring immutability and preventing errors in parallel execution. Suereth highlights the importance of this feature, stating, "If your data is immutable, it's really easy to parallelize."

    If your data is immutable, it's really easy to parallelize.

    ---

    Additionally, SBT offers flexibility in redefining tasks, allowing developers to customize build processes to suit their specific needs. This flexibility is contrasted with Maven's stricter conventions, making SBT a preferred choice for projects requiring custom build configurations 4.

Related Episodes