DescriptionGN: Print the import trail when parse errors occur.
This is especially useful when asserts fail when the file should not be
included in the first place.
Example error message:
ERROR at //build/config/android/internal_rules.gni:11:1: Assertion failed.
assert(false)
^-----
See //build/config/android/rules.gni:7:1: whence it was imported.
import("//build/config/android/internal_rules.gni")
^-------------------------------------------------
See //media/midi/BUILD.gn:13:3: whence it was imported.
import("//build/config/android/rules.gni")
^----------------------------------------
See //BUILD.gn:193:7: which caused the package to be included.
"//media/midi:midi_unittests",
^----------------------------
BUG=604972
Committed: https://crrev.com/dbecf02976975b93db37c3b5e3aa26d6fc92c517
Cr-Commit-Position: refs/heads/master@{#388986}
Patch Set 1 #
Total comments: 4
Patch Set 2 : Add null origin check #
Total comments: 4
Patch Set 3 : move is_null() to header #
Messages
Total messages: 19 (8 generated)
|