我正在尝试运行具有gRPC依赖关系的简单程序。我尝试了几个示例,但仍然收到以下错误:
ERROR: /home/git/examples/WORKSPACE:1:1: name 'git_repository' is not defined
ERROR: Error evaluating WORKSPACE file
Run Code Online (Sandbox Code Playgroud)
这是我的bazel版本:
? git:(master) ? bazel version
Build label: 0.23.2
Run Code Online (Sandbox Code Playgroud)
这是工作空间文件的内容:
git_repository(
name = "com_github_grpc_grpc",
commit = "ac0808b107d73613191b66617a547a201871a845",
remote = "https://github.com/grpc/grpc.git",
)
load("@com_github_grpc_grpc//:bazel/grpc_deps.bzl", "grpc_deps")
grpc_deps()
bind(
name = "grpc_cpp_plugin",
actual = "@com_github_grpc_grpc//:grpc_cpp_plugin",
)
bind(
name = "grpc++_codegen_proto",
actual = "@com_github_grpc_grpc//:grpc++_codegen_proto",
)
Run Code Online (Sandbox Code Playgroud)
任何帮助将不胜感激!
git_repository不再是本机规则。您需要在其顶部WORKSPACE包含以下内容:
load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
681 次 |
| 最近记录: |