bazel-contrib / target-determinator

Determines which Bazel targets were affected between two git commits.
Apache License 2.0
144 stars 22 forks source link

Provide an option to override bazel command #80

Closed alokpr closed 3 months ago

alokpr commented 9 months ago

The driver runs 'build' or 'test' depending on the target type. The 'test' command however does not make sense for some build configs like clang-tidy which only performs static analysis.

The driver should provide a 'command' option which can be set to either 'build' or 'auto' (current behavior)

alokpr commented 9 months ago

Happy to send PR if the feature request sounds reasonable

illicitonion commented 9 months ago

I think this sounds reasonable and would gladly review a PR for it :)

This is about the limit of the kind of complexity/configurability I think is reasonable to add to driver though - in general driver is intended as more of an example which may work for simple use-cases. If you're looking to add much more functionality to it, I'd consider writing your own tool which uses the WalkAffectedTargets API (which is intended as a building block for a more complex CI driver), as in my experience everyone wants slightly different CI set-ups.

illicitonion commented 3 months ago

Fixed in https://github.com/bazel-contrib/target-determinator/pull/92