From c9df6d796410c9ab8f05f0664362752ba2b5b55c Mon Sep 17 00:00:00 2001 From: Liz Kammer Date: Tue, 4 Apr 2023 11:56:55 -0400 Subject: [PATCH] Add a stronger wording to don't use ModuleFromName Test: n/a Change-Id: I42de1e46a50a103fca0d6f60a0748f5cc107bac7 --- module_ctx.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/module_ctx.go b/module_ctx.go index 841e5c4..a1388b4 100644 --- a/module_ctx.go +++ b/module_ctx.go @@ -300,6 +300,9 @@ type BaseModuleContext interface { // There are no guarantees about which variant of the module will be returned. // Prefer retrieving the module using GetDirectDep or a visit function, when possible, as // this will guarantee the appropriate module-variant dependency is returned. + // + // WARNING: This should _only_ be used within the context of bp2build, where variants and + // dependencies are not created. ModuleFromName(name string) (Module, bool) // OtherModuleDependencyVariantExists returns true if a module with the