aboutsummaryrefslogtreecommitdiff
path: root/WORKSPACE
diff options
context:
space:
mode:
authorOla Rozenfeld <olaola@google.com>2019-10-08 19:36:51 +0100
committerGitHub <noreply@github.com>2019-10-08 19:36:51 +0100
commit588697e81791b191f4a8054e2797f0a6e458e454 (patch)
tree8a8ea8c0d8dbd7283144ff6dc341ca06f5278225 /WORKSPACE
parent4f46bfd2f8ab3354002610f0976f78ad2b68deba (diff)
downloadbazelbuild-remote-apis-588697e81791b191f4a8054e2797f0a6e458e454.tar.gz
Upgrading to latest dependency versions. (#97)
Also trying to conditionally load Go dependencies only if Go is selected. Also some minor refactoring/cleanups.
Diffstat (limited to 'WORKSPACE')
-rw-r--r--WORKSPACE89
1 files changed, 39 insertions, 50 deletions
diff --git a/WORKSPACE b/WORKSPACE
index 2d963f2..93da064 100644
--- a/WORKSPACE
+++ b/WORKSPACE
@@ -2,55 +2,51 @@ workspace(name = "bazel_remote_apis")
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
-load("//:repository_rules.bzl", "switched_rules_by_language")
-switched_rules_by_language(
- name = "bazel_remote_apis_imports",
- go = True,
- java = True,
- cc = True,
-)
-
-# Needed for protobuf.
+# Pull in go rules, which we need selectively pull in Go dependencies.
http_archive(
- name = "bazel_skylib",
- # Commit f83cb8dd6f5658bc574ccd873e25197055265d1c of 2018-11-26
- sha256 = "ba5d15ca230efca96320085d8e4d58da826d1f81b444ef8afccd8b23e0799b52",
- strip_prefix = "bazel-skylib-f83cb8dd6f5658bc574ccd873e25197055265d1c",
+ name = "io_bazel_rules_go",
+ sha256 = "513c12397db1bc9aa46dd62f02dd94b49a9b5d17444d49b5a04c5a89f3053c1c",
urls = [
- "https://github.com/bazelbuild/bazel-skylib/archive/f83cb8dd6f5658bc574ccd873e25197055265d1c.tar.gz",
+ "https://storage.googleapis.com/bazel-mirror/github.com/bazelbuild/rules_go/releases/download/v0.19.5/rules_go-v0.19.5.tar.gz",
+ "https://github.com/bazelbuild/rules_go/releases/download/v0.19.5/rules_go-v0.19.5.tar.gz",
],
)
-# Needed for "well-known protos" and protoc.
+# Gazelle, which we need in order to selectively pull in Gazelle dependencies for Go.
http_archive(
- name = "com_google_protobuf",
- sha256 = "3e933375ecc58d01e52705479b82f155aea2d02cc55d833f8773213e74f88363",
- strip_prefix = "protobuf-3.7.0",
- urls = ["https://github.com/protocolbuffers/protobuf/releases/download/v3.7.0/protobuf-all-3.7.0.tar.gz"],
+ name = "bazel_gazelle",
+ sha256 = "7fc87f4170011201b1690326e8c16c5d802836e3a0d617d8f75c3af2b23180c4",
+ urls = ["https://github.com/bazelbuild/bazel-gazelle/releases/download/0.18.2/bazel-gazelle-0.18.2.tar.gz"],
)
-# Needed for the googleapis protos.
-http_archive(
- name = "googleapis",
- build_file = "BUILD.googleapis",
- sha256 = "7b6ea252f0b8fb5cd722f45feb83e115b689909bbb6a393a873b6cbad4ceae1d",
- strip_prefix = "googleapis-143084a2624b6591ee1f9d23e7f5241856642f4d",
- urls = ["https://github.com/googleapis/googleapis/archive/143084a2624b6591ee1f9d23e7f5241856642f4d.zip"],
+# Needed for protobuf.
+load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
+
+git_repository(
+ name = "com_google_protobuf",
+ commit = "09745575a923640154bcf307fba8aedff47f240a",
+ remote = "https://github.com/protocolbuffers/protobuf",
+ shallow_since = "1558721209 -0700",
)
+load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps")
+
+protobuf_deps()
+
# Needed for C++ gRPC.
http_archive(
name = "com_github_grpc_grpc",
- strip_prefix = "grpc-1.21.0",
+ sha256 = "11ac793c562143d52fd440f6549588712badc79211cdc8c509b183cb69bddad8",
+ strip_prefix = "grpc-1.22.0",
urls = [
- "https://github.com/grpc/grpc/archive/v1.21.0.tar.gz",
- "https://mirror.bazel.build/github.com/grpc/grpc/archive/v1.21.0.tar.gz",
+ "https://github.com/grpc/grpc/archive/v1.22.0.tar.gz",
+ "https://mirror.bazel.build/github.com/grpc/grpc/archive/v1.22.0.tar.gz",
],
- sha256 = "8da7f32cc8978010d2060d740362748441b81a34e5425e108596d3fcd63a97f2",
)
# Pull in all gRPC dependencies.
load("@com_github_grpc_grpc//bazel:grpc_deps.bzl", "grpc_deps")
+
grpc_deps()
bind(
@@ -63,27 +59,20 @@ bind(
actual = "@com_github_grpc_grpc//:grpc++",
)
-# We have to import zlib directly ourselves, because protobuf_deps.bzl isn't
-# part of the protobuf release yet
-# (https://github.com/protocolbuffers/protobuf/issues/5918). This should be
-# fixed in 3.8.0.
-http_archive(
- name = "net_zlib",
- build_file = "@com_google_protobuf//:third_party/zlib.BUILD",
- sha256 = "6d4d6640ca3121620995ee255945161821218752b551a1a180f4215f7d124d45",
- strip_prefix = "zlib-1.2.11",
- urls = ["https://zlib.net/zlib-1.2.11.tar.gz"],
+load("//:repository_rules.bzl", "switched_rules_by_language")
+
+switched_rules_by_language(
+ name = "bazel_remote_apis_imports",
+ cc = True,
+ go = True,
+ java = True,
)
-# Pull in go rules.
+# Needed for the googleapis protos.
http_archive(
- name = "io_bazel_rules_go",
- urls = [
- "https://storage.googleapis.com/bazel-mirror/github.com/bazelbuild/rules_go/releases/download/0.18.6/rules_go-0.18.6.tar.gz",
- "https://github.com/bazelbuild/rules_go/releases/download/0.18.6/rules_go-0.18.6.tar.gz",
- ],
- sha256 = "f04d2373bcaf8aa09bccb08a98a57e721306c8f6043a2a0ee610fd6853dcde3d",
+ name = "googleapis",
+ build_file = "BUILD.googleapis",
+ sha256 = "7b6ea252f0b8fb5cd722f45feb83e115b689909bbb6a393a873b6cbad4ceae1d",
+ strip_prefix = "googleapis-143084a2624b6591ee1f9d23e7f5241856642f4d",
+ urls = ["https://github.com/googleapis/googleapis/archive/143084a2624b6591ee1f9d23e7f5241856642f4d.zip"],
)
-load("@io_bazel_rules_go//go:deps.bzl", "go_rules_dependencies", "go_register_toolchains")
-go_rules_dependencies()
-go_register_toolchains()