The error messages when an error occurs in a template are really good!
E.g.:
ERROR at //build/config/android/internal_rules.gni:27:3: Assertion failed.
assert(false)
^-----
See //build/config/android/internal_rules.gni:1731:7: whence it was called.
android_lint("${_template_name}__lint") {
^----------------------------------------
However, when a top-level assert() fails in a .gni or .gn file, there are no breadcrumbs.
A common pattern is to use assert(!is_android) at the top of a BUILD.gn file or .gni file, and it's not obvious what caused the file to be included.
Comment 1 by bugdroid1@chromium.org
, Apr 22 2016