Add EarlyModuleContext for LoadHookContext

Make LoadHookContext embed a new EarlyModuleContext instead of
BaseModuleContext to reduce its API surface in preparation for
moving it to run during parsing instead of mutators.

Test: m checkbuild
Change-Id: I1cd3ff3b636e7e24991a9184d7521903473e505a
This commit is contained in:
Colin Cross
2019-12-30 18:43:07 -08:00
parent c481607536
commit 1184b647d5
7 changed files with 199 additions and 130 deletions

View File

@@ -26,8 +26,8 @@ import (
// before the module has been split into architecture variants, and before defaults modules have
// been applied.
type LoadHookContext interface {
// TODO: a new context that includes Config() but not Target(), etc.?
BaseModuleContext
EarlyModuleContext
AppendProperties(...interface{})
PrependProperties(...interface{})
CreateModule(ModuleFactory, ...interface{}) Module