Validation actions are a Bazel feature designed to double-check build inputs and outputs for correctness, e.g., by applying static analysis. Bazel goes to great lengths to minimize overhead for validation actions and keeping them off the critical build path by letting validations run until the very end of a build, including in parallel with tests (i.e., after the ""normal"" build has finished). In this talk we go deeply into Bazel's building blocks to review how we pulled that off over the last 5 years: from output groups, to aspects, to Bazel's build event protocol. To illustrate their benefits, we'll show details on how validation actions help run Android Lint when building Google's Android apps. We'll also discuss some best practices and ideas for further improvement of validation actions.
Speakers: Kevin Bierhoff, Alex Humesky