I can't get the sha256 parameter to work with git_repository - am I doing something wrong, or is this a bug?
Relatedly, is there an automated way of working out the sha256 for git_repository/http_archive? I've been using `curl -L ... | sha256sum` but it's pretty tedious.
➜ cat WORKSPACE
git_repository(
name = "git_repo",
commit = "e3bd4cbeaeef3cee65a68a8bd3c535cb779e9b6d",
remote = "
https://github.com/google/googletest.git",
sha256 = "f7b26ab6f9c1c938766c4fc523f48cdf8108f2a16fa1a001c7c97ec39f7595ca",
)
http_archive(
name = "http_repo",
sha256 = "f7b26ab6f9c1c938766c4fc523f48cdf8108f2a16fa1a001c7c97ec39f7595ca",
strip_prefix = "googletest-e3bd4cbeaeef3cee65a68a8bd3c535cb779e9b6d",
url = "
https://github.com/google/googletest/archive/e3bd4cbeaeef3cee65a68a8bd3c535cb779e9b6d.tar.gz",
)
➜ bazel build @git_repo//...
ERROR: Could not download tarball, but sha256 specified (f7b26ab6f9c1c938766c4fc523f48cdf8108f2a16fa1a001c7c97ec39f7595ca)
INFO: Elapsed time: 0.788s
FAILED: Build did NOT complete successfully (0 packages loaded)
➜ bazel build @http_repo//...
WARNING: /usr/local/google/home/rodrigoq/.cache/bazel/_bazel_rodrigoq/0a9ee07d9c49cbcf7174a896fad264a7/external/http_repo/WORKSPACE:1: Workspace name in /usr/local/google/home/rodrigoq/.cache/bazel/_bazel_rodrigoq/0a9ee07d9c49cbcf7174a896fad264a7/external/http_repo/WORKSPACE (@com_google_googletest) does not match the name given in the repository's definition (@http_repo); this will cause a build error in future versions
INFO: Analysed 11 targets (11 packages loaded).
INFO: Found 11 targets...
INFO: Elapsed time: 28.780s, Critical Path: 26.68s
INFO: Build completed successfully, 102 total actions