Make all Nameless modules have unique names
Nameless modules still have to have unique names to avoid collisions
when sorting by name. Give them all pointer suffixes, and rename
NamelessModule to NamespacelessModule
Fixes: 235475711
Test: soong_config_modules_test.go
Change-Id: Ib2d34e8bcbb4f988bf00c1012511494f54d9a53e
diff --git a/android/namespace.go b/android/namespace.go
index fc7bc29..a3ff761 100644
--- a/android/namespace.go
+++ b/android/namespace.go
@@ -166,10 +166,10 @@
return namespace
}
-// A NamelessModule can never be looked up by name. It must still implement Name(), but the return
-// value doesn't have to be unique.
-type NamelessModule interface {
- Nameless()
+// A NamespacelessModule can never be looked up by name. It must still implement Name(), and the name
+// still has to be unique.
+type NamespacelessModule interface {
+ Namespaceless()
}
func (r *NameResolver) NewModule(ctx blueprint.NamespaceContext, moduleGroup blueprint.ModuleGroup, module blueprint.Module) (namespace blueprint.Namespace, errs []error) {
@@ -183,7 +183,7 @@
return nil, nil
}
- if _, ok := module.(NamelessModule); ok {
+ if _, ok := module.(NamespacelessModule); ok {
return nil, nil
}