Open jschaf opened 5 months ago
Could you send a PR that adds a reproducer for this to some subdirectory of https://github.com/bazelbuild/bazel-gazelle/tree/master/tests/bcr/go_mod/proto, which uses a non-io_bazel_rules_go
repo name? Then I could work on a fix. I have trouble reproducing this right now.
What version of gazelle are you using?
0.37.0
What version of rules_go are you using?
0.48.0
What version of Bazel are you using?
7.2.0rc3
Does this issue reproduce with the latest releases of all the above?
Yes
What operating system and processor architecture are you using?
macOS arm64
What did you do?
I manually replaced all instances of
io_bazel_rules_go
torules_go
in my repo.I removed the repo_name from the
rules_go
bazel dep in MODULE.bazel.What did you expect to see?
Running gazelle should do nothing.
What did you see instead?
Gazelle removed the
go_library.embed
for everygo_proto_library
embedded into ago_library
.Before
After
Debugging
The problem might be that `io_bazel_rules_go is hardcoded: https://github.com/bazelbuild/bazel-gazelle/blob/7d10bf7befce477f518056cfc502939000bea3fa/config/constants.go#L22