Toolchains are loaded in every configuration instead of a minimal number
- Dominant language
- Java
- Stars
- 25.8k
- Forks
- 4.6k
- Avg merge
- 2d 20h
- Merged PRs (30d)
- 72
Description
This is followup to #25160. After the new test toolchain type was added to the `test` exec group, we are seeing an increase in the total number of configured targets: this makes sense because the `test` exec group is now performing toolchain resolution when it wasn't before. Interestingly, we are seeing cases where the test toolchain type and related targets (constraint settings, constraint values, config settings, toolchains) are being analyzed in configurations where test trimming has happened.
It seems obvious (we should prove this) that the test exec group won't be used when the test configuration isn't present, so we should investigate a way to remove the `test` exec group from rules in this case.
Contributor guide
Research direction
Start by reading issue #25160 and tracing the test exec group, toolchain resolution, and test trimming paths in the Bazel source. Reproduce the increase in configured targets and verify whether the test exec group is unused when the test configuration is absent; completion means demonstrating the behavior and identifying a safe way to avoid that analysis.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100