bazel-contrib / bazel-contrib/target-determinator
Should driver rebuild non-test targets?
- Dominant language
- Go
- Stars
- 182
- Forks
- 33
- PR merge metrics
- No merged PRs in 30d
Description
The `driver` tool works great for running tests that were affected by changes. However, targets that are not dependencies of any test target, will be skipped. If we were to gate using this driver, we would not catch compile errors on non-test targets.
Should the driver be extended to also build non-test targets? Non-test targets are correctly identified by `target_determinator` but appear skipped by the driver. For our CI, I'm thinking of using `target_determinator` to get all the targets, then writing our own driver that does both build / test (not just test).
The [commandVerb](https://github.com/bazel-contrib/target-determinator/blob/1b4a6495ecd7bcba90d6c039153342bcdc3703cd/driver/driver.go#L59) does start out as `build` , but it seems like a single test target will turn the command to `test`? I wonder if it would be better to split the targets by build / test targets. Or in my case, I might try to run all the targets as `build` then all the targets as `test`.
Thoughts?
Contributor guide
Research direction
Start with driver/driver.go around commandVerb and trace how target_determinator results become build or test commands. Check how non-test targets are currently skipped, then clarify whether completion means separate build and test invocations or another behavior; the issue does not define a final approach or name tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- build-system, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100