Open shahms opened 1 year ago
Interesting! Were the old values generated with the gazelle plugin?
No, these were hand-written rules originally. I'm trying to enable gazelle support for them so we can stop hand-writing so much :-)
It appears to be because these are files which define a rule which is itself a test rule, thus the files end in "_test.bzl" and are (erroneously) ignored due to: https://github.com/bazelbuild/bazel-skylib/blob/288731ef9f7f688932bd50e704a91a45ec185f9b/gazelle/bzl/gazelle.go#L51
Very interesting find! I believe the logic behind that is that it is possible to make bzl_library
tests a la this.
I'm curious what your thoughts on this are? Would you be amenable to naming the file java_verifier.bzl
or cc_indexer.bzl
?
yeah, it's just a lot of work to update all of the references
You don't want an excuse to fire up rosie 😉 ?
I hit this case too, we have a file called swift_binary_test.bzl
which contains a swift_binary
and swift_test
rule
When running the bzl_library Gazelle plugin over https://github.com/kythe/kythe/blob/master/tools/build_rules/verifier_test/BUILD it ends up modifying that file to just delete the
srcs
attribute from the respectivebzl_library
targets and it's not obvious to me why.