Make required a configurable property
So that users can use select statements with it. Fixes: 347605145 Bug: 342006386 Test: m nothing --no-skip-soong-tests Change-Id: Ica0ca6d1725b000b3748c0293e5a9f9b38ed87f9
This commit is contained in:
@@ -824,11 +824,16 @@ func (s *listVariable) printfIntoPropertyRecursive(fieldName []string, propStruc
|
||||
}
|
||||
field.Set(newField)
|
||||
case reflect.Struct:
|
||||
fieldName = append(fieldName, propStruct.Type().Field(i).Name)
|
||||
if err := s.printfIntoPropertyRecursive(fieldName, field, configValues); err != nil {
|
||||
return err
|
||||
if proptools.IsConfigurable(field.Type()) {
|
||||
fieldName = append(fieldName, propStruct.Type().Field(i).Name)
|
||||
return fmt.Errorf("soong_config_variables.%s.%s: list variables are not supported on configurable properties", s.variable, strings.Join(fieldName, "."))
|
||||
} else {
|
||||
fieldName = append(fieldName, propStruct.Type().Field(i).Name)
|
||||
if err := s.printfIntoPropertyRecursive(fieldName, field, configValues); err != nil {
|
||||
return err
|
||||
}
|
||||
fieldName = fieldName[:len(fieldName)-1]
|
||||
}
|
||||
fieldName = fieldName[:len(fieldName)-1]
|
||||
default:
|
||||
fieldName = append(fieldName, propStruct.Type().Field(i).Name)
|
||||
return fmt.Errorf("soong_config_variables.%s.%s: unsupported property type %q", s.variable, strings.Join(fieldName, "."), kind)
|
||||
|
Reference in New Issue
Block a user