In the native rules we have the late-bound attribute :lcov_merger which looks at the build configuration to see if coverage is enabled and returns the label of CoverageOutputGenerator or null (see BaseRuleClasses#115).
We need the Starlark rules to be able to define _lcov_merger as a late bound attribute in the same way. For this to happen, the CoverageOutputGenerators label has to be exposed on a class that extends BuildConfiguration.Fragment.
This is helpful for example for rules_go (see #8670), in order for go_test to be compatible with bazel's native test rules (e.g. java_test, cc_test).
In the native rules we have the late-bound attribute
:lcov_mergerwhich looks at the build configuration to see if coverage is enabled and returns the label ofCoverageOutputGeneratoror null (see BaseRuleClasses#115).We need the Starlark rules to be able to define
_lcov_mergeras a late bound attribute in the same way. For this to happen, theCoverageOutputGenerators label has to be exposed on a class that extends BuildConfiguration.Fragment.This is helpful for example for
rules_go(see #8670), in order forgo_testto be compatible with bazel's native test rules (e.g.java_test,cc_test).