Add otherModuleProvider to ConfigurableEvaluatorContext
So that it can make decisisons based on a provider set by the base config mutator. Bug: 361816274 Test: m nothing Change-Id: I19e8a9e800dfabcd05740f9c0ed5db833c5b2377
This commit is contained in:
@@ -101,6 +101,7 @@ func InitDefaultableModule(module DefaultableModule) {
|
|||||||
// A restricted subset of context methods, similar to LoadHookContext.
|
// A restricted subset of context methods, similar to LoadHookContext.
|
||||||
type DefaultableHookContext interface {
|
type DefaultableHookContext interface {
|
||||||
EarlyModuleContext
|
EarlyModuleContext
|
||||||
|
OtherModuleProviderContext
|
||||||
|
|
||||||
CreateModule(ModuleFactory, ...interface{}) Module
|
CreateModule(ModuleFactory, ...interface{}) Module
|
||||||
AddMissingDependencies(missingDeps []string)
|
AddMissingDependencies(missingDeps []string)
|
||||||
|
@@ -2213,6 +2213,7 @@ func (m *ModuleBase) IsNativeBridgeSupported() bool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type ConfigurableEvaluatorContext interface {
|
type ConfigurableEvaluatorContext interface {
|
||||||
|
OtherModuleProviderContext
|
||||||
Config() Config
|
Config() Config
|
||||||
OtherModulePropertyErrorf(module Module, property string, fmt string, args ...interface{})
|
OtherModulePropertyErrorf(module Module, property string, fmt string, args ...interface{})
|
||||||
HasMutatorFinished(mutatorName string) bool
|
HasMutatorFinished(mutatorName string) bool
|
||||||
|
@@ -91,6 +91,7 @@ func GlobFiles(ctx EarlyModulePathContext, globPattern string, excludes []string
|
|||||||
// the Path methods that rely on module dependencies having been resolved.
|
// the Path methods that rely on module dependencies having been resolved.
|
||||||
type ModuleWithDepsPathContext interface {
|
type ModuleWithDepsPathContext interface {
|
||||||
EarlyModulePathContext
|
EarlyModulePathContext
|
||||||
|
OtherModuleProviderContext
|
||||||
VisitDirectDepsBlueprint(visit func(blueprint.Module))
|
VisitDirectDepsBlueprint(visit func(blueprint.Module))
|
||||||
OtherModuleDependencyTag(m blueprint.Module) blueprint.DependencyTag
|
OtherModuleDependencyTag(m blueprint.Module) blueprint.DependencyTag
|
||||||
HasMutatorFinished(mutatorName string) bool
|
HasMutatorFinished(mutatorName string) bool
|
||||||
|
@@ -1330,6 +1330,10 @@ func (ctx *panickingConfigAndErrorContext) HasMutatorFinished(mutatorName string
|
|||||||
return ctx.ctx.HasMutatorFinished(mutatorName)
|
return ctx.ctx.HasMutatorFinished(mutatorName)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (ctx *panickingConfigAndErrorContext) otherModuleProvider(m blueprint.Module, p blueprint.AnyProviderKey) (any, bool) {
|
||||||
|
return ctx.ctx.otherModuleProvider(m, p)
|
||||||
|
}
|
||||||
|
|
||||||
func PanickingConfigAndErrorContext(ctx *TestContext) ConfigurableEvaluatorContext {
|
func PanickingConfigAndErrorContext(ctx *TestContext) ConfigurableEvaluatorContext {
|
||||||
return &panickingConfigAndErrorContext{
|
return &panickingConfigAndErrorContext{
|
||||||
ctx: ctx,
|
ctx: ctx,
|
||||||
|
Reference in New Issue
Block a user