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:
parent
e66903065b
commit
c7ec117556
1 changed files with 8 additions and 6 deletions
14
context.go
14
context.go
|
@ -4955,16 +4955,17 @@ func funcName(f interface{}) string {
|
|||
|
||||
// json representation of a dependency
|
||||
type depJson struct {
|
||||
Name string `json:"name"`
|
||||
Variant string `json:"variant"`
|
||||
TagType string `json:"tag_type,omitempty"`
|
||||
Name string `json:"name"`
|
||||
Variant string `json:"variant"`
|
||||
TagType string `json:"tag_type"`
|
||||
TagData interface{} `json:"tag_data"`
|
||||
}
|
||||
|
||||
// json representation of a provider
|
||||
type providerJson struct {
|
||||
Type string `json:"type,omitempty"`
|
||||
Debug string `json:"debug,omitempty"` // from GetDebugString on the provider data
|
||||
Fields interface{} `json:"fields,omitempty"`
|
||||
Type string `json:"type"`
|
||||
Debug string `json:"debug"` // from GetDebugString on the provider data
|
||||
Fields interface{} `json:"fields"`
|
||||
}
|
||||
|
||||
// interface for getting debug info from various data.
|
||||
|
@ -5090,6 +5091,7 @@ func getModuleDebugJson(module *moduleInfo) []byte {
|
|||
t := reflect.TypeOf(dep.tag)
|
||||
if t != nil {
|
||||
result[i].TagType = t.PkgPath() + "." + t.Name()
|
||||
result[i].TagData = debugPropertyMap(reflect.ValueOf(dep.tag))
|
||||
}
|
||||
}
|
||||
return result
|
||||
|
|
Loading…
Reference in a new issue