From dfde3514b733b84353b39ae681ff890587c7b050 Mon Sep 17 00:00:00 2001 From: David Pursehouse Date: Fri, 12 Oct 2018 07:54:17 +0900 Subject: [PATCH] bazlets: Replace native.git_repository with skylark rule The native.git_repository rule does not work properly when invoked in a `git submodule foreach` command. Bazel will deprecate the native rules anyway, so replace with skylark's git_repository. See [1] for context. [1] https://github.com/bazelbuild/bazel/issues/6358#issuecomment-429103745 Change-Id: If1dedab49babafa15b3dfda424b3bc92b6f1afba --- bazlets.bzl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bazlets.bzl b/bazlets.bzl index e14e488..6c4fffc 100644 --- a/bazlets.bzl +++ b/bazlets.bzl @@ -1,3 +1,5 @@ +load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository") + NAME = "com_googlesource_gerrit_bazlets" def load_bazlets( @@ -5,7 +7,7 @@ def load_bazlets( local_path = None ): if not local_path: - native.git_repository( + git_repository( name = NAME, remote = "https://gerrit.googlesource.com/bazlets", commit = commit,