Skip to content

Commit

Permalink
Add duplicate http_archives for absl and re2 with official names. (#…
Browse files Browse the repository at this point in the history
…741)

Although Bazel gives you the option of naming your http_archive
repositories whatever you want, it apparently would really prefer if
everyone chose the same name everywhere. This becomes apparent where
fuzztest really wants the top level `WORKSPACE` to call absl
`com_google_absl`, and will not allow me to use the shorter name `absl`.
This is especially annoying because both `WORKSPACE`s describe `absl`
using the same URL and sha256 hash, so you'd hope it would identify them
as the same dependency? Discussions online do not give me great hope in
flexibility from Bazel on this point:
bazelbuild/bazel#3219

In any case, for now I am duplicating the dependency in two different
`http_archive`s. I will remove the shorter, more readable `absl` and
`re2` in the future once I have cut over to the new dependency.
  • Loading branch information
Mark Winterrowd authored Sep 27, 2022
1 parent 177fe4c commit 74285ec
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,13 @@ http_archive(
urls = ["https://github.com/abseil/abseil-cpp/archive/refs/tags/20220623.0.tar.gz"],
)

http_archive(
name = "com_google_absl",
sha256 = "4208129b49006089ba1d6710845a45e31c59b0ab6bff9e5788a87f55c5abd602",
strip_prefix = "abseil-cpp-20220623.0",
urls = ["https://github.com/abseil/abseil-cpp/archive/refs/tags/20220623.0.tar.gz"],
)

# Bazel platform rules.
http_archive(
name = "platforms",
Expand Down Expand Up @@ -287,6 +294,13 @@ http_archive(
urls = ["https://github.com/google/re2/archive/refs/tags/2022-06-01.tar.gz"],
)

http_archive(
name = "com_googlesource_code_re2",
sha256 = "f89c61410a072e5cbcf8c27e3a778da7d6fd2f2b5b1445cd4f4508bee946ab0f",
strip_prefix = "re2-2022-06-01",
urls = ["https://github.com/google/re2/archive/refs/tags/2022-06-01.tar.gz"],
)

fuzztest_commit_hash = "4a8253b7299cf1764550054fae55f1b58a65bbaa"

# Fuzztest
Expand Down

0 comments on commit 74285ec

Please sign in to comment.