Skip to content

Instantly share code, notes, and snippets.

@brandonchinn178
Last active August 15, 2025 23:10
Show Gist options
  • Save brandonchinn178/91e838e9eee1fbad64c1467ac0219369 to your computer and use it in GitHub Desktop.
Save brandonchinn178/91e838e9eee1fbad64c1467ac0219369 to your computer and use it in GitHub Desktop.
Repro for rules_python#3183
Repro for https://github.com/bazel-contrib/rules_python/issues/3183
`bazel run //:gazelle`
load("@gazelle//:def.bzl", "gazelle", "gazelle_binary")
load(":macros.bzl", "my_py_library")
# gazelle:alias_kind my_py_library py_library
gazelle(
name = "gazelle",
gazelle = ":gazelle_multilang",
)
gazelle_binary(
name = "gazelle_multilang",
languages = ["@rules_python_gazelle_plugin//python"],
)
my_py_library(
name = "foo",
srcs = ["foo.py"],
)
def foo():
print("hello world")
load("@rules_python//python:py_library.bzl", "py_library")
my_py_library = py_library
bazel_dep(name = "gazelle", version = "0.45.0")
bazel_dep(name = "rules_python", version = "1.5.3")
bazel_dep(name = "rules_python_gazelle_plugin", version = "1.5.3")
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.defaults(python_version = "3.13")
python.toolchain(python_version = "3.13")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment