Don't panic for unhandled product vars
Instead, we return an error. This allows us to access some product variable information earlier when it will not be used as an attribute without panicing Test: m nothing Change-Id: Id094b2b9e1364a8d174d99b3824fa149fb235b3e
This commit is contained in:
@@ -1458,7 +1458,10 @@ func addCompatibilityConstraintForCompileMultilib(ctx *topDownMutatorContext, en
|
||||
// Returns a list of the constraint_value targets who enable this override.
|
||||
func productVariableConfigEnableAttribute(ctx *topDownMutatorContext) bazel.LabelListAttribute {
|
||||
result := bazel.LabelListAttribute{}
|
||||
productVariableProps := ProductVariableProperties(ctx, ctx.Module())
|
||||
productVariableProps, errs := ProductVariableProperties(ctx, ctx.Module())
|
||||
for _, err := range errs {
|
||||
ctx.ModuleErrorf("ProductVariableProperties error: %s", err)
|
||||
}
|
||||
if productConfigProps, exists := productVariableProps["Enabled"]; exists {
|
||||
for productConfigProp, prop := range productConfigProps {
|
||||
flag, ok := prop.(*bool)
|
||||
|
Reference in New Issue
Block a user