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?
Linux/amd64
What did you do?
We use map_kind directive to replace go_binary and go_library kind rules (with different names).
When all Go files are removed from the package and we execute gazelle, go_* rules are not removed from the BUILD file.
* fix: language/go: fileContainsGoBinary() doesn't interprete correctly KindMap
With this directive `# gazelle:map_kind OLD NEW NEW_LOAD`,
c.KindMap should be equal:
"OLD": {
FromKind: "OLD",
KindName: "NEW",
KindLoad: "NEW_LOAD",
}
`fileContainsGoBinary()` should search directly the mapping
for the `go_binary` kind rule.
Issue #1440
* fix: map_kind should also be applied on empty rules
If `map_kind` is not applied on empty rules returned
by GenerateRules(), all mapped rules can't be removed
from the BUILD file.
Close#1440
* fix: language/go: fileContainsGoBinary() doesn't interprete correctly KindMap
With this directive `# gazelle:map_kind OLD NEW NEW_LOAD`,
c.KindMap should be equal:
"OLD": {
FromKind: "OLD",
KindName: "NEW",
KindLoad: "NEW_LOAD",
}
`fileContainsGoBinary()` should search directly the mapping
for the `go_binary` kind rule.
Issue bazel-contrib#1440
* fix: map_kind should also be applied on empty rules
If `map_kind` is not applied on empty rules returned
by GenerateRules(), all mapped rules can't be removed
from the BUILD file.
Closebazel-contrib#1440
What version of gazelle are you using?
0.29.0
What version of rules_go are you using?
v0.38.1
What version of Bazel are you using?
6.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
What did you do?
We use
map_kind
directive to replacego_binary
andgo_library
kind rules (with different names).When all Go files are removed from the package and we execute gazelle,
go_*
rules are not removed from theBUILD
file.Example:
What did you expect to see?
What did you see instead?
The text was updated successfully, but these errors were encountered: