bp2build: split Bazel conversion context into smaller ones,

and change TopDownMutatorContext signatures to use Bazel conversion context.

This minimizes the context interfaces/functions actually needed to
convert a module, and makes such interfaces easier to mock/test.

Test: CI
Change-Id: Id573d97023d59e06ef70e1f54437024d3f7aadbd
This commit is contained in:
Jingwen Chen
2021-11-02 06:40:51 +00:00
parent 80b6b64db5
commit 55bc820d66
4 changed files with 76 additions and 64 deletions

View File

@@ -498,7 +498,7 @@ type ProductConfigProperties map[string]map[string]ProductConfigProperty
// ProductVariableProperties returns a ProductConfigProperties containing only the properties which
// have been set for the module in the given context.
func ProductVariableProperties(ctx BaseMutatorContext) ProductConfigProperties {
func ProductVariableProperties(ctx BazelConversionPathContext) ProductConfigProperties {
module := ctx.Module()
moduleBase := module.base()