Rename ConfigAndErrorContext to ConfigurableEvaluatorContext
I'm going to be adding some methods to this interface, give it
a name based on how it's going to be used, not based on what methods
it contains.
Bug: 323382414
Test: m nothing --no-skip-soong-tests
Change-Id: I9bba04ba756c4dbe00625e2d04af81e78a11cae9
diff --git a/android/androidmk.go b/android/androidmk.go
index fc628cb..98f8bb1 100644
--- a/android/androidmk.go
+++ b/android/androidmk.go
@@ -983,11 +983,11 @@
return nil
}
-func ShouldSkipAndroidMkProcessing(ctx ConfigAndErrorContext, module Module) bool {
+func ShouldSkipAndroidMkProcessing(ctx ConfigurableEvaluatorContext, module Module) bool {
return shouldSkipAndroidMkProcessing(ctx, module.base())
}
-func shouldSkipAndroidMkProcessing(ctx ConfigAndErrorContext, module *ModuleBase) bool {
+func shouldSkipAndroidMkProcessing(ctx ConfigurableEvaluatorContext, module *ModuleBase) bool {
if !module.commonProperties.NamespaceExportedToMake {
// TODO(jeffrygaston) do we want to validate that there are no modules being
// exported to Kati that depend on this module?
diff --git a/android/module.go b/android/module.go
index 009b0df..47fdc23 100644
--- a/android/module.go
+++ b/android/module.go
@@ -58,7 +58,7 @@
base() *ModuleBase
Disable()
- Enabled(ctx ConfigAndErrorContext) bool
+ Enabled(ctx ConfigurableEvaluatorContext) bool
Target() Target
MultiTargets() []Target
@@ -109,12 +109,12 @@
// Get information about the properties that can contain visibility rules.
visibilityProperties() []visibilityProperty
- RequiredModuleNames(ctx ConfigAndErrorContext) []string
+ RequiredModuleNames(ctx ConfigurableEvaluatorContext) []string
HostRequiredModuleNames() []string
TargetRequiredModuleNames() []string
- VintfFragmentModuleNames(ctx ConfigAndErrorContext) []string
+ VintfFragmentModuleNames(ctx ConfigurableEvaluatorContext) []string
- ConfigurableEvaluator(ctx ConfigAndErrorContext) proptools.ConfigurableEvaluator
+ ConfigurableEvaluator(ctx ConfigurableEvaluatorContext) proptools.ConfigurableEvaluator
}
// Qualified id for a module
@@ -1339,7 +1339,7 @@
return partition
}
-func (m *ModuleBase) Enabled(ctx ConfigAndErrorContext) bool {
+func (m *ModuleBase) Enabled(ctx ConfigurableEvaluatorContext) bool {
if m.commonProperties.ForcedDisabled {
return false
}
@@ -1536,7 +1536,7 @@
return m.base().commonProperties.ImageVariation == RecoveryVariation
}
-func (m *ModuleBase) RequiredModuleNames(ctx ConfigAndErrorContext) []string {
+func (m *ModuleBase) RequiredModuleNames(ctx ConfigurableEvaluatorContext) []string {
return m.base().commonProperties.Required.GetOrDefault(m.ConfigurableEvaluator(ctx), nil)
}
@@ -1548,7 +1548,7 @@
return m.base().commonProperties.Target_required
}
-func (m *ModuleBase) VintfFragmentModuleNames(ctx ConfigAndErrorContext) []string {
+func (m *ModuleBase) VintfFragmentModuleNames(ctx ConfigurableEvaluatorContext) []string {
return m.base().commonProperties.Vintf_fragment_modules.GetOrDefault(m.ConfigurableEvaluator(ctx), nil)
}
@@ -2204,17 +2204,17 @@
return proptools.Bool(m.commonProperties.Native_bridge_supported)
}
-type ConfigAndErrorContext interface {
+type ConfigurableEvaluatorContext interface {
Config() Config
OtherModulePropertyErrorf(module Module, property string, fmt string, args ...interface{})
}
type configurationEvalutor struct {
- ctx ConfigAndErrorContext
+ ctx ConfigurableEvaluatorContext
m Module
}
-func (m *ModuleBase) ConfigurableEvaluator(ctx ConfigAndErrorContext) proptools.ConfigurableEvaluator {
+func (m *ModuleBase) ConfigurableEvaluator(ctx ConfigurableEvaluatorContext) proptools.ConfigurableEvaluator {
return configurationEvalutor{
ctx: ctx,
m: m.module,
diff --git a/android/module_context.go b/android/module_context.go
index 3889e40..54fe0be 100644
--- a/android/module_context.go
+++ b/android/module_context.go
@@ -194,7 +194,7 @@
InstallInVendor() bool
InstallForceOS() (*OsType, *ArchType)
- RequiredModuleNames(ctx ConfigAndErrorContext) []string
+ RequiredModuleNames(ctx ConfigurableEvaluatorContext) []string
HostRequiredModuleNames() []string
TargetRequiredModuleNames() []string
@@ -855,7 +855,7 @@
return OptionalPath{}
}
-func (m *moduleContext) RequiredModuleNames(ctx ConfigAndErrorContext) []string {
+func (m *moduleContext) RequiredModuleNames(ctx ConfigurableEvaluatorContext) []string {
return m.module.RequiredModuleNames(ctx)
}
diff --git a/android/sdk.go b/android/sdk.go
index d3f04a4..fb1ac24 100644
--- a/android/sdk.go
+++ b/android/sdk.go
@@ -813,7 +813,7 @@
// SdkMemberContext provides access to information common to a specific member.
type SdkMemberContext interface {
- ConfigAndErrorContext
+ ConfigurableEvaluatorContext
// SdkModuleContext returns the module context of the sdk common os variant which is creating the
// snapshot.
diff --git a/android/testing.go b/android/testing.go
index 816707d..42cd1eb 100644
--- a/android/testing.go
+++ b/android/testing.go
@@ -1326,7 +1326,7 @@
return ctx.ctx.Config()
}
-func PanickingConfigAndErrorContext(ctx *TestContext) ConfigAndErrorContext {
+func PanickingConfigAndErrorContext(ctx *TestContext) ConfigurableEvaluatorContext {
return &panickingConfigAndErrorContext{
ctx: ctx,
}