Skip to content

Commit 25e5eda

Browse files
committed
bare minimum for linking modules_mapping
1 parent 3c88a5b commit 25e5eda

File tree

3 files changed

+15
-2
lines changed

3 files changed

+15
-2
lines changed

docs/BUILD.bazel

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,15 @@ build_test(
8282
targets = [":docs"],
8383
)
8484

85+
alias(
86+
name = "gazelle_modules_mapping_def_bzl",
87+
actual = "@rules_python_gazelle_plugin//modules_mapping:def_bzl",
88+
)
89+
8590
sphinx_stardocs(
8691
name = "bzl_api_docs",
8792
srcs = [
93+
":gazelle_modules_mapping_def_bzl",
8894
"//python:defs_bzl",
8995
"//python:features_bzl",
9096
"//python:packaging_bzl",

gazelle/docs/installation_and_usage.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ bazel_dep(name = "rules_python_gazelle_plugin", version = "1.5.1")
6161

6262
Next, we'll fetch metadata about your Python dependencies, so that gazelle can
6363
determine which package a given import statement comes from. This is provided
64-
by the `modules_mapping` rule. We'll make a target for consuming this
65-
`modules_mapping`, and writing it as a manifest file for Gazelle to read.
64+
by the {bzl:obj}`modules_mapping` rule. We'll make a target for consuming this
65+
{bzl:obj}`modules_mapping`, and writing it as a manifest file for Gazelle to read.
6666
This is checked into the repo for speed, as it takes some time to calculate
6767
in a large monorepo.
6868

gazelle/modules_mapping/BUILD.bazel

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
12
load("@bazel_skylib//rules:copy_file.bzl", "copy_file")
23
load("@rules_python//python:defs.bzl", "py_binary", "py_test")
34

@@ -38,3 +39,9 @@ filegroup(
3839
srcs = glob(["**"]),
3940
visibility = ["//:__pkg__"],
4041
)
42+
43+
bzl_library(
44+
name = "def_bzl",
45+
srcs = ["def.bzl"],
46+
visibility = ["//visibility:public"],
47+
)

0 commit comments

Comments
 (0)