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

Building Large Angular Applications with Bazel - Angular Toronto

Building Large Angular Applications with Bazel - Angular Toronto

Introduction to building Angular applications with Bazel, and how it's improved our workflow and development experience at Evertz Microsystems

Matt Mackay

February 10, 2020
Tweet

Other Decks in Programming

Transcript

  1. No way to easily test changes across the entire stack

    Required tools vary between projects, onboarding and setup time is high Dependencies between parts of the codebase are completely unknown Round trip times are too high, feedback to developer is not quick enough
  2. Incremental - Rebuild time is proportional to what you changed

    Deterministic - Can cache build results based on their inputs Hermetic - Enabling remote execution, more aggressive parallelization Composable - Bazel plugins are like Unix pipes, output of one is the input to another Universal - Not just for Angular. Builds backends, other frontend libraries, Android... {Fast, Correct} - Choose two
  3. playout graphics Devserver (Go) graphing users ... timeline editor ...

    ... ... ... form ... ... form.component.ts form.module.ts form.component.html
  4. ├── graphics │ ├── BUILD │ ├── _graphics.theme.scss │ ├──

    editor │ │ ├── BUILD │ │ ├── _editor.theme.scss │ │ ├── editor.component.html │ │ ├── editor.component.scss │ │ ├── editor.component.spec.ts │ │ ├── editor.component.ts │ │ └── editor.module.ts │ ├── form │ │ ├── BUILD │ │ ├── form.component.html │ │ ├── form.component.scss │ │ ├── form.component.spec.ts │ │ ├── form.component.ts │ │ └── form.module.ts
  5. Remote caching allows build and test results to be shared

    across clients Remote execution allows build and test actions to be fanned out across remote CPUs
  6. Dependencies between parts of the codebase are completely unknown Bazel

    query can show how parts of the codebase are connected Round trip times are too high, feedback to developer is not quick enough Only rebuild and tests the parts of the codebase that has changed
  7. Required tools vary between projects, onboarding and setup time is

    high Bazel can handle many different languages and fetch required dependencies Bazel downloads required tools (NodeJS, npm etc)
  8. Those bazel builds are really making a difference on the

    build times - where the majority of the tests have already been performed. It’s like 1-2 mins tops Freaking yeah David Taylor, Mediator UI Technical Lead, Evertz Microsystems
  9. Getting started with Bazel and Angular https://angular.io/guide/bazel Bazel documentation https://bazel.build

    rules_nodejs https://github.com/bazelbuild/rules_nodejs bzlgen - generating BUILD files for Angular, Typescript and more https://github.com/evertz/bzlgen Bazel migration patterns https://youtu.be/UwuRGpVpmbo Thank you