---
title: "Build better software to build software better"
description: "Slack cut the 60-minute build pipeline for Quip and Slack Canvas's backend by applying classic software engineering principles (hermetic, idempotent, granular units of work and clean separation of concerns) before adopting Bazel."
url: "https://swe.quest/articles/build-better-software-to-build-software-better-5c6078f2e1d6c4da"
canonical: "https://slack.engineering/build-better-software-to-build-software-better/"
source: "Slack Engineering"
published: "2025-11-06"
difficulty: "medium"
kind: "Case study"
reading_minutes: 17
tags: ["build-systems","developer-productivity","ci-cd","refactoring","caching"]
---

# Build better software to build software better

A post on [Slack Engineering](https://swe.quest/sources/slack.md), published 2025-11-06, 17 min read, Case study. Original: [https://slack.engineering/build-better-software-to-build-software-better/](https://slack.engineering/build-better-software-to-build-software-better/)

## Summary

Slack cut the 60-minute build pipeline for Quip and Slack Canvas's backend by applying classic software engineering principles (hermetic, idempotent, granular units of work and clean separation of concerns) before adopting Bazel. A dependency edge from the built Python backend into the TypeScript frontend build zeroed the cache hit rate and cost about 35 minutes per build. The team untangled build code from application code, rewrote orchestration in Starlark, cut Python build scripts down to the standard library only, and used a Rust diffing tool to verify the new artifacts matched the old ones. The core lesson is that Bazel's caching and parallelism only pay off once the build graph is acyclic, well-defined and finely granular.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Build systems](https://swe.quest/tags/build-systems.md) (Engineering practices)
- [Developer productivity](https://swe.quest/tags/developer-productivity.md) (Engineering practices)
- [CI/CD](https://swe.quest/tags/ci-cd.md) (Reliability & operations)
- [Refactoring & migrations](https://swe.quest/tags/refactoring.md) (Engineering practices)
- [Caching](https://swe.quest/tags/caching.md) (Backend & APIs)

## Prerequisites

- build dependency graphs ([easy posts on Build systems](https://swe.quest/tags/build-systems.md?difficulty=easy))
- memoization and caching ([easy posts on Caching](https://swe.quest/tags/caching.md?difficulty=easy))
- basic Python ([easy posts on Python](https://swe.quest/tags/python.md?difficulty=easy))

## Keywords

Bazel, Starlark, Quip, Slack Canvas, TypeScript, webpack, Protobuf

## Related posts

- [Scaling Slack’s Mobile Codebases: Modularization](https://swe.quest/articles/scaling-slack-s-mobile-codebases-modularization-70662aadd976d6a5.md): Slack Engineering · 2022-03-28 · Medium · 11 min read · Mobile, Build systems, Refactoring & migrations, Developer productivity, Swift
  Slack split its monolithic iOS and Android app targets into owned Feature, Service and Library modules with strict linking rules, such as interface/implementation pairs on iOS, to cut build times, untangle dependencies and clarify code ownership.
- [Optimizing Our E2E Pipeline](https://swe.quest/articles/optimizing-our-e2e-pipeline-880da9c129e2726b.md): Slack Engineering · 2025-04-14 · Medium · 5 min read · CI/CD, Build systems, Testing, Developer productivity, Cost optimization
  Slack cut redundant frontend builds in its monorepo E2E pipeline by using \`git diff\` three-dot notation against \`main\` to detect whether a PR touches frontend code, and when it doesn't, serving a recent production frontend build from S3 through an internal CDN instead of rebuilding.
- [Mobile Developer Experience at Slack](https://swe.quest/articles/mobile-developer-experience-at-slack-f2b2b79d74a881fd.md): Slack Engineering · 2022-10-12 · Medium · 14 min read · Developer productivity, Mobile, CI/CD, Testing, Build systems
  A dedicated mobile Developer Experience team grew from 3 to 8 engineers and cut CI feedback time and failure rates by targeting the pain points that surveys, NPS and metrics like time to merge showed hurt developers most. iOS test time fell from about 50 minutes to an average of 9 by moving from Xcodebuild to Bazel with disk caching and bazel-diff, so only affected targets are tested.
- [Build faster with Buck2: Our open source build system](https://swe.quest/articles/build-faster-with-buck2-our-open-source-build-system-ede49d4bb9123548.md): Meta Engineering · 2023-04-06 · Medium · 7 min read · Build systems, Rust, Open source, Developer productivity
  Buck2 is Meta's from-scratch rewrite of Buck, open sourced with a Rust core and all language rules written in Starlark, and it completes builds about twice as fast as Buck1 internally.
- [Improving machine learning iteration speed with faster application build and packaging](https://swe.quest/articles/improving-machine-learning-iteration-speed-with-faster-application-build-and-76fe5935fe0be272.md): Meta Engineering · 2024-01-29 · Medium · 5 min read · Build systems, Developer productivity, ML platforms, Storage systems, Python
  Meta cut ML engineers' build and packaging overhead by double-digit percentages by tackling build non-determinism, pruning dependencies, and replacing monolithic XAR executables with an incremental Content Addressable Filesystem (CAF).

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
