Skip to content

Commit

Permalink
bazlets: Replace native.git_repository with skylark rule
Browse files Browse the repository at this point in the history
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] bazelbuild/bazel#6358 (comment)

Change-Id: Ia84224369f21596ebb0aadb02f39627bc5c21c39
  • Loading branch information
dpursehouse committed Oct 11, 2018
1 parent 2490a12 commit 7b2039d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions bazlets.bzl
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")

NAME = "com_googlesource_gerrit_bazlets"

def load_bazlets(
commit = None,
commit,
local_path = None):
if not local_path:
native.git_repository(
git_repository(
name = NAME,
remote = "https://gerrit.googlesource.com/bazlets",
commit = commit,
Expand Down

0 comments on commit 7b2039d

Please sign in to comment.