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
{{ message }}
Repository navigation
generate: python renames an existing python_library to the file-derived name (part of #9237) #9297
When a python_library already owns a source but has a name other than the one generate derives from the file, generate deletes it and adds a new target with the derived name. Labels that point at the old name break.
Found in #9279 (review on #9237): python/rules/BUILD.bazel has
Generate replaces it with python_library(name = "dx_bench_plugin", ...), but python/rules/defs.bzl:140 adds Label("//python/rules:bench_plugin") to every python_benchmark, so all benchmarks (for example //python/tests/fixtures/hello:parse_bench) fail analysis.
proposes 4 edits to python/rules/BUILD.bazel; --apply removes bench_plugin and adds dx_bench_plugin.
Minimal case: a package with foo.py and python_library(name = "bar", srcs = ["foo.py"]). Generate renames it to foo.
Fix
Match existing rules by the sources they own before naming, as other extensions do for existing targets, so a library that already claims foo.py keeps its name.
Activity
gazelle python: keep the name of an existing library that owns a sour…
gazelle python: keep the name of an existing library that owns a sour…