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: I2f84ff7b7150cb5cb0dd586096e2b339025703b1
  • Loading branch information
dpursehouse committed Oct 11, 2018
1 parent aa998a1 commit e14404f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion 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,
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 e14404f

Please sign in to comment.