Skip to content

Commit ee1daaf

Browse files
ShreeM01fmeumkeertk
authored
[6.1.0]Only fetch @remote_coverage_tools when collecting coverage (bazelbuild#17287)
* Only fetch @remote_coverage_tools when collecting coverage Before this change, every test rule had an implicit dependency on `@bazel_tools//tools/test:coverage_report_generator`, even though this tool is only used when collecting coverage. This is fixed by moving it to `CoverageOptions` and using the late-bound default resolver to only create a dependency if coverage is enabled. Also adds `CoverageOptions` to the set of options classes trimmed by `--trim_test_configuration` so that, as before, changing `--coverage_report_generator` doesn't cause non-test rules to be reanalyzed. This behavior now extends to `--coverage_output_generator`. Fixes bazelbuild#15088 Closes bazelbuild#16995. PiperOrigin-RevId: 498949871 Change-Id: I2440fae2655bbb701e918ee2aa7acb008d8f97ed * Update BUILD --------- Co-authored-by: Fabian Meumertzheim <fabian@meumertzhe.im> Co-authored-by: keertk <110264242+keertk@users.noreply.github.com>
1 parent 1a438b4 commit ee1daaf

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

  • src/main/java/com/google/devtools/build/lib

src/main/java/com/google/devtools/build/lib/analysis/BUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2541,7 +2541,7 @@ java_library(
25412541
"//src/main/java/com/google/devtools/build/lib/concurrent",
25422542
"//src/main/java/com/google/devtools/build/lib/starlarkbuildapi/test",
25432543
"//src/main/java/com/google/devtools/common/options",
2544-
"//third_party:jsr305",
2544+
"//third_party:jsr305_checked_in",
25452545
],
25462546
)
25472547

src/main/java/com/google/devtools/build/lib/rules/BUILD

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ java_library(
5959
"//src/main/java/com/google/devtools/build/lib/actions",
6060
"//src/main/java/com/google/devtools/build/lib/actions:artifacts",
6161
"//src/main/java/com/google/devtools/build/lib/analysis:analysis_cluster",
62+
"//src/main/java/com/google/devtools/build/lib/analysis:configured_target",
6263
"//src/main/java/com/google/devtools/build/lib/analysis:test/coverage_configuration",
6364
"//src/main/java/com/google/devtools/build/lib/analysis:test/test_configuration",
6465
"//src/main/java/com/google/devtools/build/lib/analysis:test/test_trimming_transition_factory",

0 commit comments

Comments
 (0)