-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Bazel
buildtools
dependency (#4980)
* Fix Bazel module dependencies * Import bazelbuild manually instead of through Gazelle
- Loading branch information
Showing
3 changed files
with
80 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
"""Module extension for non-module dependencies.""" | ||
|
||
load("@bazel_gazelle//:deps.bzl", "go_repository") | ||
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") | ||
|
||
def _non_module_deps_impl( | ||
# buildifier: disable=unused-variable | ||
mctx): | ||
# TODO(bazelbuild/buildtools#1204): Remove when available as module. | ||
go_repository( | ||
name = "org_golang_x_tools", | ||
importpath = "golang.org/x/tools", | ||
sum = "h1:vU5i/LfpvrRCpgM/VPfJLg5KjxD3E+hfT1SH+d9zLwg=", | ||
version = "v0.21.1-0.20240508182429-e35e4ccd0d2d", | ||
) | ||
http_archive( | ||
name = "com_github_bazelbuild_buildtools", | ||
sha256 = "42968f9134ba2c75c03bb271bd7bb062afb7da449f9b913c96e5be4ce890030a", | ||
strip_prefix = "buildtools-6.3.3", | ||
urls = ["https://github.com/bazelbuild/buildtools/archive/v6.3.3.tar.gz"], | ||
) | ||
|
||
non_module_deps = module_extension( | ||
implementation = _non_module_deps_impl, | ||
) |