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: Ib9efda267c5545f73fcbacbf7ac4ffcfd28d3216
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 @@ local_path = None ): if not local_path: - native.git_repository( + git_repository( name = NAME, remote = "https://gerrit.googlesource.com/bazlets", commit = commit,