bazel-diff
bazel-diff copied to clipboard
Change in rule attribute not detected
Hello! I've noticed that one type of change isn't detected by bazel-diff. The situation is as follows: We have a custom rule that has a tool has a default executable attribute that looks something like this.
def _my_rule_impl(ctx):
# TODO
_my_rule = rule(
implementation = _my_rule_impl,
attrs = {
"_tool": attr.label(
default = "//tools/release:ios_release",
executable = True,
cfg = "host",
),
},
executable = True,
)
def my_rule(name, **args):
_my_rule(name, **args)
I can see in a diff that changes to //tools/release:ios_release
are correctly identified, but I would expect also all my_rule
definitions to show up in the diff since they all depend on //tools/release:ios_release
, but they're not.
Hello @BalestraPatrick ! Thanks for the report. Do you have a small sample repo I can work with? Makes it easier to debug what is going on.
Hey @tinder-maxwellelliott! I have an example project that tries to reproduce exactly what I'm seeing in my project but the bug isn't reproducible. There must be something slightly different in my project, so I'll have to dig more and see if I can reproduce it fully in the example project.
Hey @BalestraPatrick, did you manage to figure this out? I'm having the same issue and I'm not able to reproduce it in a fresh repo.
I believe this should be resolved now using https://github.com/Tinder/bazel-diff/commit/5b29fb65defd0757f49708fe664954df9d8e1d48