Merge "Small readability refactor for bp2buildDepsMutator." into main am: d9cc9ec2ea
am: 7c738120f9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2774747 Change-Id: I0418fbbe976cf8a6a2db71615885cdbdb4d735e4 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
commit
f14e69b82a
1 changed files with 17 additions and 5 deletions
|
@ -693,15 +693,27 @@ func bp2buildDepsMutator(ctx BottomUpMutatorContext) {
|
||||||
|
|
||||||
if len(ctx.Module().GetMissingBp2buildDeps()) > 0 {
|
if len(ctx.Module().GetMissingBp2buildDeps()) > 0 {
|
||||||
exampleDep := ctx.Module().GetMissingBp2buildDeps()[0]
|
exampleDep := ctx.Module().GetMissingBp2buildDeps()[0]
|
||||||
ctx.MarkBp2buildUnconvertible(bp2build_metrics_proto.UnconvertedReasonType_UNCONVERTED_DEP, exampleDep)
|
ctx.MarkBp2buildUnconvertible(
|
||||||
|
bp2build_metrics_proto.UnconvertedReasonType_UNCONVERTED_DEP, exampleDep)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Transitively mark modules unconvertible with the following set of conditions.
|
||||||
ctx.VisitDirectDeps(func(dep Module) {
|
ctx.VisitDirectDeps(func(dep Module) {
|
||||||
if dep.base().GetUnconvertedReason() != nil &&
|
if dep.base().GetUnconvertedReason() == nil {
|
||||||
dep.base().GetUnconvertedReason().ReasonType != int(bp2build_metrics_proto.UnconvertedReasonType_DEFINED_IN_BUILD_FILE) &&
|
return
|
||||||
ctx.OtherModuleDependencyTag(dep) == Bp2buildDepTag {
|
|
||||||
ctx.MarkBp2buildUnconvertible(bp2build_metrics_proto.UnconvertedReasonType_UNCONVERTED_DEP, dep.Name())
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if dep.base().GetUnconvertedReason().ReasonType ==
|
||||||
|
int(bp2build_metrics_proto.UnconvertedReasonType_DEFINED_IN_BUILD_FILE) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if ctx.OtherModuleDependencyTag(dep) != Bp2buildDepTag {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
ctx.MarkBp2buildUnconvertible(
|
||||||
|
bp2build_metrics_proto.UnconvertedReasonType_UNCONVERTED_DEP, dep.Name())
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue