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: I97492855b99991e9812b07ed2851a31d67be3aea
  • Loading branch information
marco-miller committed Oct 15, 2018
1 parent f6a1200 commit a57f73a
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 a57f73a

Please sign in to comment.