Fix scoping logic to respect the caller's package.

This change makes the ModuleContext and SingletonContext methods respect the
caller's Go package when performing name lookups.  It does this by re-parenting
the module or singleton's scope to the scope of the caller's package, thus
allowing a Module or Singleton to pass its context to a function defined in
another Go package and have the called function access variables and rules
defined in its own Go package.

Change-Id: Ifdec87ba3095a453b36fb00e38c0bb3a928a2b9b
4 files changed
tree: 865052e9243da2bdb87fe6bc0073590d8abc53b7
  1. blueprint/
  2. Blueprints
  3. bootstrap.bash
  4. build.ninja.in