bazel-contrib / target-determinator

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

target-determinator does not evaluate aliases as changed #63

Closed mark-thm closed 1 year ago

mark-thm commented 1 year ago

In my project I have a setup akin to:

py_library(
  name = "foo"
  ...
)

alias(name = "bar", actual = ":foo")

When I've made changes that invalidate foo and running:

target-determinator -targets //foo HEAD~1

I observe, correctly that //foo has been identified as a changed target.

However, for the same changeset that invalidates foo and running:

target-determinator -targets //bar HEAD~1

//bar is not listed as changed.

illicitonion commented 1 year ago

Good find, this is a weird intersection of Bazel bugs! https://github.com/bazel-contrib/target-determinator/pull/64 should fix it up.

illicitonion commented 1 year ago

The fix for this was just released in v0.20.0 - thanks again for the bug report!