Implement OtherModulePropertyErrorf proxies
Also move EvaluateConfiguration() to a standalone configurationEvalutor
object, which can be constructed from a ModuleBase and a minimial
context. This allows us to evaluate configurable properties in
scenarios where we don't have much more than the module.
Bug: 323382414
Test: m nothing --no-skip-soong-tests
Change-Id: I2d1c9f42a469c399f34c759410509aeae095becb
diff --git a/android/singleton.go b/android/singleton.go
index 5f93996..76df1eb 100644
--- a/android/singleton.go
+++ b/android/singleton.go
@@ -87,6 +87,9 @@
// builder whenever a file matching the pattern as added or removed, without rerunning if a
// file that does not match the pattern is added to a searched directory.
GlobWithDeps(pattern string, excludes []string) ([]string, error)
+
+ // OtherModulePropertyErrorf reports an error on the line number of the given property of the given module
+ OtherModulePropertyErrorf(module Module, property string, format string, args ...interface{})
}
type singletonAdaptor struct {
@@ -279,3 +282,7 @@
func (s *singletonContextAdaptor) moduleProvider(module blueprint.Module, provider blueprint.AnyProviderKey) (any, bool) {
return s.SingletonContext.ModuleProvider(module, provider)
}
+
+func (s *singletonContextAdaptor) OtherModulePropertyErrorf(module Module, property string, format string, args ...interface{}) {
+ s.blueprintSingletonContext().OtherModulePropertyErrorf(module, property, format, args)
+}