Break constant information out of product vars

We don't want rules to load the product variables directly, because
then they won't be able to transition on them.

Break constant information that is safe to load outside of the
product vars file, so that we can make the product vars file have
more restricted visibility later.

Bug: 269577299
Test: m nothing
Change-Id: I848bff33e4f5798f51296ea3a2600615cab36985
This commit is contained in:
Cole Faust
2023-04-11 13:48:17 -07:00
parent 33a25c1a0d
commit eb644cfb34
4 changed files with 41 additions and 1 deletions

View File

@@ -35,7 +35,11 @@ func Indention(level int) string {
// PrintBool returns a Starlark compatible bool string.
func PrintBool(item bool) string {
return strings.Title(fmt.Sprintf("%t", item))
if item {
return "True"
} else {
return "False"
}
}
// PrintsStringList returns a Starlark-compatible string of a list of Strings/Labels.