Skip to content

Commit 9773e0b

Browse files
jckingkyessenov
authored andcommitted
Pin various CEL C++ dependencies to a specific version and enable SHA256 verification
PiperOrigin-RevId: 401002041
1 parent 574cbe1 commit 9773e0b

1 file changed

Lines changed: 25 additions & 8 deletions

File tree

bazel/deps.bzl

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,30 +6,47 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
66

77
def base_deps():
88
"""Base evaluator and test dependencies."""
9+
10+
# LTS, March 2021, Patch 2
11+
ABSL_SHA1 = "278e0a071885a22dcd2fd1b5576cc44757299343"
12+
ABSL_SHA256 = "ff5ea6f91f9bcd0f368346ef707d0a80a372b71de5b6ae69ac11d0ca41688b8f"
913
http_archive(
1014
name = "com_google_absl",
15+
urls = ["https://github.com/abseil/abseil-cpp/archive/" + ABSL_SHA1 + ".zip"],
16+
strip_prefix = "abseil-cpp-" + ABSL_SHA1,
17+
sha256 = ABSL_SHA256,
1118
patches = ["//bazel:abseil.patch"],
1219
patch_args = ["-p1"],
13-
strip_prefix = "abseil-cpp-master",
14-
urls = ["https://github.com/abseil/abseil-cpp/archive/master.zip"],
1520
)
1621

22+
# v1.11.0
23+
GOOGLETEST_SHA1 = "e2239ee6043f73722e7aa812a459f54a28552929"
24+
GOOGLETEST_SHA256 = "8daa1a71395892f7c1ec5f7cb5b099a02e606be720d62f1a6a98f8f8898ec826"
1725
http_archive(
1826
name = "com_google_googletest",
19-
urls = ["https://github.com/google/googletest/archive/master.zip"],
20-
strip_prefix = "googletest-master",
27+
urls = ["https://github.com/google/googletest/archive/" + GOOGLETEST_SHA1 + ".zip"],
28+
strip_prefix = "googletest-" + GOOGLETEST_SHA1,
29+
sha256 = GOOGLETEST_SHA256,
2130
)
2231

32+
# v1.6.0
33+
BENCHMARK_SHA1 = "f91b6b42b1b9854772a90ae9501464a161707d1e"
34+
BENCHMARK_SHA256 = "00bd0837db9266c758a087cdf0831a0d3e337c6bb9e3fad75d2be4f9bf480d95"
2335
http_archive(
2436
name = "com_github_google_benchmark",
25-
urls = ["https://github.com/google/benchmark/archive/master.zip"],
26-
strip_prefix = "benchmark-master",
37+
urls = ["https://github.com/google/benchmark/archive/" + BENCHMARK_SHA1 + ".zip"],
38+
strip_prefix = "benchmark-" + BENCHMARK_SHA1,
39+
sha256 = BENCHMARK_SHA256,
2740
)
2841

42+
# 2021-09-01
43+
RE2_SHA1 = "8e08f47b11b413302749c0d8b17a1c94777495d5"
44+
RE2_SHA256 = "d635a3353bb8ffc33b0779c97c1c9d6f2dbdda286106a73bbcf498f66edacd74"
2945
http_archive(
3046
name = "com_googlesource_code_re2",
31-
strip_prefix = "re2-main",
32-
urls = ["https://github.com/google/re2/archive/main.zip"],
47+
urls = ["https://github.com/google/re2/archive/" + RE2_SHA1 + ".zip"],
48+
strip_prefix = "re2-" + RE2_SHA1,
49+
sha256 = RE2_SHA256,
3350
)
3451

3552
PROTOBUF_VERSION = "3.18.0"

0 commit comments

Comments
 (0)