bazel-contrib / bazel-gazelle

Gazelle is a Bazel build file generator for Bazel projects. It natively supports Go and protobuf, and it may be extended to support new languages and custom rule sets.
Apache License 2.0
1.19k stars 378 forks source link

do not generate an empty rule if a go_proto_library was already gener… #1927

Closed davidbyttow closed 1 week ago

davidbyttow commented 3 weeks ago

What type of PR is this?

Bug fix

What package or component does this PR mostly affect?

language/go

What does this PR do? Why is it needed?

Prevents overwriting of a generated go_proto_library in the case where the package name matches the proto file name. See issue for more details.

Which issues(s) does this PR fix? Fixes #1926

Other notes for review Unclear exactly how to write a test for it, but did local testing at least.

davidbyttow commented 1 week ago

added tests