You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Does this issue reproduce with the latest releases of all the above?
Yes
What operating system and processor architecture are you using?
macOS Intel
What did you do?
git clone git@github.com:buildbarn/bb-storage.git
cd bb-storage
bazel run //:gazelle
git status
What did you expect to see?
That the Git checkout remains unmodified.
What did you see instead?
I see that Gazelle prints a whole bunch of warnings having this shape:
gazelle: rule //cmd/bb_copy:bb_copy_lib imports "github.com/buildbarn/bb-storage/pkg/proto/configuration/bb_copy" which matches multiple rules: //pkg/proto/configuration/bb_copy:buildbarn_configuration_bb_copy_go_proto and //pkg/proto/configuration/bb_copy. # gazelle:resolve may be used to disambiguate
I also see that all of my BUILD files for packages containing Protobuf files are altered to no longer depend on the go_proto_library(), but on the existing .pb.go files:
Furthermore, all code that depends on these libraries have their dependencies removed.
Oddly enough, if I first remove the BUILD files belonging to the Protobuf files and then run Gazelle, everything works as expected:
rm -f $(find . -name '*.pb.go'| sed -e 's/[^/]*$/BUILD.bazel/')
bazel run //:gazelle
git status
It's really just that if both the BUILD file AND the .pb.go source files are present, that Bazel misbehaves. In my case I want to check in the resulting .pb.go files as well, so that third parties can easily depend on this repository. This did work as expected in previous versions of Bazel/Gazelle (that did not use bzlmod).
The text was updated successfully, but these errors were encountered:
What version of gazelle are you using?
0.35.0
What version of rules_go are you using?
0.46.0
What version of Bazel are you using?
7.1.1
Does this issue reproduce with the latest releases of all the above?
Yes
What operating system and processor architecture are you using?
macOS Intel
What did you do?
git clone git@github.com:buildbarn/bb-storage.git cd bb-storage bazel run //:gazelle git status
What did you expect to see?
That the Git checkout remains unmodified.
What did you see instead?
I see that Gazelle prints a whole bunch of warnings having this shape:
I also see that all of my BUILD files for packages containing Protobuf files are altered to no longer depend on the go_proto_library(), but on the existing .pb.go files:
Furthermore, all code that depends on these libraries have their dependencies removed.
Oddly enough, if I first remove the BUILD files belonging to the Protobuf files and then run Gazelle, everything works as expected:
rm -f $(find . -name '*.pb.go' | sed -e 's/[^/]*$/BUILD.bazel/') bazel run //:gazelle git status
It's really just that if both the BUILD file AND the .pb.go source files are present, that Bazel misbehaves. In my case I want to check in the resulting .pb.go files as well, so that third parties can easily depend on this repository. This did work as expected in previous versions of Bazel/Gazelle (that did not use bzlmod).
The text was updated successfully, but these errors were encountered: