Add tag data to soong-debug-info.json.

It's not super useful because of Go's stupid restriction on not letting
you reflect private fields.

Test: m nothing
Change-Id: I1f73f06f5e64eaf4adce58a667b98b131aede53f
This commit is contained in:
Joe Onorato 2024-02-09 16:26:16 -08:00
parent e66903065b
commit c7ec117556

View file

@ -4955,16 +4955,17 @@ func funcName(f interface{}) string {
// json representation of a dependency // json representation of a dependency
type depJson struct { type depJson struct {
Name string `json:"name"` Name string `json:"name"`
Variant string `json:"variant"` Variant string `json:"variant"`
TagType string `json:"tag_type,omitempty"` TagType string `json:"tag_type"`
TagData interface{} `json:"tag_data"`
} }
// json representation of a provider // json representation of a provider
type providerJson struct { type providerJson struct {
Type string `json:"type,omitempty"` Type string `json:"type"`
Debug string `json:"debug,omitempty"` // from GetDebugString on the provider data Debug string `json:"debug"` // from GetDebugString on the provider data
Fields interface{} `json:"fields,omitempty"` Fields interface{} `json:"fields"`
} }
// interface for getting debug info from various data. // interface for getting debug info from various data.
@ -5090,6 +5091,7 @@ func getModuleDebugJson(module *moduleInfo) []byte {
t := reflect.TypeOf(dep.tag) t := reflect.TypeOf(dep.tag)
if t != nil { if t != nil {
result[i].TagType = t.PkgPath() + "." + t.Name() result[i].TagType = t.PkgPath() + "." + t.Name()
result[i].TagData = debugPropertyMap(reflect.ValueOf(dep.tag))
} }
} }
return result return result