Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 1 addition & 50 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,6 @@ internal_dev_deps = use_extension(
# See //scala/private:extensions/dev_deps.bzl for notes on some of these repos.
use_repo(
internal_dev_deps,
"com_github_bazelbuild_buildtools",
"com_github_jnr_jffi_native",
"com_google_guava_guava_21_0",
"com_google_guava_guava_21_0_with_file",
Expand Down Expand Up @@ -255,54 +254,6 @@ bazel_dep(
dev_dependency = True,
repo_name = "bazelci_rules",
)
bazel_dep(
name = "rules_go",
version = "0.58.2",
dev_dependency = True,
repo_name = "io_bazel_rules_go", # for com_github_bazelbuild_buildtools
)
bazel_dep(name = "gazelle", version = "0.45.0", dev_dependency = True)

go_sdk = use_extension(
"@io_bazel_rules_go//go:extensions.bzl",
"go_sdk",
dev_dependency = True,
)
go_sdk.download(version = "1.25.3")

go_deps = use_extension(
"@gazelle//:extensions.bzl",
"go_deps",
dev_dependency = True,
)

# The go_deps.module calls are inspired by the following to get the
# com_github_bazelbuild_buildtools repo to work:
#
# - https://github.com/bazelbuild/bazel-central-registry/blob/main/modules/gazelle/0.39.1/MODULE.bazel#L31-L57
#
# To get the latest version and hashes for each per:
#
# - https://go.dev/ref/mod#go-list-m
# - https://go.dev/ref/mod#checksum-database
#
# go list -m golang.org/x/tools@latest
# curl https://sum.golang.org/lookup/golang.org/x/[email protected]
go_deps.module(
path = "golang.org/x/tools",
sum = "h1:Hx2Xv8hISq8Lm16jvBZ2VQf+RLmbd7wVUsALibYI/IQ=",
version = "v0.38.0",
)
go_deps.module(
path = "github.com/golang/protobuf",
sum = "h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek=",
version = "v1.5.4",
)
use_repo(
go_deps,
"com_github_golang_protobuf",
"org_golang_x_tools",
)

bazel_dep(name = "buildifier_prebuilt", version = "8.2.0.2", dev_dependency = True)
bazel_dep(name = "rules_python", version = "1.6.3", dev_dependency = True)
bazel_dep(name = "rules_shell", version = "0.6.1", dev_dependency = True)
18 changes: 2 additions & 16 deletions MODULE.bazel.lock

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

36 changes: 17 additions & 19 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -104,25 +104,6 @@ local_repository(
path = "third_party/test/example_external_workspace",
)

http_archive(
name = "io_bazel_rules_go",
sha256 = "54bbb67a4196170cc60ef3b52a2747ad1759cba4764b4c4752b744080ad99947",
urls = [
"https://mirror.bazel.build/github.com/bazel-contrib/rules_go/releases/download/v0.58.2/rules_go-v0.58.2.zip",
"https://github.com/bazel-contrib/rules_go/releases/download/v0.58.2/rules_go-v0.58.2.zip",
],
)

load(
"@io_bazel_rules_go//go:deps.bzl",
"go_register_toolchains",
"go_rules_dependencies",
)

go_rules_dependencies()

go_register_toolchains(version = "1.25.3")

http_archive(
name = "bazelci_rules",
sha256 = "eca21884e6f66a88c358e580fd67a6b148d30ab57b1680f62a96c00f9bc6a07e",
Expand All @@ -132,6 +113,23 @@ http_archive(

load("@bazelci_rules//:rbe_repo.bzl", "rbe_preconfig")

buildifier_prebuilt_version = "8.2.0.2"

http_archive(
name = "buildifier_prebuilt",
sha256 = "f98dd3d8f32661629b8cab11f02d7730bb8e03bd8af09dbbb268047889c8ff10",
strip_prefix = "buildifier-prebuilt-{}".format(buildifier_prebuilt_version),
urls = ["http://github.com/keith/buildifier-prebuilt/archive/{}.tar.gz".format(buildifier_prebuilt_version)],
)

load("@buildifier_prebuilt//:deps.bzl", "buildifier_prebuilt_deps")

buildifier_prebuilt_deps()

load("@buildifier_prebuilt//:defs.bzl", "buildifier_prebuilt_register_toolchains")

buildifier_prebuilt_register_toolchains()

rbe_preconfig(
name = "rbe_default",
toolchain = "ubuntu2004-bazel-java11",
Expand Down
13 changes: 0 additions & 13 deletions scala/private/extensions/dev_deps.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -43,19 +43,6 @@ def dev_deps_repositories(
fetch_sources: retrieve Maven artifact sources when True
"""

# gazelle is still getting `buildtools` from its `go.mod` file, which breaks
# `bazel run //tools:lint_check` when we don't import it like this. See:
# - https://github.com/bazel-contrib/bazel-gazelle/blob/v0.43.0/MODULE.bazel#L32-L44
http_archive(
name = "com_github_bazelbuild_buildtools",
integrity = _BUILD_TOOLS_INTEGRITY,
strip_prefix = "buildtools-%s" % _BUILD_TOOLS_RELEASE,
url = (
"https://github.com/bazelbuild/buildtools/archive/v%s.tar.gz" %
_BUILD_TOOLS_RELEASE
),
)

# bazel's java_import_external has been altered in rules_scala to be a macro
# based on jvm_import_external in order to allow for other jvm-language
# imports (e.g. scala_import) the 3rd-party dependency below is using the
Expand Down
6 changes: 1 addition & 5 deletions tools/BUILD
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
load(
"@com_github_bazelbuild_buildtools//buildifier:def.bzl",
"buildifier",
"buildifier_test",
)
load("@buildifier_prebuilt//:rules.bzl", "buildifier", "buildifier_test")

WARNINGS_CONFIG = [
"-module-docstring",
Expand Down