queryview: prefix internal attribute names.
There's a module type in internal main that uses the module_deps
property, which clashes with QueryView's module_deps attribute. A fix is
to prefix the attribute as soong_module_deps to avoid the conflict.
While we're at this, rename the other internal attribute names to be
consistent as well.
Test: soong tests
Test: m queryview && bazel query //... --config=queryview
Fixes: 178351366
Change-Id: I84961c8f58c0c0fac1a1c2cbc6bc625499ac895e
diff --git a/bp2build/bzl_conversion.go b/bp2build/bzl_conversion.go
index 04c4542..f2f6b01 100644
--- a/bp2build/bzl_conversion.go
+++ b/bp2build/bzl_conversion.go
@@ -109,9 +109,9 @@
factoryName := runtime.FuncForPC(reflect.ValueOf(factory).Pointer()).Name()
pkg := strings.Split(factoryName, ".")[0]
attrs := `{
- "module_name": attr.string(mandatory = True),
- "module_variant": attr.string(),
- "module_deps": attr.label_list(providers = [SoongModuleInfo]),
+ "soong_module_name": attr.string(mandatory = True),
+ "soong_module_variant": attr.string(),
+ "soong_module_deps": attr.label_list(providers = [SoongModuleInfo]),
`
attrs += getAttributes(factory)
attrs += " },"