This function checks if it is called from init() by looking into
callers. By the way, it may fail when init() is inlined.
To fix this, CallersFrames() is used to translate PCs into symbolic
information accounting for inlined functions.
Test: go test ./...
Change-Id: I18b3c3ffdaf71f775e3522c87607aec5df7b09c5
go 1.12 changed the stack trace of a function call during global
variable initialization to contain a function called
"PKG.init.ializers". Fix callerName to split the package path
and function name on the first "." after the last "/", and look
for functions called "init.ializers" or functions with the
prefix "init."
Change-Id: Ic2190837a8c4cde075f727bd69dd18d517a0ebc0
Allow Blueprint build statements and rules to reference rules and pools
defined outside of Blueprint.
Change-Id: I48644497d16a4c2bab88db400dbe7f7fe169d933
Turn PackageContext into an interface so that build systems can wrap it
to add more custom helpers.
This does introduce an API change, though it should be fairly simple.
NewPackageContext used to provide an opaque *PackageContext struct, now it
provides a PackageContext interface.
Change-Id: I383c64a303d857ef5e0dec86ad77f791ba4c9639
Make integrating with go tools easier by putting the blueprint package
files in the top level directory of the git project instead of in a
subdirectory called blueprint.
Change-Id: I35c144c5fe7ddf34e478d0c47c50b2f6c92c2a03