Skip to content

Commit

Permalink
Use http_archive for protobuf repository (#163)
Browse files Browse the repository at this point in the history
http_archive are faster and better caching support compared
to git_repository.
  • Loading branch information
damienmg committed Nov 25, 2018
1 parent 60c3627 commit add17a1
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions proto/repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,17 @@
# limitations under the License.

load("//proto/raze:crates.bzl", _crate_deps = "raze_fetch_remote_crates")
load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

def rust_proto_repositories():
"""Declare dependencies needed for proto compilation."""
if not native.existing_rule("com_google_protobuf"):
git_repository(
http_archive(
name = "com_google_protobuf",
remote = "https://github.com/protocolbuffers/protobuf.git",
commit = "7b28271a61a3da0a37f6fda399b0c4c86464e5b3", # 2018-11-16
# commit 7b28271a61a3da0a37f6fda399b0c4c86464e5b3 is from 2018-11-16
urls = ["https://github.com/protocolbuffers/protobuf/archive/7b28271a61a3da0a37f6fda399b0c4c86464e5b3.tar.gz"],
strip_prefix = "protobuf-7b28271a61a3da0a37f6fda399b0c4c86464e5b3",
sha256 = "9dac7d7cf6e2c88bf92915f9338a26950531c00c05bf86764ab978344b69a45a",
)

_crate_deps()
Expand Down

0 comments on commit add17a1

Please sign in to comment.