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
I expected to see the usual behavior of gazelle for protos, except load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library") would be replaced by load("//bazel:go_proto_library.bzl", "go_proto_library").
What did you see instead?
When gazelle is first run, the behavior is as I would expect. When gazelle is run again, go_library entries disappear from BUILD.bazel files.
example/proto/BUILD.bazel after first //:gazelle run:
git clone https://github.com/gonzojive/gazelle-idempotency-bug
cd gazelle-idempotency-bug
SOURCE_REPO_PATH=$PWD go test gazelletest/gazelletest_test.go
The text was updated successfully, but these errors were encountered:
What version of rules_go are you using?
0.51.0
What version of gazelle are you using?
0.40.0
What version of Bazel are you using?
8.0.0
Does this issue reproduce with the latest releases of all the above?
Yes
What operating system and processor architecture are you using?
Linux amd64 (Ubuntu)
Any other potentially useful information about your toolchain?
n/a
What did you do?
I tried to use a custom
go_proto_library
macro using map kind in the rootBUILD.bazel
file:# gazelle:map_kind go_proto_library go_proto_library //bazel:go_proto_library.bzl
What did you expect to see?
I expected to see the usual behavior of gazelle for protos, except
load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
would be replaced byload("//bazel:go_proto_library.bzl", "go_proto_library")
.What did you see instead?
When gazelle is first run, the behavior is as I would expect. When gazelle is run again, go_library entries disappear from BUILD.bazel files.
example/proto/BUILD.bazel
after first //:gazelle run:After second //:gazelle run:
Reproduction
I created a repo for reproducing the issue: https://github.com/gonzojive/gazelle-idempotency-bug
The text was updated successfully, but these errors were encountered: