Skip to content

Commit

Permalink
fix: add missing bzl_library declaration and dep (#1633)
Browse files Browse the repository at this point in the history
* fix: add missing bzl_library declaration and dep

* Update tests/bcr/MODULE.bazel.lock
  • Loading branch information
cgrindel authored Sep 13, 2023
1 parent 8522970 commit f22b66e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
1 change: 1 addition & 0 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ bzl_library(
"//internal:go_repository",
"//internal:overlay_repository",
"//internal/generationtest",
"@bazel_gazelle_is_bazel_module//:defs",
"@bazel_skylib//lib:shell",
],
)
Expand Down
10 changes: 9 additions & 1 deletion internal/is_bazel_module.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,15 @@

def _is_bazel_module_impl(repository_ctx):
repository_ctx.file("WORKSPACE")
repository_ctx.file("BUILD")
repository_ctx.file("BUILD", """\
load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
bzl_library(
name = "defs",
srcs = ["defs.bzl"],
visibility = ["//visibility:public"],
)
""")
repository_ctx.file("defs.bzl", "GAZELLE_IS_BAZEL_MODULE = {}".format(
repr(repository_ctx.attr.is_bazel_module),
))
Expand Down
2 changes: 1 addition & 1 deletion tests/bcr/MODULE.bazel.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f22b66e

Please sign in to comment.