Turn on bp2build_deps by default

This prevents bp2buld conversion of modules which have transitive deps
that are not converted.

This does not change most allowlist semantics -- that change is still to
come. As a result, this effectively removes conversion of a few modules
which were previously converted under old semantics, however, these
modules are not currently used in any meaningful bazel builds, and will
be fixed at a later time.

Test: bp2build.sh
Test: m nothing
Test: manually spotchecked allowlisted modules in metrics to ensure the
diffs were minor
Test: manually verified bp2build performance regresses by about 0.4s

Change-Id: Id5c44fa5394917b28a3e707a81555b9e467d6621
This commit is contained in:
Chris Parsons
2023-10-10 02:40:51 +00:00
parent 69cf8a3221
commit d43be7c704
5 changed files with 0 additions and 70 deletions

View File

@@ -1058,50 +1058,6 @@ func TestModuleTypeBp2Build(t *testing.T) {
}),
},
},
{
Description: "depends_on_other_unconverted_module_error",
ModuleTypeUnderTest: "filegroup",
ModuleTypeUnderTestFactory: android.FileGroupFactory,
UnconvertedDepsMode: errorModulesUnconvertedDeps,
Blueprint: `filegroup {
name: "foobar",
srcs: [
":foo",
"c",
],
bazel_module: { bp2build_available: true },
}`,
ExpectedErr: fmt.Errorf(`filegroup .:foobar depends on unconverted modules: foo`),
Filesystem: map[string]string{
"other/Android.bp": `filegroup {
name: "foo",
srcs: ["a", "b"],
}`,
},
},
{
Description: "depends_on_other_missing_module_error",
ModuleTypeUnderTest: "filegroup",
ModuleTypeUnderTestFactory: android.FileGroupFactory,
UnconvertedDepsMode: errorModulesUnconvertedDeps,
Blueprint: `filegroup {
name: "foobar",
srcs: [
"c",
"//other:foo",
"//other:goo",
],
bazel_module: { bp2build_available: true },
}`,
ExpectedErr: fmt.Errorf(`filegroup .:foobar depends on missing modules: //other:goo`),
Filesystem: map[string]string{"other/Android.bp": `filegroup {
name: "foo",
srcs: ["a"],
bazel_module: { bp2build_available: true },
}
`,
},
},
}
for _, testCase := range testCases {
@@ -2119,7 +2075,6 @@ func TestBp2buildDepsMutator_missingTransitiveDep(t *testing.T) {
Blueprint: bp,
ExpectedBazelTargets: expectedBazelTargets,
Description: "Skipping conversion of a target with missing transitive dep",
DepsMutator: true,
})
}
@@ -2157,7 +2112,6 @@ func TestBp2buildDepsMutator_missingDirectDep(t *testing.T) {
Blueprint: bp,
ExpectedBazelTargets: expectedBazelTargets,
Description: "Skipping conversion of a target with missing direct dep",
DepsMutator: true,
})
}
@@ -2180,7 +2134,6 @@ func TestBp2buildDepsMutator_unconvertedDirectDep(t *testing.T) {
Blueprint: bp,
ExpectedBazelTargets: []string{},
Description: "Skipping conversion of a target with unconverted direct dep",
DepsMutator: true,
})
}
@@ -2219,7 +2172,6 @@ func TestBp2buildDepsMutator_unconvertedTransitiveDep(t *testing.T) {
Blueprint: bp,
ExpectedBazelTargets: expectedBazelTargets,
Description: "Skipping conversion of a target with unconverted transitive dep",
DepsMutator: true,
})
}
@@ -2259,7 +2211,6 @@ func TestBp2buildDepsMutator_alreadyExistsBuildDeps(t *testing.T) {
Blueprint: bp,
ExpectedBazelTargets: expectedBazelTargets,
Description: "Convert target with already-existing build dep",
DepsMutator: true,
})
}
@@ -2301,6 +2252,5 @@ func TestBp2buildDepsMutator_depOnLibc(t *testing.T) {
Blueprint: bp,
ExpectedBazelTargets: expectedBazelTargets,
Description: "Convert target with dep on libc",
DepsMutator: true,
})
}