我了解需要以下负载new_git_repository
:
load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository", "new_git_repository")
但是我如何找到new_local_repository
. 我尝试浏览build_defs git 文件夹,但new_local_repository
没有在那里定义,所以我无法猜测负载。
我收到以下错误 - name 'new_local_repository' is not defined
。我如何找到所需的负载?
如果你调用new_local_repository
一个内部.bzl
这是一个从加载的文件WORKSPACE
的文件,你必须使用native.new_local_repository
替代。这是因为new_local_repository
在 Bazel 核心而不是任何.bzl
文件中定义。