Call protobuf_deps() ourselves instead of from upb_deps().

pull/13171/head
Joshua Haberman 3 years ago
parent e253b6ec03
commit 56c59c10ed
  1. 19
      WORKSPACE
  2. 22
      bazel/workspace_deps.bzl
  3. 3
      cmake/make_cmakelists.py

@ -1,27 +1,14 @@
workspace(name = "upb")
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
load("//bazel:workspace_defs.bzl", "system_python")
git_repository(
name = "com_google_protobuf",
commit = "2f91da585e96a7efe43505f714f03c7716a94ecb",
remote = "https://github.com/protocolbuffers/protobuf.git",
#strip_prefix = "protobuf-3.19.1",
patches = [
"//bazel:protobuf.patch",
],
patch_cmds = [
"rm python/google/protobuf/__init__.py",
"rm python/google/protobuf/pyext/__init__.py",
"rm python/google/protobuf/internal/__init__.py",
]
)
load("//bazel:workspace_deps.bzl", "upb_deps")
upb_deps()
load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps")
protobuf_deps()
http_archive(
name = "lua",
build_file = "//bazel:lua.BUILD",

@ -1,10 +1,7 @@
load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe")
# Any users of upb must define the protobuf repo must depend explicitly on
# protobuf prior to loading and calling upb_deps().
load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps")
def upb_deps():
maybe(
http_archive,
@ -14,6 +11,21 @@ def upb_deps():
sha256 = "bb2a0b57c92b6666e8acb00f4cbbfce6ddb87e83625fb851b0e78db581340617",
)
maybe(
git_repository,
name = "com_google_protobuf",
commit = "2f91da585e96a7efe43505f714f03c7716a94ecb",
remote = "https://github.com/protocolbuffers/protobuf.git",
patches = [
"//bazel:protobuf.patch",
],
patch_cmds = [
"rm python/google/protobuf/__init__.py",
"rm python/google/protobuf/pyext/__init__.py",
"rm python/google/protobuf/internal/__init__.py",
]
)
rules_python_version = "740825b7f74930c62f44af95c9a4c1bd428d2c53" # Latest @ 2021-06-23
maybe(
@ -30,5 +42,3 @@ def upb_deps():
strip_prefix = "bazel-skylib-main",
urls = ["https://github.com/bazelbuild/bazel-skylib/archive/main.tar.gz"],
)
protobuf_deps()

@ -217,6 +217,9 @@ class WorkspaceFileFunctions(object):
def upb_deps(self):
pass
def protobuf_deps(self):
pass
def rules_fuzzing_dependencies(self):
pass

Loading…
Cancel
Save