Merge "Provide reason for unconverted bp2build modules"
This commit is contained in:
@@ -19,6 +19,7 @@ bootstrap_go_package {
|
|||||||
"soong-shared",
|
"soong-shared",
|
||||||
"soong-starlark",
|
"soong-starlark",
|
||||||
"soong-starlark-format",
|
"soong-starlark-format",
|
||||||
|
"soong-ui-bp2build_metrics_proto",
|
||||||
"soong-ui-metrics_proto",
|
"soong-ui-metrics_proto",
|
||||||
"soong-android-allowlists",
|
"soong-android-allowlists",
|
||||||
|
|
||||||
|
@@ -17,8 +17,10 @@ package android
|
|||||||
import (
|
import (
|
||||||
"bufio"
|
"bufio"
|
||||||
"errors"
|
"errors"
|
||||||
|
"fmt"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
"android/soong/ui/metrics/bp2build_metrics_proto"
|
||||||
"github.com/google/blueprint"
|
"github.com/google/blueprint"
|
||||||
"github.com/google/blueprint/proptools"
|
"github.com/google/blueprint/proptools"
|
||||||
|
|
||||||
@@ -73,6 +75,21 @@ type BazelConversionStatus struct {
|
|||||||
|
|
||||||
// MissingBp2buildDep stores the module names of direct dependency that were not found
|
// MissingBp2buildDep stores the module names of direct dependency that were not found
|
||||||
MissingDeps []string `blueprint:"mutated"`
|
MissingDeps []string `blueprint:"mutated"`
|
||||||
|
|
||||||
|
// If non-nil, indicates that the module could not be converted successfully
|
||||||
|
// with bp2build. This will describe the reason the module could not be converted.
|
||||||
|
UnconvertedReason *UnconvertedReason
|
||||||
|
}
|
||||||
|
|
||||||
|
// The reason a module could not be converted to a BUILD target via bp2build.
|
||||||
|
// This should match bp2build_metrics_proto.UnconvertedReason, but omits private
|
||||||
|
// proto-related fields that prevent copying this struct.
|
||||||
|
type UnconvertedReason struct {
|
||||||
|
// Should correspond to a valid value in bp2build_metrics_proto.UnconvertedReasonType.
|
||||||
|
// A raw int is used here instead, because blueprint logic requires that all transitive
|
||||||
|
// fields of module definitions be primitives.
|
||||||
|
ReasonType int
|
||||||
|
Detail string
|
||||||
}
|
}
|
||||||
|
|
||||||
type BazelModuleProperties struct {
|
type BazelModuleProperties struct {
|
||||||
@@ -137,6 +154,12 @@ type Bazelable interface {
|
|||||||
GetBazelLabel(ctx BazelConversionPathContext, module blueprint.Module) string
|
GetBazelLabel(ctx BazelConversionPathContext, module blueprint.Module) string
|
||||||
ShouldConvertWithBp2build(ctx BazelConversionContext) bool
|
ShouldConvertWithBp2build(ctx BazelConversionContext) bool
|
||||||
shouldConvertWithBp2build(ctx bazelOtherModuleContext, module blueprint.Module) bool
|
shouldConvertWithBp2build(ctx bazelOtherModuleContext, module blueprint.Module) bool
|
||||||
|
|
||||||
|
// ConvertWithBp2build either converts the module to a Bazel build target or
|
||||||
|
// declares the module as unconvertible (for logging and metrics).
|
||||||
|
// Modules must implement this function to be bp2build convertible. The function
|
||||||
|
// must either create at least one Bazel target module (using ctx.CreateBazelTargetModule or
|
||||||
|
// its related functions), or declare itself unconvertible using ctx.MarkBp2buildUnconvertible.
|
||||||
ConvertWithBp2build(ctx TopDownMutatorContext)
|
ConvertWithBp2build(ctx TopDownMutatorContext)
|
||||||
|
|
||||||
// namespacedVariableProps is a map from a soong config variable namespace
|
// namespacedVariableProps is a map from a soong config variable namespace
|
||||||
@@ -232,7 +255,7 @@ func (b *BazelModuleBase) GetBazelLabel(ctx BazelConversionPathContext, module b
|
|||||||
if b.ShouldConvertWithBp2build(ctx) {
|
if b.ShouldConvertWithBp2build(ctx) {
|
||||||
return bp2buildModuleLabel(ctx, module)
|
return bp2buildModuleLabel(ctx, module)
|
||||||
}
|
}
|
||||||
return "" // no label for unconverted module
|
panic(fmt.Errorf("requested non-existent label for module ", module.Name()))
|
||||||
}
|
}
|
||||||
|
|
||||||
type Bp2BuildConversionAllowlist struct {
|
type Bp2BuildConversionAllowlist struct {
|
||||||
@@ -533,22 +556,32 @@ func bp2buildDefaultTrueRecursively(packagePath string, config allowlists.Bp2Bui
|
|||||||
}
|
}
|
||||||
|
|
||||||
func registerBp2buildConversionMutator(ctx RegisterMutatorsContext) {
|
func registerBp2buildConversionMutator(ctx RegisterMutatorsContext) {
|
||||||
ctx.TopDown("bp2build_conversion", convertWithBp2build).Parallel()
|
ctx.TopDown("bp2build_conversion", bp2buildConversionMutator).Parallel()
|
||||||
}
|
}
|
||||||
|
|
||||||
func convertWithBp2build(ctx TopDownMutatorContext) {
|
func bp2buildConversionMutator(ctx TopDownMutatorContext) {
|
||||||
if ctx.Config().HasBazelBuildTargetInSource(ctx) {
|
if ctx.Config().HasBazelBuildTargetInSource(ctx) {
|
||||||
// Defer to the BUILD target. Generating an additional target would
|
// Defer to the BUILD target. Generating an additional target would
|
||||||
// cause a BUILD file conflict.
|
// cause a BUILD file conflict.
|
||||||
|
ctx.MarkBp2buildUnconvertible(bp2build_metrics_proto.UnconvertedReasonType_DEFINED_IN_BUILD_FILE, "")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
bModule, ok := ctx.Module().(Bazelable)
|
bModule, ok := ctx.Module().(Bazelable)
|
||||||
if !ok || !bModule.shouldConvertWithBp2build(ctx, ctx.Module()) {
|
if !ok {
|
||||||
|
ctx.MarkBp2buildUnconvertible(bp2build_metrics_proto.UnconvertedReasonType_TYPE_UNSUPPORTED, "")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
// TODO: b/285631638 - Differentiate between denylisted modules and missing bp2build capabilities.
|
||||||
|
if !bModule.shouldConvertWithBp2build(ctx, ctx.Module()) {
|
||||||
|
ctx.MarkBp2buildUnconvertible(bp2build_metrics_proto.UnconvertedReasonType_UNSUPPORTED, "")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
bModule.ConvertWithBp2build(ctx)
|
bModule.ConvertWithBp2build(ctx)
|
||||||
|
|
||||||
|
if !ctx.Module().base().IsConvertedByBp2build() && ctx.Module().base().GetUnconvertedReason() == nil {
|
||||||
|
panic(fmt.Errorf("illegal bp2build invariant: module '%s' was neither converted nor marked unconvertible", ctx.ModuleName()))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func registerApiBp2buildConversionMutator(ctx RegisterMutatorsContext) {
|
func registerApiBp2buildConversionMutator(ctx RegisterMutatorsContext) {
|
||||||
|
@@ -17,6 +17,7 @@ package android
|
|||||||
import (
|
import (
|
||||||
"reflect"
|
"reflect"
|
||||||
|
|
||||||
|
"android/soong/ui/metrics/bp2build_metrics_proto"
|
||||||
"github.com/google/blueprint"
|
"github.com/google/blueprint"
|
||||||
"github.com/google/blueprint/proptools"
|
"github.com/google/blueprint/proptools"
|
||||||
)
|
)
|
||||||
@@ -179,7 +180,10 @@ func (d *DefaultsModuleBase) GenerateAndroidBuildActions(ctx ModuleContext) {}
|
|||||||
|
|
||||||
// ConvertWithBp2build to fulfill Bazelable interface; however, at this time defaults module are
|
// ConvertWithBp2build to fulfill Bazelable interface; however, at this time defaults module are
|
||||||
// *NOT* converted with bp2build
|
// *NOT* converted with bp2build
|
||||||
func (defaultable *DefaultsModuleBase) ConvertWithBp2build(ctx TopDownMutatorContext) {}
|
func (defaultable *DefaultsModuleBase) ConvertWithBp2build(ctx TopDownMutatorContext) {
|
||||||
|
// Defaults types are never convertible.
|
||||||
|
ctx.MarkBp2buildUnconvertible(bp2build_metrics_proto.UnconvertedReasonType_TYPE_UNSUPPORTED, "")
|
||||||
|
}
|
||||||
|
|
||||||
func InitDefaultsModule(module DefaultsModule) {
|
func InitDefaultsModule(module DefaultsModule) {
|
||||||
commonProperties := &commonProperties{}
|
commonProperties := &commonProperties{}
|
||||||
|
@@ -21,6 +21,7 @@ import (
|
|||||||
|
|
||||||
"android/soong/bazel"
|
"android/soong/bazel"
|
||||||
"android/soong/bazel/cquery"
|
"android/soong/bazel/cquery"
|
||||||
|
"android/soong/ui/metrics/bp2build_metrics_proto"
|
||||||
|
|
||||||
"github.com/google/blueprint"
|
"github.com/google/blueprint"
|
||||||
)
|
)
|
||||||
@@ -111,6 +112,7 @@ func (fg *fileGroup) ConvertWithBp2build(ctx TopDownMutatorContext) {
|
|||||||
if len(srcs.Value.Includes) > 1 {
|
if len(srcs.Value.Includes) > 1 {
|
||||||
ctx.ModuleErrorf("filegroup '%s' cannot contain a file with the same name", fg.Name())
|
ctx.ModuleErrorf("filegroup '%s' cannot contain a file with the same name", fg.Name())
|
||||||
}
|
}
|
||||||
|
ctx.MarkBp2buildUnconvertible(bp2build_metrics_proto.UnconvertedReasonType_SRC_NAME_COLLISION, "")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -30,6 +30,7 @@ import (
|
|||||||
"text/scanner"
|
"text/scanner"
|
||||||
|
|
||||||
"android/soong/bazel"
|
"android/soong/bazel"
|
||||||
|
"android/soong/ui/metrics/bp2build_metrics_proto"
|
||||||
|
|
||||||
"github.com/google/blueprint"
|
"github.com/google/blueprint"
|
||||||
"github.com/google/blueprint/proptools"
|
"github.com/google/blueprint/proptools"
|
||||||
@@ -566,6 +567,8 @@ type Module interface {
|
|||||||
|
|
||||||
// IsConvertedByBp2build returns whether this module was converted via bp2build
|
// IsConvertedByBp2build returns whether this module was converted via bp2build
|
||||||
IsConvertedByBp2build() bool
|
IsConvertedByBp2build() bool
|
||||||
|
GetUnconvertedReason() *UnconvertedReason
|
||||||
|
|
||||||
// Bp2buildTargets returns the target(s) generated for Bazel via bp2build for this module
|
// Bp2buildTargets returns the target(s) generated for Bazel via bp2build for this module
|
||||||
Bp2buildTargets() []bp2buildInfo
|
Bp2buildTargets() []bp2buildInfo
|
||||||
GetUnconvertedBp2buildDeps() []string
|
GetUnconvertedBp2buildDeps() []string
|
||||||
@@ -1596,14 +1599,31 @@ func (b bp2buildInfo) BazelAttributes() []interface{} {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (m *ModuleBase) addBp2buildInfo(info bp2buildInfo) {
|
func (m *ModuleBase) addBp2buildInfo(info bp2buildInfo) {
|
||||||
|
if m.commonProperties.BazelConversionStatus.UnconvertedReason != nil {
|
||||||
|
panic(fmt.Errorf("bp2build: module '%s' marked unconvertible and also is converted", m.Name()))
|
||||||
|
}
|
||||||
m.commonProperties.BazelConversionStatus.Bp2buildInfo = append(m.commonProperties.BazelConversionStatus.Bp2buildInfo, info)
|
m.commonProperties.BazelConversionStatus.Bp2buildInfo = append(m.commonProperties.BazelConversionStatus.Bp2buildInfo, info)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (m *ModuleBase) setBp2buildUnconvertible(reasonType bp2build_metrics_proto.UnconvertedReasonType, detail string) {
|
||||||
|
if len(m.commonProperties.BazelConversionStatus.Bp2buildInfo) > 0 {
|
||||||
|
panic(fmt.Errorf("bp2build: module '%s' marked unconvertible and also is converted", m.Name()))
|
||||||
|
}
|
||||||
|
m.commonProperties.BazelConversionStatus.UnconvertedReason = &UnconvertedReason{
|
||||||
|
ReasonType: int(reasonType),
|
||||||
|
Detail: detail,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// IsConvertedByBp2build returns whether this module was converted via bp2build.
|
// IsConvertedByBp2build returns whether this module was converted via bp2build.
|
||||||
func (m *ModuleBase) IsConvertedByBp2build() bool {
|
func (m *ModuleBase) IsConvertedByBp2build() bool {
|
||||||
return len(m.commonProperties.BazelConversionStatus.Bp2buildInfo) > 0
|
return len(m.commonProperties.BazelConversionStatus.Bp2buildInfo) > 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (m *ModuleBase) GetUnconvertedReason() *UnconvertedReason {
|
||||||
|
return m.commonProperties.BazelConversionStatus.UnconvertedReason
|
||||||
|
}
|
||||||
|
|
||||||
// Bp2buildTargets returns the Bazel targets bp2build generated for this module.
|
// Bp2buildTargets returns the Bazel targets bp2build generated for this module.
|
||||||
func (m *ModuleBase) Bp2buildTargets() []bp2buildInfo {
|
func (m *ModuleBase) Bp2buildTargets() []bp2buildInfo {
|
||||||
return m.commonProperties.BazelConversionStatus.Bp2buildInfo
|
return m.commonProperties.BazelConversionStatus.Bp2buildInfo
|
||||||
|
@@ -16,6 +16,7 @@ package android
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"android/soong/bazel"
|
"android/soong/bazel"
|
||||||
|
"android/soong/ui/metrics/bp2build_metrics_proto"
|
||||||
|
|
||||||
"github.com/google/blueprint"
|
"github.com/google/blueprint"
|
||||||
)
|
)
|
||||||
@@ -271,6 +272,10 @@ type TopDownMutatorContext interface {
|
|||||||
// any platform for which this bool attribute is false.
|
// any platform for which this bool attribute is false.
|
||||||
CreateBazelTargetModuleWithRestrictions(bazel.BazelTargetModuleProperties, CommonAttributes, interface{}, bazel.BoolAttribute)
|
CreateBazelTargetModuleWithRestrictions(bazel.BazelTargetModuleProperties, CommonAttributes, interface{}, bazel.BoolAttribute)
|
||||||
|
|
||||||
|
// MarkBp2buildUnconvertible registers the current module as "unconvertible to bp2build" for the
|
||||||
|
// given reason.
|
||||||
|
MarkBp2buildUnconvertible(reasonType bp2build_metrics_proto.UnconvertedReasonType, detail string)
|
||||||
|
|
||||||
// CreateBazelTargetAliasInDir creates an alias definition in `dir` directory.
|
// CreateBazelTargetAliasInDir creates an alias definition in `dir` directory.
|
||||||
// This function can be used to create alias definitions in a directory that is different
|
// This function can be used to create alias definitions in a directory that is different
|
||||||
// from the directory of the visited Soong module.
|
// from the directory of the visited Soong module.
|
||||||
@@ -718,6 +723,12 @@ func (t *topDownMutatorContext) CreateBazelTargetModuleWithRestrictions(
|
|||||||
t.createBazelTargetModule(bazelProps, commonAttrs, attrs, enabledProperty)
|
t.createBazelTargetModule(bazelProps, commonAttrs, attrs, enabledProperty)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (t *topDownMutatorContext) MarkBp2buildUnconvertible(
|
||||||
|
reasonType bp2build_metrics_proto.UnconvertedReasonType, detail string) {
|
||||||
|
mod := t.Module()
|
||||||
|
mod.base().setBp2buildUnconvertible(reasonType, detail)
|
||||||
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
bazelAliasModuleProperties = bazel.BazelTargetModuleProperties{
|
bazelAliasModuleProperties = bazel.BazelTargetModuleProperties{
|
||||||
Rule_class: "alias",
|
Rule_class: "alias",
|
||||||
|
@@ -28,6 +28,7 @@ import (
|
|||||||
"android/soong/android"
|
"android/soong/android"
|
||||||
"android/soong/bazel"
|
"android/soong/bazel"
|
||||||
"android/soong/starlark_fmt"
|
"android/soong/starlark_fmt"
|
||||||
|
"android/soong/ui/metrics/bp2build_metrics_proto"
|
||||||
"github.com/google/blueprint"
|
"github.com/google/blueprint"
|
||||||
"github.com/google/blueprint/proptools"
|
"github.com/google/blueprint/proptools"
|
||||||
)
|
)
|
||||||
@@ -283,12 +284,15 @@ func GenerateBazelTargets(ctx *CodegenContext, generateFilegroups bool) (convers
|
|||||||
// target in a BUILD file, we don't autoconvert them.
|
// target in a BUILD file, we don't autoconvert them.
|
||||||
|
|
||||||
// Log the module.
|
// Log the module.
|
||||||
metrics.AddConvertedModule(m, moduleType, dir, Handcrafted)
|
metrics.AddUnconvertedModule(m, moduleType, dir,
|
||||||
|
android.UnconvertedReason{
|
||||||
|
ReasonType: int(bp2build_metrics_proto.UnconvertedReasonType_DEFINED_IN_BUILD_FILE),
|
||||||
|
})
|
||||||
} else if aModule, ok := m.(android.Module); ok && aModule.IsConvertedByBp2build() {
|
} else if aModule, ok := m.(android.Module); ok && aModule.IsConvertedByBp2build() {
|
||||||
// Handle modules converted to generated targets.
|
// Handle modules converted to generated targets.
|
||||||
|
|
||||||
// Log the module.
|
// Log the module.
|
||||||
metrics.AddConvertedModule(aModule, moduleType, dir, Generated)
|
metrics.AddConvertedModule(aModule, moduleType, dir)
|
||||||
|
|
||||||
// Handle modules with unconverted deps. By default, emit a warning.
|
// Handle modules with unconverted deps. By default, emit a warning.
|
||||||
if unconvertedDeps := aModule.GetUnconvertedBp2buildDeps(); len(unconvertedDeps) > 0 {
|
if unconvertedDeps := aModule.GetUnconvertedBp2buildDeps(); len(unconvertedDeps) > 0 {
|
||||||
@@ -324,8 +328,18 @@ func GenerateBazelTargets(ctx *CodegenContext, generateFilegroups bool) (convers
|
|||||||
} else if _, ok := ctx.Config().BazelModulesForceEnabledByFlag()[m.Name()]; ok && m.Name() != "" {
|
} else if _, ok := ctx.Config().BazelModulesForceEnabledByFlag()[m.Name()]; ok && m.Name() != "" {
|
||||||
err := fmt.Errorf("Force Enabled Module %s not converted", m.Name())
|
err := fmt.Errorf("Force Enabled Module %s not converted", m.Name())
|
||||||
errs = append(errs, err)
|
errs = append(errs, err)
|
||||||
|
} else if aModule, ok := m.(android.Module); ok {
|
||||||
|
reason := aModule.GetUnconvertedReason()
|
||||||
|
if reason == nil {
|
||||||
|
panic(fmt.Errorf("module '%s' was neither converted nor marked unconvertible with bp2build", aModule.Name()))
|
||||||
} else {
|
} else {
|
||||||
metrics.AddUnconvertedModule(moduleType)
|
metrics.AddUnconvertedModule(m, moduleType, dir, *reason)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
} else {
|
||||||
|
metrics.AddUnconvertedModule(m, moduleType, dir, android.UnconvertedReason{
|
||||||
|
ReasonType: int(bp2build_metrics_proto.UnconvertedReasonType_TYPE_UNSUPPORTED),
|
||||||
|
})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
case QueryView:
|
case QueryView:
|
||||||
|
@@ -38,6 +38,7 @@ func CreateCodegenMetrics() CodegenMetrics {
|
|||||||
RuleClassCount: make(map[string]uint64),
|
RuleClassCount: make(map[string]uint64),
|
||||||
ConvertedModuleTypeCount: make(map[string]uint64),
|
ConvertedModuleTypeCount: make(map[string]uint64),
|
||||||
TotalModuleTypeCount: make(map[string]uint64),
|
TotalModuleTypeCount: make(map[string]uint64),
|
||||||
|
UnconvertedModules: make(map[string]*bp2build_metrics_proto.UnconvertedReason),
|
||||||
},
|
},
|
||||||
convertedModulePathMap: make(map[string]string),
|
convertedModulePathMap: make(map[string]string),
|
||||||
}
|
}
|
||||||
@@ -149,11 +150,6 @@ func (metrics *CodegenMetrics) AddEvent(event *bp2build_metrics_proto.Event) {
|
|||||||
metrics.serialized.Events = append(metrics.serialized.Events, event)
|
metrics.serialized.Events = append(metrics.serialized.Events, event)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (metrics *CodegenMetrics) AddUnconvertedModule(moduleType string) {
|
|
||||||
metrics.serialized.UnconvertedModuleCount += 1
|
|
||||||
metrics.serialized.TotalModuleTypeCount[moduleType] += 1
|
|
||||||
}
|
|
||||||
|
|
||||||
func (metrics *CodegenMetrics) SetSymlinkCount(n uint64) {
|
func (metrics *CodegenMetrics) SetSymlinkCount(n uint64) {
|
||||||
if m := metrics.serialized.WorkspaceSymlinkCount; m != 0 {
|
if m := metrics.serialized.WorkspaceSymlinkCount; m != 0 {
|
||||||
fmt.Fprintf(os.Stderr, "unexpected non-zero workspaceSymlinkCount of %d", m)
|
fmt.Fprintf(os.Stderr, "unexpected non-zero workspaceSymlinkCount of %d", m)
|
||||||
@@ -187,7 +183,7 @@ const (
|
|||||||
Handcrafted
|
Handcrafted
|
||||||
)
|
)
|
||||||
|
|
||||||
func (metrics *CodegenMetrics) AddConvertedModule(m blueprint.Module, moduleType string, dir string, conversionType ConversionType) {
|
func (metrics *CodegenMetrics) AddConvertedModule(m blueprint.Module, moduleType string, dir string) {
|
||||||
//a package module has empty name
|
//a package module has empty name
|
||||||
if moduleType == "package" {
|
if moduleType == "package" {
|
||||||
return
|
return
|
||||||
@@ -198,10 +194,25 @@ func (metrics *CodegenMetrics) AddConvertedModule(m blueprint.Module, moduleType
|
|||||||
metrics.convertedModulePathMap[moduleName] = "//" + dir
|
metrics.convertedModulePathMap[moduleName] = "//" + dir
|
||||||
metrics.serialized.ConvertedModuleTypeCount[moduleType] += 1
|
metrics.serialized.ConvertedModuleTypeCount[moduleType] += 1
|
||||||
metrics.serialized.TotalModuleTypeCount[moduleType] += 1
|
metrics.serialized.TotalModuleTypeCount[moduleType] += 1
|
||||||
|
|
||||||
if conversionType == Handcrafted {
|
|
||||||
metrics.serialized.HandCraftedModuleCount += 1
|
|
||||||
} else if conversionType == Generated {
|
|
||||||
metrics.serialized.GeneratedModuleCount += 1
|
metrics.serialized.GeneratedModuleCount += 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (metrics *CodegenMetrics) AddUnconvertedModule(m blueprint.Module, moduleType string, dir string,
|
||||||
|
reason android.UnconvertedReason) {
|
||||||
|
//a package module has empty name
|
||||||
|
if moduleType == "package" {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
// Undo prebuilt_ module name prefix modifications
|
||||||
|
moduleName := android.RemoveOptionalPrebuiltPrefix(m.Name())
|
||||||
|
metrics.serialized.UnconvertedModules[moduleName] = &bp2build_metrics_proto.UnconvertedReason{
|
||||||
|
Type: bp2build_metrics_proto.UnconvertedReasonType(reason.ReasonType),
|
||||||
|
Detail: reason.Detail,
|
||||||
|
}
|
||||||
|
metrics.serialized.UnconvertedModuleCount += 1
|
||||||
|
metrics.serialized.TotalModuleTypeCount[moduleType] += 1
|
||||||
|
|
||||||
|
if reason.ReasonType == int(bp2build_metrics_proto.UnconvertedReasonType_DEFINED_IN_BUILD_FILE) {
|
||||||
|
metrics.serialized.HandCraftedModuleCount += 1
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -146,6 +146,10 @@ func runBp2BuildTestCaseWithSetup(t *testing.T, extraPreparer android.FixturePre
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
ctx.RegisterBp2BuildConfig(bp2buildConfig)
|
ctx.RegisterBp2BuildConfig(bp2buildConfig)
|
||||||
|
// This setting is added to bp2build invocations. It prevents bp2build
|
||||||
|
// from cloning modules to their original state after mutators run. This
|
||||||
|
// would lose some data intentionally set by these mutators.
|
||||||
|
ctx.SkipCloneModulesAfterMutators = true
|
||||||
}),
|
}),
|
||||||
android.FixtureModifyEnv(func(env map[string]string) {
|
android.FixtureModifyEnv(func(env map[string]string) {
|
||||||
if tc.UnconvertedDepsMode == errorModulesUnconvertedDeps {
|
if tc.UnconvertedDepsMode == errorModulesUnconvertedDeps {
|
||||||
@@ -210,7 +214,11 @@ func (b *bazelTestRunner) PostParseProcessor(result android.CustomTestResult) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
codegenCtx := NewCodegenContext(config, ctx.Context, Bp2Build, "")
|
codegenMode := Bp2Build
|
||||||
|
if ctx.Config().BuildMode == android.ApiBp2build {
|
||||||
|
codegenMode = ApiBp2build
|
||||||
|
}
|
||||||
|
codegenCtx := NewCodegenContext(config, ctx.Context, codegenMode, "")
|
||||||
res, errs := GenerateBazelTargets(codegenCtx, false)
|
res, errs := GenerateBazelTargets(codegenCtx, false)
|
||||||
if bazelResult.CollateErrs(errs) {
|
if bazelResult.CollateErrs(errs) {
|
||||||
return
|
return
|
||||||
|
3
cc/cc.go
3
cc/cc.go
@@ -24,6 +24,7 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
"android/soong/ui/metrics/bp2build_metrics_proto"
|
||||||
"github.com/google/blueprint"
|
"github.com/google/blueprint"
|
||||||
"github.com/google/blueprint/proptools"
|
"github.com/google/blueprint/proptools"
|
||||||
|
|
||||||
@@ -4103,6 +4104,8 @@ func (c *Module) ConvertWithBp2build(ctx android.TopDownMutatorContext) {
|
|||||||
} else {
|
} else {
|
||||||
sharedOrStaticLibraryBp2Build(ctx, c, false)
|
sharedOrStaticLibraryBp2Build(ctx, c, false)
|
||||||
}
|
}
|
||||||
|
default:
|
||||||
|
ctx.MarkBp2buildUnconvertible(bp2build_metrics_proto.UnconvertedReasonType_TYPE_UNSUPPORTED, "")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -20,6 +20,7 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
"android/soong/ui/metrics/bp2build_metrics_proto"
|
||||||
"github.com/google/blueprint/pathtools"
|
"github.com/google/blueprint/pathtools"
|
||||||
"github.com/google/blueprint/proptools"
|
"github.com/google/blueprint/proptools"
|
||||||
|
|
||||||
@@ -2213,5 +2214,7 @@ func (j *Module) ConvertWithBp2build(ctx android.TopDownMutatorContext) {
|
|||||||
if testHost, ok := ctx.Module().(*TestHost); ok {
|
if testHost, ok := ctx.Module().(*TestHost); ok {
|
||||||
javaTestHostBp2Build(ctx, testHost)
|
javaTestHostBp2Build(ctx, testHost)
|
||||||
}
|
}
|
||||||
|
default:
|
||||||
|
ctx.MarkBp2buildUnconvertible(bp2build_metrics_proto.UnconvertedReasonType_TYPE_UNSUPPORTED, "")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -24,6 +24,7 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
|
"android/soong/ui/metrics/bp2build_metrics_proto"
|
||||||
"github.com/google/blueprint"
|
"github.com/google/blueprint"
|
||||||
"github.com/google/blueprint/proptools"
|
"github.com/google/blueprint/proptools"
|
||||||
|
|
||||||
@@ -2232,6 +2233,7 @@ type bazelSdkLibraryAttributes struct {
|
|||||||
// java_sdk_library bp2build converter
|
// java_sdk_library bp2build converter
|
||||||
func (module *SdkLibrary) ConvertWithBp2build(ctx android.TopDownMutatorContext) {
|
func (module *SdkLibrary) ConvertWithBp2build(ctx android.TopDownMutatorContext) {
|
||||||
if ctx.ModuleType() != "java_sdk_library" {
|
if ctx.ModuleType() != "java_sdk_library" {
|
||||||
|
ctx.MarkBp2buildUnconvertible(bp2build_metrics_proto.UnconvertedReasonType_TYPE_UNSUPPORTED, "")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -19,6 +19,7 @@ import (
|
|||||||
"sort"
|
"sort"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
"android/soong/ui/metrics/bp2build_metrics_proto"
|
||||||
"github.com/google/blueprint/proptools"
|
"github.com/google/blueprint/proptools"
|
||||||
|
|
||||||
"android/soong/android"
|
"android/soong/android"
|
||||||
@@ -109,6 +110,7 @@ type linkerConfigAttributes struct {
|
|||||||
func (l *linkerConfig) ConvertWithBp2build(ctx android.TopDownMutatorContext) {
|
func (l *linkerConfig) ConvertWithBp2build(ctx android.TopDownMutatorContext) {
|
||||||
if l.properties.Src == nil {
|
if l.properties.Src == nil {
|
||||||
ctx.PropertyErrorf("src", "empty src is not supported")
|
ctx.PropertyErrorf("src", "empty src is not supported")
|
||||||
|
ctx.MarkBp2buildUnconvertible(bp2build_metrics_proto.UnconvertedReasonType_UNSUPPORTED, "")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
src := android.BazelLabelForModuleSrcSingle(ctx, *l.properties.Src)
|
src := android.BazelLabelForModuleSrcSingle(ctx, *l.properties.Src)
|
||||||
|
@@ -14,8 +14,8 @@
|
|||||||
|
|
||||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-go v1.28.0
|
// protoc-gen-go v1.30.0
|
||||||
// protoc v3.21.7
|
// protoc v3.21.12
|
||||||
// source: bp2build_metrics.proto
|
// source: bp2build_metrics.proto
|
||||||
|
|
||||||
package bp2build_metrics_proto
|
package bp2build_metrics_proto
|
||||||
@@ -34,6 +34,78 @@ const (
|
|||||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
type UnconvertedReasonType int32
|
||||||
|
|
||||||
|
const (
|
||||||
|
// Bp2build does not know how to convert this specific module for some reason
|
||||||
|
// not covered by other reason types. The reason detail should explain the
|
||||||
|
// specific issue.
|
||||||
|
UnconvertedReasonType_UNSUPPORTED UnconvertedReasonType = 0
|
||||||
|
// The module was already defined in a BUILD file available in the source tree.
|
||||||
|
UnconvertedReasonType_DEFINED_IN_BUILD_FILE UnconvertedReasonType = 1
|
||||||
|
// The module was explicitly denylisted by name.
|
||||||
|
UnconvertedReasonType_DENYLISTED UnconvertedReasonType = 2
|
||||||
|
// The module's type has no bp2build implementation.
|
||||||
|
UnconvertedReasonType_TYPE_UNSUPPORTED UnconvertedReasonType = 3
|
||||||
|
// The module has a property not yet supported. The detail field should
|
||||||
|
// name the unsupported property name.
|
||||||
|
UnconvertedReasonType_PROPERTY_UNSUPPORTED UnconvertedReasonType = 4
|
||||||
|
// The module has an unconverted dependency. The detail should consist of
|
||||||
|
// the name of the unconverted module.
|
||||||
|
UnconvertedReasonType_UNCONVERTED_DEP UnconvertedReasonType = 5
|
||||||
|
// The module has a source file with the same name as the module itself.
|
||||||
|
UnconvertedReasonType_SRC_NAME_COLLISION UnconvertedReasonType = 6
|
||||||
|
)
|
||||||
|
|
||||||
|
// Enum value maps for UnconvertedReasonType.
|
||||||
|
var (
|
||||||
|
UnconvertedReasonType_name = map[int32]string{
|
||||||
|
0: "UNSUPPORTED",
|
||||||
|
1: "DEFINED_IN_BUILD_FILE",
|
||||||
|
2: "DENYLISTED",
|
||||||
|
3: "TYPE_UNSUPPORTED",
|
||||||
|
4: "PROPERTY_UNSUPPORTED",
|
||||||
|
5: "UNCONVERTED_DEP",
|
||||||
|
6: "SRC_NAME_COLLISION",
|
||||||
|
}
|
||||||
|
UnconvertedReasonType_value = map[string]int32{
|
||||||
|
"UNSUPPORTED": 0,
|
||||||
|
"DEFINED_IN_BUILD_FILE": 1,
|
||||||
|
"DENYLISTED": 2,
|
||||||
|
"TYPE_UNSUPPORTED": 3,
|
||||||
|
"PROPERTY_UNSUPPORTED": 4,
|
||||||
|
"UNCONVERTED_DEP": 5,
|
||||||
|
"SRC_NAME_COLLISION": 6,
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
func (x UnconvertedReasonType) Enum() *UnconvertedReasonType {
|
||||||
|
p := new(UnconvertedReasonType)
|
||||||
|
*p = x
|
||||||
|
return p
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x UnconvertedReasonType) String() string {
|
||||||
|
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
|
||||||
|
}
|
||||||
|
|
||||||
|
func (UnconvertedReasonType) Descriptor() protoreflect.EnumDescriptor {
|
||||||
|
return file_bp2build_metrics_proto_enumTypes[0].Descriptor()
|
||||||
|
}
|
||||||
|
|
||||||
|
func (UnconvertedReasonType) Type() protoreflect.EnumType {
|
||||||
|
return &file_bp2build_metrics_proto_enumTypes[0]
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x UnconvertedReasonType) Number() protoreflect.EnumNumber {
|
||||||
|
return protoreflect.EnumNumber(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use UnconvertedReasonType.Descriptor instead.
|
||||||
|
func (UnconvertedReasonType) EnumDescriptor() ([]byte, []int) {
|
||||||
|
return file_bp2build_metrics_proto_rawDescGZIP(), []int{0}
|
||||||
|
}
|
||||||
|
|
||||||
type Bp2BuildMetrics struct {
|
type Bp2BuildMetrics struct {
|
||||||
state protoimpl.MessageState
|
state protoimpl.MessageState
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
@@ -53,6 +125,8 @@ type Bp2BuildMetrics struct {
|
|||||||
RuleClassCount map[string]uint64 `protobuf:"bytes,4,rep,name=ruleClassCount,proto3" json:"ruleClassCount,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"`
|
RuleClassCount map[string]uint64 `protobuf:"bytes,4,rep,name=ruleClassCount,proto3" json:"ruleClassCount,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"`
|
||||||
// List of converted modules
|
// List of converted modules
|
||||||
ConvertedModules []string `protobuf:"bytes,5,rep,name=convertedModules,proto3" json:"convertedModules,omitempty"`
|
ConvertedModules []string `protobuf:"bytes,5,rep,name=convertedModules,proto3" json:"convertedModules,omitempty"`
|
||||||
|
// Unconverted modules, mapped to the reason the module was not converted.
|
||||||
|
UnconvertedModules map[string]*UnconvertedReason `protobuf:"bytes,11,rep,name=unconvertedModules,proto3" json:"unconvertedModules,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
||||||
// Counts of converted modules by module type.
|
// Counts of converted modules by module type.
|
||||||
ConvertedModuleTypeCount map[string]uint64 `protobuf:"bytes,6,rep,name=convertedModuleTypeCount,proto3" json:"convertedModuleTypeCount,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"`
|
ConvertedModuleTypeCount map[string]uint64 `protobuf:"bytes,6,rep,name=convertedModuleTypeCount,proto3" json:"convertedModuleTypeCount,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"`
|
||||||
// Counts of total modules by module type.
|
// Counts of total modules by module type.
|
||||||
@@ -143,6 +217,13 @@ func (x *Bp2BuildMetrics) GetConvertedModules() []string {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (x *Bp2BuildMetrics) GetUnconvertedModules() map[string]*UnconvertedReason {
|
||||||
|
if x != nil {
|
||||||
|
return x.UnconvertedModules
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
func (x *Bp2BuildMetrics) GetConvertedModuleTypeCount() map[string]uint64 {
|
func (x *Bp2BuildMetrics) GetConvertedModuleTypeCount() map[string]uint64 {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.ConvertedModuleTypeCount
|
return x.ConvertedModuleTypeCount
|
||||||
@@ -233,13 +314,72 @@ func (x *Event) GetRealTime() uint64 {
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type UnconvertedReason struct {
|
||||||
|
state protoimpl.MessageState
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
|
// The type of reason that the module could not be converted.
|
||||||
|
Type UnconvertedReasonType `protobuf:"varint,1,opt,name=type,proto3,enum=soong_build_bp2build_metrics.UnconvertedReasonType" json:"type,omitempty"`
|
||||||
|
// Descriptive details describing why the module could not be converted.
|
||||||
|
// This detail should be kept very short and should be in the context of
|
||||||
|
// the type. (Otherwise, this would significantly bloat metrics.)
|
||||||
|
Detail string `protobuf:"bytes,2,opt,name=detail,proto3" json:"detail,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *UnconvertedReason) Reset() {
|
||||||
|
*x = UnconvertedReason{}
|
||||||
|
if protoimpl.UnsafeEnabled {
|
||||||
|
mi := &file_bp2build_metrics_proto_msgTypes[2]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *UnconvertedReason) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*UnconvertedReason) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *UnconvertedReason) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_bp2build_metrics_proto_msgTypes[2]
|
||||||
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
return ms
|
||||||
|
}
|
||||||
|
return mi.MessageOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use UnconvertedReason.ProtoReflect.Descriptor instead.
|
||||||
|
func (*UnconvertedReason) Descriptor() ([]byte, []int) {
|
||||||
|
return file_bp2build_metrics_proto_rawDescGZIP(), []int{2}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *UnconvertedReason) GetType() UnconvertedReasonType {
|
||||||
|
if x != nil {
|
||||||
|
return x.Type
|
||||||
|
}
|
||||||
|
return UnconvertedReasonType_UNSUPPORTED
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *UnconvertedReason) GetDetail() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Detail
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
var File_bp2build_metrics_proto protoreflect.FileDescriptor
|
var File_bp2build_metrics_proto protoreflect.FileDescriptor
|
||||||
|
|
||||||
var file_bp2build_metrics_proto_rawDesc = []byte{
|
var file_bp2build_metrics_proto_rawDesc = []byte{
|
||||||
0x0a, 0x16, 0x62, 0x70, 0x32, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69,
|
0x0a, 0x16, 0x62, 0x70, 0x32, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69,
|
||||||
0x63, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1c, 0x73, 0x6f, 0x6f, 0x6e, 0x67, 0x5f,
|
0x63, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1c, 0x73, 0x6f, 0x6f, 0x6e, 0x67, 0x5f,
|
||||||
0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x70, 0x32, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x6d,
|
0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x70, 0x32, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x6d,
|
||||||
0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x22, 0xd1, 0x07, 0x0a, 0x0f, 0x42, 0x70, 0x32, 0x42, 0x75,
|
0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x22, 0xc0, 0x09, 0x0a, 0x0f, 0x42, 0x70, 0x32, 0x42, 0x75,
|
||||||
0x69, 0x6c, 0x64, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x32, 0x0a, 0x14, 0x67, 0x65,
|
0x69, 0x6c, 0x64, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x32, 0x0a, 0x14, 0x67, 0x65,
|
||||||
0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x43, 0x6f, 0x75,
|
0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x43, 0x6f, 0x75,
|
||||||
0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x14, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61,
|
0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x14, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61,
|
||||||
@@ -266,50 +406,84 @@ var file_bp2build_metrics_proto_rawDesc = []byte{
|
|||||||
0x79, 0x52, 0x0e, 0x72, 0x75, 0x6c, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x43, 0x6f, 0x75, 0x6e,
|
0x79, 0x52, 0x0e, 0x72, 0x75, 0x6c, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x43, 0x6f, 0x75, 0x6e,
|
||||||
0x74, 0x12, 0x2a, 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x65, 0x64, 0x4d, 0x6f,
|
0x74, 0x12, 0x2a, 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x65, 0x64, 0x4d, 0x6f,
|
||||||
0x64, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x10, 0x63, 0x6f, 0x6e,
|
0x64, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x10, 0x63, 0x6f, 0x6e,
|
||||||
0x76, 0x65, 0x72, 0x74, 0x65, 0x64, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x87, 0x01,
|
0x76, 0x65, 0x72, 0x74, 0x65, 0x64, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x75, 0x0a,
|
||||||
0x0a, 0x18, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x65, 0x64, 0x4d, 0x6f, 0x64, 0x75, 0x6c,
|
0x12, 0x75, 0x6e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x65, 0x64, 0x4d, 0x6f, 0x64, 0x75,
|
||||||
0x65, 0x54, 0x79, 0x70, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b,
|
0x6c, 0x65, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x45, 0x2e, 0x73, 0x6f, 0x6f, 0x6e,
|
||||||
0x32, 0x4b, 0x2e, 0x73, 0x6f, 0x6f, 0x6e, 0x67, 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x62,
|
0x67, 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x70, 0x32, 0x62, 0x75, 0x69, 0x6c, 0x64,
|
||||||
0x70, 0x32, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e,
|
0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x42, 0x70, 0x32, 0x42, 0x75, 0x69, 0x6c,
|
||||||
0x42, 0x70, 0x32, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e,
|
0x64, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x55, 0x6e, 0x63, 0x6f, 0x6e, 0x76, 0x65,
|
||||||
0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x65, 0x64, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x54,
|
0x72, 0x74, 0x65, 0x64, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79,
|
||||||
0x79, 0x70, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x18, 0x63,
|
0x52, 0x12, 0x75, 0x6e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x65, 0x64, 0x4d, 0x6f, 0x64,
|
||||||
0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x65, 0x64, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x54, 0x79,
|
0x75, 0x6c, 0x65, 0x73, 0x12, 0x87, 0x01, 0x0a, 0x18, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74,
|
||||||
0x70, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x7b, 0x0a, 0x14, 0x74, 0x6f, 0x74, 0x61, 0x6c,
|
0x65, 0x64, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x43, 0x6f, 0x75, 0x6e,
|
||||||
0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18,
|
0x74, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x4b, 0x2e, 0x73, 0x6f, 0x6f, 0x6e, 0x67, 0x5f,
|
||||||
0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x47, 0x2e, 0x73, 0x6f, 0x6f, 0x6e, 0x67, 0x5f, 0x62, 0x75,
|
0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x70, 0x32, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x6d,
|
||||||
|
0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x42, 0x70, 0x32, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x4d,
|
||||||
|
0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x65, 0x64,
|
||||||
|
0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x45,
|
||||||
|
0x6e, 0x74, 0x72, 0x79, 0x52, 0x18, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x65, 0x64, 0x4d,
|
||||||
|
0x6f, 0x64, 0x75, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x7b,
|
||||||
|
0x0a, 0x14, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x54, 0x79, 0x70,
|
||||||
|
0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x47, 0x2e, 0x73,
|
||||||
|
0x6f, 0x6f, 0x6e, 0x67, 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x70, 0x32, 0x62, 0x75,
|
||||||
|
0x69, 0x6c, 0x64, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x42, 0x70, 0x32, 0x42,
|
||||||
|
0x75, 0x69, 0x6c, 0x64, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x54, 0x6f, 0x74, 0x61,
|
||||||
|
0x6c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74,
|
||||||
|
0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x14, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x4d, 0x6f, 0x64, 0x75,
|
||||||
|
0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x3b, 0x0a, 0x06, 0x65,
|
||||||
|
0x76, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x73, 0x6f,
|
||||||
|
0x6f, 0x6e, 0x67, 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x70, 0x32, 0x62, 0x75, 0x69,
|
||||||
|
0x6c, 0x64, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74,
|
||||||
|
0x52, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x1a, 0x41, 0x0a, 0x13, 0x52, 0x75, 0x6c, 0x65,
|
||||||
|
0x43, 0x6c, 0x61, 0x73, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12,
|
||||||
|
0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65,
|
||||||
|
0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04,
|
||||||
|
0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x76, 0x0a, 0x17, 0x55,
|
||||||
|
0x6e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x65, 0x64, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65,
|
||||||
|
0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20,
|
||||||
|
0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x45, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75,
|
||||||
|
0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x73, 0x6f, 0x6f, 0x6e, 0x67, 0x5f,
|
||||||
|
0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x62, 0x70, 0x32, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x6d,
|
||||||
|
0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x55, 0x6e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74,
|
||||||
|
0x65, 0x64, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a,
|
||||||
|
0x02, 0x38, 0x01, 0x1a, 0x4b, 0x0a, 0x1d, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x65, 0x64,
|
||||||
|
0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x45,
|
||||||
|
0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||||
|
0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18,
|
||||||
|
0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01,
|
||||||
|
0x1a, 0x47, 0x0a, 0x19, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x54,
|
||||||
|
0x79, 0x70, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a,
|
||||||
|
0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12,
|
||||||
|
0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05,
|
||||||
|
0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x57, 0x0a, 0x05, 0x45, 0x76, 0x65,
|
||||||
|
0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
|
||||||
|
0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f,
|
||||||
|
0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72,
|
||||||
|
0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x65, 0x61, 0x6c, 0x5f, 0x74, 0x69,
|
||||||
|
0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x72, 0x65, 0x61, 0x6c, 0x54, 0x69,
|
||||||
|
0x6d, 0x65, 0x22, 0x74, 0x0a, 0x11, 0x55, 0x6e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x65,
|
||||||
|
0x64, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x47, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18,
|
||||||
|
0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x33, 0x2e, 0x73, 0x6f, 0x6f, 0x6e, 0x67, 0x5f, 0x62, 0x75,
|
||||||
0x69, 0x6c, 0x64, 0x5f, 0x62, 0x70, 0x32, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x6d, 0x65, 0x74,
|
0x69, 0x6c, 0x64, 0x5f, 0x62, 0x70, 0x32, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x6d, 0x65, 0x74,
|
||||||
0x72, 0x69, 0x63, 0x73, 0x2e, 0x42, 0x70, 0x32, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x4d, 0x65, 0x74,
|
0x72, 0x69, 0x63, 0x73, 0x2e, 0x55, 0x6e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x65, 0x64,
|
||||||
0x72, 0x69, 0x63, 0x73, 0x2e, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65,
|
0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65,
|
||||||
0x54, 0x79, 0x70, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x14,
|
0x12, 0x16, 0x0a, 0x06, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
|
||||||
0x74, 0x6f, 0x74, 0x61, 0x6c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x43,
|
0x52, 0x06, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x2a, 0xb0, 0x01, 0x0a, 0x15, 0x55, 0x6e, 0x63,
|
||||||
0x6f, 0x75, 0x6e, 0x74, 0x12, 0x3b, 0x0a, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x08,
|
0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x65, 0x64, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x54, 0x79,
|
||||||
0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x73, 0x6f, 0x6f, 0x6e, 0x67, 0x5f, 0x62, 0x75, 0x69,
|
0x70, 0x65, 0x12, 0x0f, 0x0a, 0x0b, 0x55, 0x4e, 0x53, 0x55, 0x50, 0x50, 0x4f, 0x52, 0x54, 0x45,
|
||||||
0x6c, 0x64, 0x5f, 0x62, 0x70, 0x32, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x6d, 0x65, 0x74, 0x72,
|
0x44, 0x10, 0x00, 0x12, 0x19, 0x0a, 0x15, 0x44, 0x45, 0x46, 0x49, 0x4e, 0x45, 0x44, 0x5f, 0x49,
|
||||||
0x69, 0x63, 0x73, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74,
|
0x4e, 0x5f, 0x42, 0x55, 0x49, 0x4c, 0x44, 0x5f, 0x46, 0x49, 0x4c, 0x45, 0x10, 0x01, 0x12, 0x0e,
|
||||||
0x73, 0x1a, 0x41, 0x0a, 0x13, 0x52, 0x75, 0x6c, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x43, 0x6f,
|
0x0a, 0x0a, 0x44, 0x45, 0x4e, 0x59, 0x4c, 0x49, 0x53, 0x54, 0x45, 0x44, 0x10, 0x02, 0x12, 0x14,
|
||||||
0x75, 0x6e, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18,
|
0x0a, 0x10, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x55, 0x50, 0x50, 0x4f, 0x52, 0x54,
|
||||||
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61,
|
0x45, 0x44, 0x10, 0x03, 0x12, 0x18, 0x0a, 0x14, 0x50, 0x52, 0x4f, 0x50, 0x45, 0x52, 0x54, 0x59,
|
||||||
0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
|
0x5f, 0x55, 0x4e, 0x53, 0x55, 0x50, 0x50, 0x4f, 0x52, 0x54, 0x45, 0x44, 0x10, 0x04, 0x12, 0x13,
|
||||||
0x3a, 0x02, 0x38, 0x01, 0x1a, 0x4b, 0x0a, 0x1d, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x65,
|
0x0a, 0x0f, 0x55, 0x4e, 0x43, 0x4f, 0x4e, 0x56, 0x45, 0x52, 0x54, 0x45, 0x44, 0x5f, 0x44, 0x45,
|
||||||
0x64, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74,
|
0x50, 0x10, 0x05, 0x12, 0x16, 0x0a, 0x12, 0x53, 0x52, 0x43, 0x5f, 0x4e, 0x41, 0x4d, 0x45, 0x5f,
|
||||||
0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01,
|
0x43, 0x4f, 0x4c, 0x4c, 0x49, 0x53, 0x49, 0x4f, 0x4e, 0x10, 0x06, 0x42, 0x31, 0x5a, 0x2f, 0x61,
|
||||||
0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
|
0x6e, 0x64, 0x72, 0x6f, 0x69, 0x64, 0x2f, 0x73, 0x6f, 0x6f, 0x6e, 0x67, 0x2f, 0x75, 0x69, 0x2f,
|
||||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38,
|
0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2f, 0x62, 0x70, 0x32, 0x62, 0x75, 0x69, 0x6c, 0x64,
|
||||||
0x01, 0x1a, 0x47, 0x0a, 0x19, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65,
|
0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06,
|
||||||
0x54, 0x79, 0x70, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10,
|
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||||
0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79,
|
|
||||||
0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52,
|
|
||||||
0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x57, 0x0a, 0x05, 0x45, 0x76,
|
|
||||||
0x65, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
|
|
||||||
0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74,
|
|
||||||
0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x73, 0x74, 0x61,
|
|
||||||
0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x65, 0x61, 0x6c, 0x5f, 0x74,
|
|
||||||
0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x72, 0x65, 0x61, 0x6c, 0x54,
|
|
||||||
0x69, 0x6d, 0x65, 0x42, 0x31, 0x5a, 0x2f, 0x61, 0x6e, 0x64, 0x72, 0x6f, 0x69, 0x64, 0x2f, 0x73,
|
|
||||||
0x6f, 0x6f, 0x6e, 0x67, 0x2f, 0x75, 0x69, 0x2f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2f,
|
|
||||||
0x62, 0x70, 0x32, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73,
|
|
||||||
0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@@ -324,24 +498,31 @@ func file_bp2build_metrics_proto_rawDescGZIP() []byte {
|
|||||||
return file_bp2build_metrics_proto_rawDescData
|
return file_bp2build_metrics_proto_rawDescData
|
||||||
}
|
}
|
||||||
|
|
||||||
var file_bp2build_metrics_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
|
var file_bp2build_metrics_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
|
||||||
|
var file_bp2build_metrics_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
|
||||||
var file_bp2build_metrics_proto_goTypes = []interface{}{
|
var file_bp2build_metrics_proto_goTypes = []interface{}{
|
||||||
(*Bp2BuildMetrics)(nil), // 0: soong_build_bp2build_metrics.Bp2BuildMetrics
|
(UnconvertedReasonType)(0), // 0: soong_build_bp2build_metrics.UnconvertedReasonType
|
||||||
(*Event)(nil), // 1: soong_build_bp2build_metrics.Event
|
(*Bp2BuildMetrics)(nil), // 1: soong_build_bp2build_metrics.Bp2BuildMetrics
|
||||||
nil, // 2: soong_build_bp2build_metrics.Bp2BuildMetrics.RuleClassCountEntry
|
(*Event)(nil), // 2: soong_build_bp2build_metrics.Event
|
||||||
nil, // 3: soong_build_bp2build_metrics.Bp2BuildMetrics.ConvertedModuleTypeCountEntry
|
(*UnconvertedReason)(nil), // 3: soong_build_bp2build_metrics.UnconvertedReason
|
||||||
nil, // 4: soong_build_bp2build_metrics.Bp2BuildMetrics.TotalModuleTypeCountEntry
|
nil, // 4: soong_build_bp2build_metrics.Bp2BuildMetrics.RuleClassCountEntry
|
||||||
|
nil, // 5: soong_build_bp2build_metrics.Bp2BuildMetrics.UnconvertedModulesEntry
|
||||||
|
nil, // 6: soong_build_bp2build_metrics.Bp2BuildMetrics.ConvertedModuleTypeCountEntry
|
||||||
|
nil, // 7: soong_build_bp2build_metrics.Bp2BuildMetrics.TotalModuleTypeCountEntry
|
||||||
}
|
}
|
||||||
var file_bp2build_metrics_proto_depIdxs = []int32{
|
var file_bp2build_metrics_proto_depIdxs = []int32{
|
||||||
2, // 0: soong_build_bp2build_metrics.Bp2BuildMetrics.ruleClassCount:type_name -> soong_build_bp2build_metrics.Bp2BuildMetrics.RuleClassCountEntry
|
4, // 0: soong_build_bp2build_metrics.Bp2BuildMetrics.ruleClassCount:type_name -> soong_build_bp2build_metrics.Bp2BuildMetrics.RuleClassCountEntry
|
||||||
3, // 1: soong_build_bp2build_metrics.Bp2BuildMetrics.convertedModuleTypeCount:type_name -> soong_build_bp2build_metrics.Bp2BuildMetrics.ConvertedModuleTypeCountEntry
|
5, // 1: soong_build_bp2build_metrics.Bp2BuildMetrics.unconvertedModules:type_name -> soong_build_bp2build_metrics.Bp2BuildMetrics.UnconvertedModulesEntry
|
||||||
4, // 2: soong_build_bp2build_metrics.Bp2BuildMetrics.totalModuleTypeCount:type_name -> soong_build_bp2build_metrics.Bp2BuildMetrics.TotalModuleTypeCountEntry
|
6, // 2: soong_build_bp2build_metrics.Bp2BuildMetrics.convertedModuleTypeCount:type_name -> soong_build_bp2build_metrics.Bp2BuildMetrics.ConvertedModuleTypeCountEntry
|
||||||
1, // 3: soong_build_bp2build_metrics.Bp2BuildMetrics.events:type_name -> soong_build_bp2build_metrics.Event
|
7, // 3: soong_build_bp2build_metrics.Bp2BuildMetrics.totalModuleTypeCount:type_name -> soong_build_bp2build_metrics.Bp2BuildMetrics.TotalModuleTypeCountEntry
|
||||||
4, // [4:4] is the sub-list for method output_type
|
2, // 4: soong_build_bp2build_metrics.Bp2BuildMetrics.events:type_name -> soong_build_bp2build_metrics.Event
|
||||||
4, // [4:4] is the sub-list for method input_type
|
0, // 5: soong_build_bp2build_metrics.UnconvertedReason.type:type_name -> soong_build_bp2build_metrics.UnconvertedReasonType
|
||||||
4, // [4:4] is the sub-list for extension type_name
|
3, // 6: soong_build_bp2build_metrics.Bp2BuildMetrics.UnconvertedModulesEntry.value:type_name -> soong_build_bp2build_metrics.UnconvertedReason
|
||||||
4, // [4:4] is the sub-list for extension extendee
|
7, // [7:7] is the sub-list for method output_type
|
||||||
0, // [0:4] is the sub-list for field type_name
|
7, // [7:7] is the sub-list for method input_type
|
||||||
|
7, // [7:7] is the sub-list for extension type_name
|
||||||
|
7, // [7:7] is the sub-list for extension extendee
|
||||||
|
0, // [0:7] is the sub-list for field type_name
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() { file_bp2build_metrics_proto_init() }
|
func init() { file_bp2build_metrics_proto_init() }
|
||||||
@@ -374,19 +555,32 @@ func file_bp2build_metrics_proto_init() {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
file_bp2build_metrics_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||||
|
switch v := v.(*UnconvertedReason); i {
|
||||||
|
case 0:
|
||||||
|
return &v.state
|
||||||
|
case 1:
|
||||||
|
return &v.sizeCache
|
||||||
|
case 2:
|
||||||
|
return &v.unknownFields
|
||||||
|
default:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
type x struct{}
|
type x struct{}
|
||||||
out := protoimpl.TypeBuilder{
|
out := protoimpl.TypeBuilder{
|
||||||
File: protoimpl.DescBuilder{
|
File: protoimpl.DescBuilder{
|
||||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||||
RawDescriptor: file_bp2build_metrics_proto_rawDesc,
|
RawDescriptor: file_bp2build_metrics_proto_rawDesc,
|
||||||
NumEnums: 0,
|
NumEnums: 1,
|
||||||
NumMessages: 5,
|
NumMessages: 7,
|
||||||
NumExtensions: 0,
|
NumExtensions: 0,
|
||||||
NumServices: 0,
|
NumServices: 0,
|
||||||
},
|
},
|
||||||
GoTypes: file_bp2build_metrics_proto_goTypes,
|
GoTypes: file_bp2build_metrics_proto_goTypes,
|
||||||
DependencyIndexes: file_bp2build_metrics_proto_depIdxs,
|
DependencyIndexes: file_bp2build_metrics_proto_depIdxs,
|
||||||
|
EnumInfos: file_bp2build_metrics_proto_enumTypes,
|
||||||
MessageInfos: file_bp2build_metrics_proto_msgTypes,
|
MessageInfos: file_bp2build_metrics_proto_msgTypes,
|
||||||
}.Build()
|
}.Build()
|
||||||
File_bp2build_metrics_proto = out.File
|
File_bp2build_metrics_proto = out.File
|
||||||
|
@@ -39,6 +39,9 @@ message Bp2BuildMetrics {
|
|||||||
// List of converted modules
|
// List of converted modules
|
||||||
repeated string convertedModules = 5;
|
repeated string convertedModules = 5;
|
||||||
|
|
||||||
|
// Unconverted modules, mapped to the reason the module was not converted.
|
||||||
|
map<string, UnconvertedReason> unconvertedModules = 11;
|
||||||
|
|
||||||
// Counts of converted modules by module type.
|
// Counts of converted modules by module type.
|
||||||
map<string, uint64> convertedModuleTypeCount = 6;
|
map<string, uint64> convertedModuleTypeCount = 6;
|
||||||
|
|
||||||
@@ -63,3 +66,40 @@ message Event {
|
|||||||
// The number of nanoseconds elapsed since start_time.
|
// The number of nanoseconds elapsed since start_time.
|
||||||
uint64 real_time = 3;
|
uint64 real_time = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
message UnconvertedReason {
|
||||||
|
// The type of reason that the module could not be converted.
|
||||||
|
UnconvertedReasonType type = 1;
|
||||||
|
|
||||||
|
// Descriptive details describing why the module could not be converted.
|
||||||
|
// This detail should be kept very short and should be in the context of
|
||||||
|
// the type. (Otherwise, this would significantly bloat metrics.)
|
||||||
|
string detail = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
enum UnconvertedReasonType {
|
||||||
|
// Bp2build does not know how to convert this specific module for some reason
|
||||||
|
// not covered by other reason types. The reason detail should explain the
|
||||||
|
// specific issue.
|
||||||
|
UNSUPPORTED = 0;
|
||||||
|
|
||||||
|
// The module was already defined in a BUILD file available in the source tree.
|
||||||
|
DEFINED_IN_BUILD_FILE = 1;
|
||||||
|
|
||||||
|
// The module was explicitly denylisted by name.
|
||||||
|
DENYLISTED = 2;
|
||||||
|
|
||||||
|
// The module's type has no bp2build implementation.
|
||||||
|
TYPE_UNSUPPORTED = 3;
|
||||||
|
|
||||||
|
// The module has a property not yet supported. The detail field should
|
||||||
|
// name the unsupported property name.
|
||||||
|
PROPERTY_UNSUPPORTED = 4;
|
||||||
|
|
||||||
|
// The module has an unconverted dependency. The detail should consist of
|
||||||
|
// the name of the unconverted module.
|
||||||
|
UNCONVERTED_DEP = 5;
|
||||||
|
|
||||||
|
// The module has a source file with the same name as the module itself.
|
||||||
|
SRC_NAME_COLLISION = 6;
|
||||||
|
}
|
Reference in New Issue
Block a user